Search

Search IconIcon to open search

Listmonk

Last updated by Simon Späti

Self-hosted newsletter and mailing list manager. Performance and features packed into a single binary. Free and open source.

My new Newsletter is published with Listmonk on list.ssp.sh. So far I used Mailchimp. I also liked Buttondown, unfortunately, it costs 9$ for above 100 subscribers.

By using open source Listmonk, I have the sending emails and collecting and unsubscribing from a newsletter, which I needed. But I had to deploy it myself. I used Railway.app.

# Settings

# Automatic Confirm Subscription Email by Clicking in Email

Default behaviour, if you click on the confirm button in your email:

It wil infact not confirm yet, you need another click once again confirm on the linked page. I believe this is why many have not confirmed my email subscribtion, tough many are subcribing itself.

There is a workaround for this by pasting the following piece of JavaScript in Settings -> Appearance -> Public -> Custom Javascript:

1
document.querySelector(".optin-form").submit();

After that, the above confirm will open a browser window and automatically click/submit the button after opening the browser. I think this should be default as it won’t work if JavaScript it blocked in your browser.

# Automation

# Sending Emails of Newsletter with Amazon SES

Sending it with Amazon SES.

Make sure you set up and verify the domain, and set some other settings like SPF, DKIM, and DMARC records. Check Bulk or mass email service for Newsletter and Email Automation.

I think I used these checklists:

Sending with AWS SES cost a little

Although you pay, it’s almost neglectable, at least if you don’t have millions of subscribers.

# RSS

Based on RSS new email - Provide an RSS integration for listmonk, a self-hosted newsletter and mailing list manager. GitHub - listmonk-rss: by Stephan Heuel.

I just enabled automatic email send when I create a new article based on my RSS-Feed. I used Above repo by Stephan and forked it. Locally I can run make dry_run or live:

1
2
cd ~/Documents/git/sspaeti.com/listmonk-rss
make create_campaign

It works like a charm. This will schedule a campaign with the latest articles since LAST_UPDATE with a delay of 180 minutes.

# This is how it looks

Make command:

New created campain on Listmonk:

And updated LAST_UPDATE on GitHub:

And the Email:

Wdyt? :)

# Welcome Emails

Listmonk does not support automatically sending welcome emails or other messages. It is better to use Email Automation, something like Mautic, as mentioned in the GitHub issue.

A hacky solution with Listmonk on Auto reply on subscription (Issue #206).

The alternative I use for now is PayHip, see on My Services.

# Opt-In Campain to none-confirmed subscribers

# Interface

# Querying

1
subscribers.created_at >= '2025-09-23 00:00:00' 

or

1
subscribers.created_at::DATE = '2025-09-23'

# Tech Setup and Maintenance

# Upgrade Listmonk on Railapp

  • Head to your dashboard, and select your Listmonk project.
  • Select the GitHub deployment service.
  • In the Deployment tab, head to the latest deployment, click on the three vertical dots to the right, and select “Redeploy”.

Railway Redeploy option
see more on Upgrade - listmonk / Documentation

# Backup Postgres DB

Check Automated PostgreSQL Backups.

Restoring data from the backup

Our data should is now being automatically backed up to our S3 bucket. If we ever want to restore this data to a database, we can do so very easily using pg_restore.

First, unzip the backup which is stored as a tar.gz file and then run:

1
pg_restore -d 'DATABASE_URL' BACKUP_FOLDER

In the above snippet, replace the DATABASE_URL with the connection URL of the database you’d like to restore the data to and the BACKUP_FOLDER with the name of the folder to which you extracted your backup zip file and voila, your backup has been restored!

# Caddy: CORS Settings - Railapp migration

I wanted to add my newsletter (list.ssp.sh) to my website (ssp.sh), as these are not the same domain, I got a CORS error.

Luckily the new Railway.app template (see here) includes a Caddy settings and this can be easily set. But you need to migrate to the new one.

Here are the changes it’s made - and you see my comment of what you need to change in your variable to make it work - add support for cors · railwayapp-templates/listmonk@39d3e53 · GitHub

The new caddy-template removes config.sh where ENVs where set - so after the migration it won’t wor. You need to add additional variable (or replacing once) to the Railway variables;

1
2
3
4
5
6
LISTMONK_db__host="${{Postgres.PGHOST}}"
LISTMONK_db__port="${{Postgres.PGPORT}}"
LISTMONK_db__user="${{Postgres.PGUSER}}"
LISTMONK_db__password="${{Postgres.PGPASSWORD}}"
LISTMONK_db__database="${{Postgres.PGDATABASE}}"
LISTMONK_db__ssl_mode="disable"

After adding these (I removed the old PG_* and DATABASE_URL) and then it worked as before. Also, if you want to add CORS accepted URLs, you can just add to the above variables - such as:

1
2
LISTMONK_ORIGIN_0="https://www.my-web-page.com"
LISTMONK_ORIGIN_1="https://another-webpage.ch"

# Listmonk vs. Alternatives

# Listmonk vs. Substack

Fast network growth can fade as fast as it came. Sometimes I wonder if, when most land in email inboxes, and you get 10 or 20 of them, people are still reading them as much as Substack wants us to believe.

And I’ve been there, coming from Mailchimp, then Medium in a way, now Substack, what’s next? The cost of switching is real, too. I love Listmonk if you like to own your list and enjoy a little bit of setup. It’s great. The best part, and why I chose it in the first place, is Markdown support. No code converting from text to an image, or afraid of losing formatting from your text editor to the Substack editor. My LinkedIn Comment

# Further Reads


Origin: Newsletter
References: listmonk - Free and open source self-hosted newsletter, mailing list manager, and transactional mails, Send Checklist for Reaching Audience
Created 2023-04-09