Updating
import { Aside } from ‘@astrojs/starlight/components’;
CompassDocs migrates its own database schema on start, so updating is almost always just “get the new code/image and restart.” Your data is preserved.
Check for updates in the app
Section titled “Check for updates in the app”Admins can see the current version and whether a newer release is available under Settings → System → Version & updates. When you’re behind, it links to the release notes and shows the exact upgrade command below — and if you deploy the optional updater companion (next section), an Update now button applies it right from the console.
One-click updates from the admin console (0.75.0)
Section titled “One-click updates from the admin console (0.75.0)”A container can’t replace its own image, and CompassDocs deliberately never touches the Docker socket — a compromised web app must not mean a compromised host. Instead, a tiny updater companion holds the socket, listens only on the internal compose network, and does exactly one thing when the app pokes it: pull the newer image and recreate the app container.
Add this to your docker-compose.yml (and pick a long random token):
services: app: # ... your existing app service ... labels: - com.centurylinklabs.watchtower.enable=true environment: # ... existing vars ... COMPASSDOCS_UPDATER_URL: http://updater:8080 COMPASSDOCS_UPDATER_TOKEN: ${UPDATER_TOKEN}
updater: image: containrrr/watchtower restart: unless-stopped volumes: - /var/run/docker.sock:/var/run/docker.sock command: --http-api-update --label-enable --cleanup environment: WATCHTOWER_HTTP_API_TOKEN: ${UPDATER_TOKEN} # No ports published — only the app can reach it, over the compose network.Then docker compose up -d once, and Version & updates gains an
Update to vX.Y.Z now button whenever a release is out: it triggers the
updater (admin-only, written to the audit log), the app restarts on the new
image, and the console confirms the new version — usually in under a minute.
Notes:
- The button follows whatever tag your
appservice runs. Useghcr.io/mattny20/compassdocs:latest(releases also tag:latestas of 0.75.0) to follow all releases, or a:0.75-style tag to stay on a minor line. A fully pinned:0.75.0never updates. - The updater only recreates containers carrying the label — nothing else on
the host is touched, and
--cleanupremoves the old image afterwards. - No updater deployed? The panel simply keeps showing the manual command.
Docker
Section titled “Docker”From your install folder (the one with docker-compose.yml):
docker compose pull && docker compose up -dThis pulls the latest image and recreates the app container. Your data lives in a Docker volume and is untouched. Re-running the install script does the same thing.
To move between specific versions, set COMPASSDOCS_VERSION in your .env and
run the same two commands.
Manual (Node + Postgres)
Section titled “Manual (Node + Postgres)”From a release tarball (no git required)
Section titled “From a release tarball (no git required)”Every release includes a
source tar.gz. The Version & updates panel in the app shows these exact
steps with the right version filled in, plus a direct download link.
# 1. Download and extract the release (replace X.Y.Z)curl -fsSL https://github.com/mattny20/CompassDocs/archive/refs/tags/vX.Y.Z.tar.gz | tar -xzcd CompassDocs-X.Y.Z
# 2. Bring over your configurationcp /path/to/your/current/.env .
# 3. Buildnpm ci && npm run build
# 4. Stop the old server, then start the new buildnpm run startOnce the new version is up, the old directory can be deleted — your data lives in PostgreSQL, not the app directory.
From a git clone
Section titled “From a git clone”# 1. Stop the running server (Ctrl+C)
# 2. Get the latest codegit checkout maingit pull origin main
# 3. Install dependenciesnpm install
# 4. Start againnpm run dev # or: npm run build && npm run startVersion notes
Section titled “Version notes”- 0.49 switches the bundled compose files from
postgres:16topgvector/pgvector:pg16to enable semantic search. It’s a drop-in superset of the same PostgreSQL major version — pull the new compose file (or edit the image line) and your existing data volume upgrades in place. Installs using an external PostgreSQL install thepgvectorextension instead; without it, everything else works and semantic search reports itself unavailable.
Rolling back
Section titled “Rolling back”With Docker, pin the previous version via COMPASSDOCS_VERSION and
docker compose up -d. Migrations are additive, so rolling the app back is
generally safe — take a database backup before any
upgrade you’re unsure about.
One exception: 1.0 drops the three legacy per-space grant tables, so going back below 0.99 after starting 1.0 loses private-space membership and per-space edit rights. That is the one upgrade where the backup isn’t optional.
