answerLoopsanswerLoopsDocs
Self-hosting guide

Upgrading

How to update your self-hosted answerLoops instance.

This page shows how to move your self-hosted instance to a newer version and how to go back if something looks wrong. When you are done, you are running the new version with your data intact and a backup you can fall back on.

The upgrade flow: back up first, fetch the new version, restart, let migrations run on startup, then confirm the instance is healthy.

Upgrade

Back up your database. Do this before every upgrade. With the bundled Postgres from the default compose file:

docker compose exec postgres pg_dump -U community community > backup.sql

With your own Postgres, use pg_dump against your DATABASE_URL, or your provider's snapshot feature.

Get the new version and restart.

The compose file always pulls the image before starting, so restarting is enough:

docker compose -f docker-compose.ghcr.yml up -d

If you pinned a version, change ANSWERLOOPS_IMAGE to the new tag first.

Let the migrations run. The app applies any new database changes automatically when it starts, so there is nothing else to run. Watch it happen in the logs:

docker compose logs app --tail=50

Each change appears as an [migrate] applying line. If a migration fails, the app stops starting and the log names the file that failed.

Verify. Confirm the app is healthy:

curl https://<your-domain>/api/health

You should see {"ok":true}. Then sign in and open the dashboard.

Keep your data volume. Never run docker compose down -v during an upgrade: it deletes the database volume and everything in it.

Check which migrations have run

Applied migrations are recorded in a table named __custom_migrations. With the bundled Postgres:

docker compose exec postgres psql -U community -d community \
  -c "SELECT * FROM __custom_migrations ORDER BY applied_at DESC LIMIT 5;"

Roll back

answerLoops does not ship automatic rollback tooling. To go back to a previous version, return to the previous code or image and restart:

Set ANSWERLOOPS_IMAGE to the earlier tag and run docker compose -f docker-compose.ghcr.yml up -d.

Rolling the code back does not undo database changes. New columns and tables are generally harmless to an older version, but a change that removed something can cause problems. Review the migration changes before rolling back, and restore your backup if the older version will not start.

Check your current version

For a source checkout:

git log --oneline -1

For a published image, the tag in ANSWERLOOPS_IMAGE is your version.

Where to go next

On this page