...
Install and configure listmonk on ubuntu vps
Learn how to install and configure listmonk on ubuntu vps!

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.

๐Ÿงฐ Prerequisites

  • Ubuntu 20.04 or newer VPS
  • Root or sudo access
  • Domain name (optional, but recommended)
  • SMTP credentials for sending emails

Launch 100% ssd ubuntu vps from $2. 49/mo!


Compare Ubuntu VPS Plans

KVM-SSD-1
KVM-SSD-8
KVM-SSD-16
KVM-SSD-32
CPU
1 Core
2 Cores
4 Cores
8 Cores
Memory
1 GB
8 GB
16 GB
32 GB
Storage
16 GB NVMe
128 GB NVMe
256 GB NVMe
512 GB NVMe
Bandwidth
1 TB
4 TB
8 TB
16 TB
Network
1 Gbps
1 Gbps
1 Gbps
1 Gbps
Delivery Time
โฑ๏ธ Instant
โฑ๏ธ Instant
โฑ๏ธ Instant
โฑ๏ธ Instant
Location
US/FR
US/FR
US/FR
US/FR
Price
$7.58*
$39.50*
$79.40*
$151.22*
KVM-SSD-1
CPU: 1 Core
Memory: 2 GB
Storage: 16 GB NVMe
1 TB
KVM-SSD-8
CPU: 2 Cores
Memory: 8 GB
Storage: 128 GB NVMe
4 TB
KVM-SSD-16
CPU: 4 Cores
Memory: 16 GB
Storage: 256 GB NVMe
8 TB
KVM-SSD-32
CPU: 8 Cores
Memory: 32 GB
Storage: 512 GB NVMe
16 TB

๐Ÿ› ๏ธ How to Install and Configure ListMonk on Ubuntu VPS

  1. Update Your System

    sudo apt update && sudo apt upgrade -y
    
  2. Install Dependencies

    Install required packages:
    sudo apt install curl git unzip postgresql postgresql-contrib -y
    
  3. 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
    
  4. 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.

  5. 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.

  6. Run Database Migrations

    Initialize the database schema:

    ./listmonk --install --yes
    
  7. 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).

  8. ๐Ÿ” 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
    
  9. ๐Ÿ” 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
    
  10. โœ… Final Checks

    • Visit: https://yourdomain.com or http://your-ip:9000
    • Login using admin credentials
    • Add SMTP details under Settings (if not added in config)
    • Create lists, subscribers, and start sending campaigns!

๐Ÿ“ฆ 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

Launch 100% ssd ubuntu vps from $2. 49/mo!

Conclusion

You now know how to install and configure ListMonk on Ubuntu VPS.


Compare Ubuntu VPS Plans

KVM-SSD-1
KVM-SSD-8
KVM-SSD-16
KVM-SSD-32
CPU
1 Core
2 Cores
4 Cores
8 Cores
Memory
1 GB
8 GB
16 GB
32 GB
Storage
16 GB NVMe
128 GB NVMe
256 GB NVMe
512 GB NVMe
Bandwidth
1 TB
4 TB
8 TB
16 TB
Network
1 Gbps
1 Gbps
1 Gbps
1 Gbps
Delivery Time
โฑ๏ธ Instant
โฑ๏ธ Instant
โฑ๏ธ Instant
โฑ๏ธ Instant
Location
US/FR
US/FR
US/FR
US/FR
Price
$7.58*
$39.50*
$79.40*
$151.22*
KVM-SSD-1
CPU: 1 Core
Memory: 2 GB
Storage: 16 GB NVMe
1 TB
KVM-SSD-8
CPU: 2 Cores
Memory: 8 GB
Storage: 128 GB NVMe
4 TB
KVM-SSD-16
CPU: 4 Cores
Memory: 16 GB
Storage: 256 GB NVMe
8 TB
KVM-SSD-32
CPU: 8 Cores
Memory: 32 GB
Storage: 512 GB NVMe
16 TB

Avatar of editorial staff

Editorial Staff

Rad Web Hosting is a leading provider of web hosting, Cloud VPS, and Dedicated Servers in Dallas, TX.
lg