Upgrade
Move an installation to a new Orlok version safely.
Upgrades fetch the new code and rebuild the containers, keeping the data: the database lives in the
orlok_db-data volume and migrations are applied automatically when the app starts.
Versioned releases with a changelog are planned. Until then, an upgrade moves the installation to the latest version of the
mainbranch.
Before you start
-
Note the installed version, which you need to go back:
git rev-parse HEAD -
See what changed after your version:
git fetch git log --oneline HEAD..origin/main -
Back up the database and
.env.production, which holdsORLOK_SECRET_KEY: without the key, saved provider keys and credentials cannot be decrypted. -
Plan a short maintenance window: running conversations and jobs are interrupted while the app restarts.
Upgrade
From the repository folder, fetch the new version:
git pull
Compare your .env.production with .env.production.example: add any new setting before starting.
Then rebuild and restart:
docker compose --env-file .env.production up -d --build
If you use a derived runner image, rebuild it on the new
orlok-runner before restarting.
Watch the app start and apply migrations:
docker compose --env-file .env.production logs -f app
When the app answers again, sign in and check an office, a conversation and the wiki.
Customizations
.env.production is not part of the repository, so git pull leaves it alone. Do not edit
compose.yaml or the other files of the repository, because git pull would stop on a conflict. Put
your container changes in a compose.override.yaml file in the same folder: Docker Compose merges it
into compose.yaml on its own.
If something goes wrong
Migrations only move forward, so going back to the previous code is not enough: the database already has the new schema, and the backup must be restored into an empty database. Go back to the version noted before the upgrade, recreate the database, restore the backup taken before the upgrade and start:
docker compose --env-file .env.production down
git checkout <noted version>
docker compose --env-file .env.production up -d db
docker compose --env-file .env.production exec -T db dropdb -U orlok orlok
docker compose --env-file .env.production exec -T db createdb -U orlok orlok
docker compose --env-file .env.production exec -T db \
pg_restore -U orlok -d orlok < orlok-2026-01-31.dump
docker compose --env-file .env.production up -d --build
If you changed POSTGRES_USER or POSTGRES_DB, use those values instead of orlok. To receive
upgrades again, bring the repository back to main with git checkout main.