I wanted to play about with Listmonk and it’s available as a Docker image, so I figured I’d just install it on my Unraid box. It doesn’t have a recipe in Community Apps but it’s not usually hard to reverse-engineer an official installation guide into something that “just works” on Unraid. After a first attempt failed, I looked around for a quick how-to guide online and mostly found… a mixture of people similarly failing to get it working or else having a kindly stranger offer to help… but not on the open Web where the rest of us can benefit from their knowledge. Sigh.
So I resolved that when I figured it out, I’d document the steps so that the next person after me can have an easier job of it.
Installing Listmonk on Unraid
-
Install Postgres if you don’t have it already. I used the
postgresql15
image from Community Apps. -
Set up a role and database. To do this, log in to your Postgres database using your favourite Postgres client and run, for example:
CREATE USER listmonk WITH LOGIN PASSWORD 'my-listmonk-db-password';
CREATE DATABASE listmonk OWNER listmonk; -
Create a Listmonk configuration file. I created a
listmonk
share and put it in there, calling it/listmonk/config.toml
, but anywhere on your Unraid server will do. There’s a sample configuration in the repository. You’ll probably want to change:-
[app] address: change to
0.0.0.0:9000
to listen on all interfaces so you can access it from elsewhere on your network (might not be needed if you intend to proxy with a host-networked reverse proxy server) - [app] admin_username / admin_password: obviously change these – this is how you’ll log in to your Listmonk system
- [db] host: if your Postgres container and/or Listmonk container is running in bridged networking mode rather than host networking mode, you’ll need to change this to the name or IP address of your Postgres server
- [db] password: set to the password you chose for the listmonk user on your Postgres server
-
[app] address: change to
-
Add a Listmonk container. In Unraid, on the Docker tab, click the Add Container button. A minimal configuration might look like this:
- Name: Listmonk
-
Repository:
listmonk/listmonk:latest
- Network Type: consider using Host to simplify your [db] setup, above.
- Add a Port with Name:
HTTP
and Host Port:9000
. Then fill in9000
as the value (or whatever port you want to run Listmonk on) - Add a Path with Name:
Config
and Container Path:/listmonk/config.toml
. Set the Host Path to wherever you put the Listmonk configuration file, e.g./mnt/user/listmonk/config.toml
.
- Start the Listmonk container and watch it stop. When you click “Apply” the container will start, run for a few seconds, and then stop. If you want, look at the logs and you’ll see what the problem is: it needs to be started in a different way in order to set up the database. Instead, what we’ll do is spin up a new Listmonk container just for that purpose (and then throw it away).
-
Start Listmonk in “install” mode. SSH into your Unraid server itself and run, e.g.
Substitute
docker run --rm -ti --net='host' -e TZ="UTC" -v '/mnt/user/listmonk/config.toml':'/listmonk/config.toml':'rw' listmonk/listmonk:latest ./listmonk -- --install/mnt/user/listmonk/config.toml
for whatever path your configuration file is at, if applicable. You’ll be prompted with the messages “** first time installation **”, “** IMPORTANT: This will wipe existing listmonk tables and types in the DB ‘listmonk’ **”, and then asked “continue (y/N)?”. Press “y” and the installation will complete. - Start the Listmonk container again. This time it’ll stay running and you’ll be able to access the Web interface via e.g. https://your-unraid-server:9000/
Hope that helps somebody!