Self-Hosting Listmonk on Railway: The Newsletter Server That Can't Send Email on the Wrong Plan
Listmonk is an open-source newsletter and mailing-list manager: subscriber lists, segmentation with SQL, campaign templates, analytics, and transactional mail over an API. It's a single Go binary backed by Postgres, it idles at a few tens of megabytes of RAM, and it's free — the only per-email cost is whichever mail provider actually delivers your messages. That combination makes it one of the…
Listmonk is an open-source newsletter server that allows subscribers to manage mailing lists, segment them using SQL, create campaign templates, generate analytics, and send transactional emails over an API. It is a single Go binary backed by Postgres and requires minimal RAM. The only cost associated with using Listmonk is the mail provider that delivers the messages.
However, running Listmonk requires careful planning, as certain plans on the Railway platform block outbound SMTP ports, making it impossible for Listmonk to deliver emails. For production newsletters, it is recommended to use Railway Pro or any host that allows outbound SMTP. Hobby plans are suitable for evaluation purposes, such as building lists, importing subscribers, and testing the API.
Nevertheless, a test campaign is unlikely to be successful. Before importing any subscribers, ensure that the chosen plan allows outbound SMTP. To ensure smooth operation, it is essential to upgrade Listmonk correctly. The binary keeps track of schema versions in the database, and new releases include migrations that are applied by running the binary with the --upgrade flag.
It is crucial to back up the Postgres database before every upgrade, as upgrading idempotent means that downgrades are not supported. Additionally, pinning the image tag is recommended to avoid accidental major version upgrades when redeploying the container. Images uploaded for campaigns are stored in the uploads directory within the container, and any changes to this directory on redeploy will result in broken images.
Therefore, two options should be considered: mounting a volume at the uploads path with the media settings pointing to it or using S3-compatible storage. Once the decision on image storage is made, it should be implemented before the first campaign. Bounces are tracked by providers, and if the bounce and complaint rates increase, the sender reputation may be throttled or suspended.
Listmonk can mark bounced addresses and stop mailing them, but this feature requires enabling it in the Settings and providing a source for the bounce notifications. A publicly reachable URL for providers to call is necessary, as well as a dedicated mailbox for Listmonk to process bounced messages. By configuring the appropriate settings and following the recommended steps, running Listmonk on Railway can be a cost-effective solution for managing newsletters and mailing lists.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.