
Here is a step-by-step guide to install and configure ListMonk (a high-performance, self-hosted newsletter and mailing list manager) on an Ubuntu VPS.
✅ What is ListMonk?
ListMonk is a fast, open-source newsletter and mailing list manager built with Go and PostgreSQL. It supports email templating, subscriber management, campaign analytics, and more.
- Website: https://listmonk.app
- Backend: Go (Golang)
- Database: PostgreSQL
🧰 Prerequisites
- Ubuntu 20.04 or newer VPS
- Root or sudo access
- Domain name (optional, but recommended)
- SMTP credentials for sending emails
🛠️ How to Install and Configure ListMonk on Ubuntu VPS
-
Update Your System
sudo apt update && sudo apt upgrade -y
-
Install Dependencies
Install required packages:
sudo apt install curl git unzip postgresql postgresql-contrib -y
-
Set Up PostgreSQL
Create a database and user for ListMonk:
sudo -u postgres psql
Inside the PostgreSQL shell:
CREATE DATABASE listmonk; CREATE USER listmonk_user WITH PASSWORD 'your_secure_password'; GRANT ALL PRIVILEGES ON DATABASE listmonk TO listmonk_user; \q
-
Download ListMonk
Create a directory and download the latest release:
cd /opt sudo git clone https://github.com/knadh/listmonk.git cd listmonk sudo ./build.sh
This builds the
listmonk
binary from source using Go. If you prefer, you can download a precompiled binary from the Releases. -
Configure ListMonk
Copy the default config:
cp config.example.toml config.toml
Edit the config:
nano config.toml
Change the following:
[app] address = "0.0.0.0:9000" # You can change the port admin_username = "admin" admin_password = "changeme" [db] host = "localhost" port = 5432 user = "listmonk_user" password = "your_secure_password" database = "listmonk" ssl_mode = "disable" [smtp] host = "smtp.yourprovider.com" port = 587 username = "your@email.com" password = "your_smtp_password" from_email = "your@email.com" from_name = "Your Name or Brand"
Save and close the file.
-
Run Database Migrations
Initialize the database schema:
./listmonk --install --yes
-
Start ListMonk
Run the server:
./listmonk
Access the web UI at:
http://your-server-ip:9000
Login with the credentials you configured (
admin
/changeme
by default). -
🔁 Optional: Run ListMonk as a Systemd Service
Create a systemd unit file:
sudo nano /etc/systemd/system/listmonk.service
Paste the following:
[Unit] Description=ListMonk Newsletter Manager After=network.target [Service] Type=simple User=root WorkingDirectory=/opt/listmonk ExecStart=/opt/listmonk/listmonk Restart=always [Install] WantedBy=multi-user.target
Enable and start the service:
sudo systemctl daemon-reexec sudo systemctl enable --now listmonk
-
🔐 (Optional) Secure with NGINX and HTTPS
If using a domain, you can reverse-proxy ListMonk via NGINX and add Let’s Encrypt SSL.
Install NGINX:
sudo apt install nginx -y
Create a reverse proxy config:
sudo nano /etc/nginx/sites-available/listmonk
server { listen 80; server_name yourdomain.com; location / { proxy_pass http://127.0.0.1:9000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } }
Enable the config:
sudo ln -s /etc/nginx/sites-available/listmonk /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl restart nginx
Set up HTTPS with Certbot:
sudo apt install certbot python3-certbot-nginx -y sudo certbot --nginx -d yourdomain.com
-
✅ Final Checks
- Visit:
https://yourdomain.com
orhttp://your-ip:9000
- Login using admin credentials
- Add SMTP details under Settings (if not added in config)
- Create lists, subscribers, and start sending campaigns!
- Visit:
📦 Useful Commands
Task | Command |
---|---|
Start service | sudo systemctl start listmonk |
Stop service | sudo systemctl stop listmonk |
Restart service | sudo systemctl restart listmonk |
View logs | journalctl -u listmonk -f |
📚 Resources
- Docs: https://listmonk.app/docs/
- GitHub: https://github.com/knadh/listmonk
Conclusion
You now know how to install and configure ListMonk on Ubuntu VPS.