
Email platforms get expensive right when your list starts paying off. They also put a layer between you and your audience.
Pricing tiers, compliance knobs you can’t tune, and deliverability settings you can’t fully see all reduce control. If you already run your site on a VPS or dedicated server, it often makes sense to bring newsletters in-house too.
This post focuses on listmonk, an open-source newsletter and mailing list manager. You’ll see who it fits, what it can replace, and what it takes to deploy listmonk on a VPS with HTTPS, backups, and an update process you won’t dread.
Why listmonk fits real infrastructure (and who should run it)
listmonk is built for people who operate servers. It’s a single app backed by PostgreSQL, with a web UI that stays snappy as your list grows.
If you already manage DNS, TLS, and a VPS for your app, listmonk will feel familiar.
- Website owners who want a straightforward newsletter with segmentation and templates.
- SaaS teams sending product updates and broadcasts (while keeping true transactional email separate).
- Agencies running newsletters for multiple brands, where predictable costs matter.
Licensing is part of the decision. listmonk is open-source under AGPL-3.0. That’s typically fine for standard self-hosted use.
If you plan to modify it and offer it as part of a distributed network service, read the license carefully. Get proper advice.
Deploy listmonk on a VPS vs Mailchimp-style SaaS
Hosted newsletter platforms are easy: sign up, verify a domain, send a campaign. You pay for that convenience with higher unit cost and less control.
Subscriber pricing, send limits, and “supported” deliverability features often dictate what you can do.
Running listmonk yourself shifts the trade-offs. You control:
- Your SMTP provider (or your own mail stack), which affects deliverability and spend.
- Your data location and retention policy.
- Your sending behavior (rate limits, concurrency, retries) based on your provider’s rules.
SaaS still has advantages. You get managed deliverability tooling, ready-made compliance workflows for certain regions, and fewer moving parts to maintain.
If you already operate websites or apps, listmonk’s “moving parts” are the usual suspects: Docker, Postgres, reverse proxy, and DNS.
What you need before you start (VPS sizing, DNS, SMTP)
Most deployments stay small. CPU is rarely the constraint. SMTP throughput is.
Still, give Postgres enough memory. Keep disk I/O consistent.
- Minimum VPS: 1 vCPU, 1–2 GB RAM, 20+ GB SSD/NVMe for small lists and occasional campaigns.
- Comfortable baseline: 2 vCPU, 4 GB RAM, NVMe storage for frequent sends and larger lists.
- Database: PostgreSQL (running inside the same Compose stack is fine early on).
For hosting, a general-purpose VPS is the usual starting point. If you want help with OS updates, firewall basics, and backup routines, managed VPS hosting keeps the boring maintenance off your plate.
If you prefer full control, a HostMyCode VPS gives you predictable resources.
DNS and deliverability are where self-hosting either works smoothly or falls apart. Sort these before you import subscribers:
- From domain: newsletter.yourdomain.com or mail.yourdomain.com.
- SPF: authorize the SMTP service you’ll use.
- DKIM: enable signing at your SMTP provider; publish the DKIM records.
- DMARC: start with
p=none, then move to quarantine/reject once you’re confident.
If mail delivery on your VPS has been flaky (timeouts, blocked ports, WordPress mail failing), the troubleshooting steps overlap. These guides are older, but the patterns still hold: Fix WordPress not sending email on a VPS and set up a Postfix relay.
Deploy listmonk on a VPS with Docker Compose (clean and maintainable)
listmonk runs cleanly in containers. Docker Compose keeps the setup readable. It’s also easy to back up and move later.
Assumptions for the example:
- Ubuntu 24.04+ or Debian 12+ on your VPS
- A DNS name like
lists.example.compointing to your server - Docker Engine + Docker Compose plugin installed
Create a working directory:
sudo mkdir -p /opt/listmonk
sudo chown -R $USER:$USER /opt/listmonk
cd /opt/listmonk
Create persistent folders for Postgres and listmonk config:
mkdir -p postgres-data listmonk-data
Now add docker-compose.yml. Keep it simple. Simple stacks stay running.
version: "3.8"
services:
db:
image: postgres:16
container_name: listmonk-db
environment:
POSTGRES_USER: listmonk
POSTGRES_PASSWORD: change-me-long-random
POSTGRES_DB: listmonk
volumes:
- ./postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U listmonk -d listmonk"]
interval: 10s
timeout: 5s
retries: 10
restart: unless-stopped
app:
image: listmonk/listmonk:latest
container_name: listmonk
depends_on:
db:
condition: service_healthy
environment:
LISTMONK_app__address: "0.0.0.0:9000"
LISTMONK_db__host: "db"
LISTMONK_db__port: "5432"
LISTMONK_db__user: "listmonk"
LISTMONK_db__password: "change-me-long-random"
LISTMONK_db__database: "listmonk"
LISTMONK_db__ssl_mode: "disable"
volumes:
- ./listmonk-data:/listmonk
restart: unless-stopped
networks:
default:
name: listmonk-net
Initialize the database schema and bring the stack up:
docker compose up -d db
docker compose run --rm app ./listmonk --install --yes
docker compose up -d
At this point, listmonk listens on :9000 inside your VPS. Don’t leave that port exposed to the internet.
Put a reverse proxy in front of it.
Reverse proxy with HTTPS (Nginx example + Let’s Encrypt)
You can terminate TLS with Nginx, Caddy, or Traefik. Nginx is a common choice on VPS hosting because it behaves predictably and plays well with existing sites.
Install Nginx and Certbot (Ubuntu):
sudo apt update
sudo apt install -y nginx certbot python3-certbot-nginx
Create an Nginx server block at /etc/nginx/sites-available/listmonk:
server {
listen 80;
server_name lists.example.com;
location / {
proxy_pass http://127.0.0.1:9000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
client_max_body_size 20m;
}
Now you have a choice:
- Bind listmonk to localhost by publishing the container port to
127.0.0.1, or - Proxy to the container network (more complex, not necessary here).
To bind to localhost, add a ports mapping to the app service:
ports:
- "127.0.0.1:9000:9000"
Reload Compose and Nginx:
docker compose up -d
sudo ln -s /etc/nginx/sites-available/listmonk /etc/nginx/sites-enabled/listmonk
sudo nginx -t
sudo systemctl reload nginx
Issue TLS:
sudo certbot --nginx -d lists.example.com
If you prefer Traefik for multi-app VPSs, the setup is similar. This HostMyCode guide walks through a practical pattern: Traefik with Docker Compose for HTTPS on a VPS.
SMTP setup: the part you should test before importing your list
listmonk sends mail over SMTP. Deliverability mostly comes down to domain authentication (SPF/DKIM/DMARC), list hygiene, and the SMTP provider’s reputation.
Configure SMTP under Settings in listmonk. A few rules make life easier:
- Use a dedicated subdomain for newsletters (e.g.,
news.example.com) and align the From address. - Start with low concurrency and raise it only after your provider confirms your limits.
- Separate transactional email (password resets, invoices) from bulk newsletters. Use different SMTP identities or providers.
Quick diagnostic: send a test campaign to Gmail and Outlook addresses you control. Then inspect the message headers.
You want SPF=PASS, DKIM=PASS, and DMARC=PASS.
Backups that actually restore (Postgres + uploads + config)
For listmonk, the database is the crown jewels: subscribers, lists, campaigns, bounces, and settings.
The listmonk-data directory may also hold config and uploads, depending on your setup.
Back up both, every time.
A reliable baseline is nightly dumps plus file snapshots copied to offsite storage.
- Postgres dump:
pg_dumpto a timestamped file. - Compose directory: tar your
/opt/listmonk(or at leastdocker-compose.ymland the data directories). - Offsite: rclone to object storage, or an encrypted backup tool.
Example backup script at /usr/local/sbin/backup-listmonk.sh:
#!/usr/bin/env bash
set -euo pipefail
BASE=/opt/listmonk
OUT=/var/backups/listmonk
DATE=$(date +%F-%H%M)
mkdir -p "$OUT"
# Database dump
cd "$BASE"
docker exec -t listmonk-db pg_dump -U listmonk -d listmonk | gzip > "$OUT/listmonk-db-$DATE.sql.gz"
# App + volumes (kept simple)
tar -C /opt -czf "$OUT/listmonk-files-$DATE.tar.gz" listmonk
# Optional: prune local backups older than 14 days
find "$OUT" -type f -mtime +14 -delete
Schedule it with cron:
sudo chmod +x /usr/local/sbin/backup-listmonk.sh
sudo crontab -e
15 2 * * * /usr/local/sbin/backup-listmonk.sh
Restore test (do this before you need it): spin up a throwaway VPS, run the same Compose file, then import:
gunzip -c listmonk-db-YYYY-MM-DD-HHMM.sql.gz | docker exec -i listmonk-db psql -U listmonk -d listmonk
If you want a broader backup strategy for hosting workloads, this guide matches listmonk’s needs well: set up automatic database backups with tested restores (same idea, even if the database engine differs).
Updates without surprises (and what to watch after)
Container updates are easy to rush and regret. Aim for a boring workflow: pull, restart, verify, and roll back if something looks off.
A safe update routine:
- Take a backup (or at least a fresh DB dump).
- Pull images.
- Restart the stack.
- Run any required app migrations (listmonk may prompt or handle internally depending on changes).
- Send a test email and check logs.
cd /opt/listmonk
/usr/local/sbin/backup-listmonk.sh
docker compose pull
docker compose up -d
docker logs --tail=100 listmonk
If you want automated refreshes, add guardrails. Watchtower can be fine for low-risk services, but newsletters are customer-facing and deliverability-sensitive.
Prefer scheduled updates with monitoring. If you do automate, this guide shows a sensible setup: Docker Compose auto-updates with Watchtower on a VPS.
Operational pitfalls (the stuff that breaks first)
- Port 25 reality: many networks restrict outbound port 25. Plan on SMTP submission ports (587/465) with authentication.
- Disk usage creep: Postgres grows with campaign history and analytics. Monitor
/opt/listmonk/postgres-data. - Unsubscribe compliance: keep listmonk’s unsubscribe flow intact. Don’t “pretty it up” by hiding it.
- List hygiene: don’t import stale lists and blast immediately. Warm up IP/domain reputation.
- Reverse proxy timeouts: rare for listmonk, but if you see 504s elsewhere on your VPS, fix Nginx timeouts globally. This guide is a good pattern: Fix WordPress 504 Gateway Timeout on Nginx VPS.
Where listmonk fits alongside the rest of your stack
Most operators end up with a small “business tools” set: docs, monitoring, support inbox, and newsletters. listmonk fits comfortably in that mix.
- Running a helpdesk too? Pair it with a support tool like Zammad (we’ve covered deployment patterns already: Deploy Zammad Helpdesk on a VPS with Docker Compose).
- If you need a live chat + shared inbox, Chatwoot is another common neighbor with the same reverse proxy approach: Run Chatwoot on a VPS.
Summary: self-hosting newsletters without making email your full-time job
listmonk is a straightforward trade. You take on basic service ownership (VPS, database, backups, HTTPS). In return, you get stable costs and direct control over data and sending.
Treat it like any other production service. Keep it behind TLS. Back it up. Update it on a schedule. Verify deliverability before you scale up.
If you want a stable place to run it, start with a HostMyCode VPS. If you’d rather not handle OS updates and baseline hardening yourself, use managed VPS hosting and spend your time on content and campaigns.
If you want newsletters on infrastructure you control, listmonk is a sensible place to start. Run it on a HostMyCode VPS for predictable performance, or choose managed VPS hosting if you want the OS and security basics handled.
FAQ
Can I use listmonk for transactional email too?
You can, but it’s usually smarter to keep transactional email in your app (or a transactional provider) and use listmonk for bulk newsletters.
Mixing the two often complicates deliverability and reputation management.
Do I need to run my own mail server?
No. listmonk only needs SMTP credentials. Many operators use a reputable SMTP relay service and focus on SPF/DKIM/DMARC and list hygiene.
What’s the easiest way to move listmonk to a new VPS later?
Back up the Postgres dump and your /opt/listmonk directory.
On the new VPS, deploy the same Compose stack, restore the database, then point DNS to the new IP after you’ve confirmed HTTPS works.
How do I protect the admin UI?
Use HTTPS and set strong admin passwords. Consider restricting access by IP at Nginx if only your team needs the UI.
If you need private admin access, a tunnel approach can also work.
What should I monitor first?
Disk usage on the Postgres volume, container restarts, and SMTP send errors.
A basic uptime check on / plus log monitoring catches most early failures.