Upgrade¶
Some versions may require changes to the database. These changes or database "migrations" are applied automatically and safely, but, it is recommended to take a backup of the Postgres database before running the --upgrade option, especially if you have made customizations to the database tables.
Binary¶
- Download the latest release and extract the listmonk binary.
./listmonk --upgradeto upgrade an existing DB. Upgrades are idempotent and running them multiple times have no side effects.- Run
./listmonkand visithttp://localhost:9000.
Docker¶
docker compose pullto pull the latest version from DockerHub.docker compose run --rm app ./listmonk --upgradeto upgrade an existing DB.- Run
docker compose up app dband visithttp://localhost:9000.
Railway¶
- 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".

Downgrade¶
To restore a previous version, you have to restore the DB for that particular version. DBs that have been upgraded with a particular version shouldn't be used with older versions. There may be DB changes that a new version brings that are incompatible with previous versions.
General steps:
- Stop listmonk.
- Restore your pre-upgrade database.
- If you're using
docker compose, editdocker-compose.ymland changelistmonk:latesttolistmonk:v2.4.0(for example). - Restart.
Example with docker:
- Stop listmonk (app):
sudo docker stop listmonk_app - Restore your pre-upgrade db (required) (be careful, this will wipe your existing DB):
psql -h 127.0.0.1 -p 9432 -U listmonk drop schema public cascade; create schema public; \q psql -h 127.0.0.1 -p 9432 -U listmonk -W listmonk < listmonk-preupgrade-db.sql - Edit the
docker-compose.yml:x-app-defaults: &app-defaults restart: unless-stopped image: listmonk/listmonk:v2.4.0 - Restart:
sudo docker compose up -d app db nginx certbot