Upgrades
Move to a new version: read the upgrade notes, back up, pull, start; the migrations run on start.
Upgrade
-
Read the upgrade notes of every release since yours, in the changelog (also
CHANGELOG.mdand the releases on GitHub): migrations, settings added, changed or removed, and breaking changes. -
Take a backup:
docker compose run --rm backup nowSee Backups.
-
Set the new version. Set
OPENFOLIA_VERSIONindeploy/.envto it, then:git fetch --tags && git checkout vX.Y.Z docker compose pull docker compose up -d --waitThe checkout moves to the same version (
vX.Y.Z, as inOPENFOLIA_VERSION), socompose.yamlis the new version's too.docker compose pullfetches every image of that version, the backup image included; add--profile mcpwhen you run the MCP server.When you build from source:
git pull, thendocker compose -f compose.yaml -f compose.build.yaml up -d --build --wait, or rundeploy/self-host.shagain (it keeps the settings, the volumes and the content). -
Check the log. The API applies pending migrations when it starts, before it answers requests, and logs
Migrations applied. The workers start once it has.
Migrations only go forward. To go back to an older version, restore the backup from step 2.
Several API servers on one database
Upgrade them together. Or set CCMS_DATABASE_MIGRATE=false on all of them and run the migrations
once yourself:
docker compose run --rm api node dist/database/migrate.main.jsHow long a migration statement waits for a table lock is CCMS_DATABASE_LOCK_TIMEOUT_MS (default
10 s); see Database.
Switching to Postgres with pgvector
Semantic search needs Postgres with pgvector (Semantic
search). deploy/compose.vector.yaml builds the same Postgres
18.7 with pgvector added, on the same volume, so switching needs no dump or restore. Take the backup
first anyway:
docker compose -f compose.yaml -f compose.vector.yaml up -d --build --waitName both files in every later docker compose command, or set
COMPOSE_FILE=compose.yaml:compose.vector.yaml in deploy/.env.
Moving to separate workers
Versions before the worker role ran everything in the api service. Now deploy/compose.yaml
starts the API with CCMS_ROLE=api and the background work in worker. Both read api.env, so a
CCMS_PDF_WORKERS there now sizes the API's own pool too: move it, with CCMS_RENDER_CONCURRENCY,
into deploy/worker.env. See Workers.
From a version before the name OpenFolia
Versions before the product was named OpenFolia keep working after the upgrade, with these differences:
- Settings: unchanged. The API's, the workers' and the MCP server's settings keep their
CCMS_prefix, the secret key stays in/data/ccms-secret.keyand the databases keep their names. - The configuration file of a content repository is
openfolia.yaml. A repository that still hasccms.yamlis read from it for one more release, with a deprecation warning in the log (OPENFOLIA_LEGACY_CONFIG); the first change to the settings in the editor writesopenfolia.yaml, which wins from then on. Rename the file in the repository (git mv ccms.yaml openfolia.yaml) to be done with it, best when no change set still changes the settings: a merge refuses such a change set's change toccms.yamlas a conflict. - Commands:
openfolia-mcp,openfolia-tracker-connectorandopenfolia-wiki-markup; theccms-*names still start them for one release. - Own templates and styles: the names a Typst template reads (
sys.inputs.at("openfolia-design"), the states"openfolia-labels","openfolia-document"and"openfolia-design", the compiler's folderopenfolia/) and the classes of the HTML output (of-content,of-safety, …) changed with the name: replaceccms-andccms/in an own template, and.ccms-in your own styles. - Monitoring: the audit log's syslog messages name the application
openfoliaand webhook deliveries sendUser-Agent: openfolia-webhooks/1: update a rule or an allow-list that matches the earlierccmsnames. TheX-Ccms-*headers, a webhook's signature among them, stay. - Sign-in: everyone signs in once more after the upgrade (the session cookie is
__Host-openfolia-sessionnow). - What the editor kept in the browser (the colour scheme, a collapsed sidebar, recently opened content, dismissed tips) starts afresh after the upgrade; unsaved drafts stay.