Since we’re living in times of enshittification and you can’t trust newsletter services like Mailjet or Mailchimp anymore to be usable in a few years or months unless you are a company who can afford their services, it’s good to look for other viable options - like selfhosting a newsletter manager. I’m using listmonk for this as I found it is intuitive to use, fairly easy set up and the admin interface looks pleasingly non-bloated. You can simply install it with Docker. However, I was following this guide for installing it with the binaries. You should be able to have it up and running pretty fast with this guide, but it doesn’t say how to configure your Apache server for your listmonk installation.
My listmonk is running on the same server as my website and is accessible from a subdomain like https://newsletter.myparty.de
. So I had to configure Apache as a reverse proxy that routes traffic coming to newsletter.*
to the listmonk service which is running on port 9000
(if you followed the above tutorial).
First, in order to use Apache as a reverse proxy enable the respective modules:
sudo a2enmod proxy proxy_http
Next, create a seperate Apache config file with sudo touch /etc/apache2/sites-available/newsletter.conf
and edit it with sudo nano /etc/apache2/sites-available/newsletter.conf
, pasting in the following configurations:
Now, we have to enable our new site: sudo a2ensite newsletter
- and restart apache: sudo systemctl restart apache2
. You also have to make sure, by the way, that you’ve got an A or AAAA record set up for the newsletter.*
subdomain at your domain registrar, otherwise, in the next step, Certbot will complain.
So, enable HTTPS for your subdomain with sudo certbot --apache
. Certbot will do everything for you and you should end up with a newsletter-le-ssl.conf
file in your sites-available
folder. Restart Apache again and make sure everything is running: sudo systemctl status
.
listmonk should now be available under https://newsletter.myparty.de
.
For reference, here’s what your config.toml
should basically look like: