Updating CloudPeek

Updating is an in-place upgrade from a newer installer tarball. CloudPeek does not fetch new versions on its own, so an update always starts with a new bundle from your CloudPeek contact.

Before you start

Verify and extract the new tarball's signature exactly as described in Prerequisites. Never point cpk update at a tarball whose signature you have not checked.

Run the update

From your existing install directory, point cpk at the new tarball:

cd cloudpeek
./cpk update --new /path/to/cloudpeek-installer-v<version>-<platform>-<arch>.tar.gz

--new is required. Add -y to skip the confirmation prompt for unattended runs.

The automatic pre-update backup

Before it changes anything, update writes a full rollback point to backups/pre-update-<version>-<timestamp>/ in your install directory:

FileContents
globals.sqlCluster-wide roles, role passwords and grants.
<database>.dumpA compressed pg_dump of each database — cloudpeek, zitadel and any others on the cluster.
secrets/A copy of .secrets/ as it was before the upgrade.
RESTORE.mdThe exact commands to restore this backup.
manifest.jsonVersions and metadata.

The dump is taken from the running Postgres container, so nothing is stopped and there is no downtime. It happens after the new tarball has been validated and before the first irreversible step, so a failed backup leaves your install exactly as it was.

Warning

The secrets/ copy is part of the backup, not an extra. Zitadel encrypts rows in its database with the value in .secrets/zitadel_masterkey — restoring the zitadel database against a different masterkey gives you a database whose rows cannot be decrypted. If you restore the databases, restore .secrets/ with them.

The backup therefore contains live credentials. It is written mode 0700 with 0600 files; keep it that way, and move it off the host if you are retaining it.

If the backup cannot be taken, the update stops. That is deliberate: continuing into an irreversible upgrade because the safety net failed is the outcome the backup exists to prevent. Two flags control it:

FlagWhat it does
--skip-backupUpgrade without a backup. Use when you snapshot the host yourself, or on an install backed by a managed database.
--backup-dir PATHWrite the backup somewhere other than backups/ — for example a volume with more room.

Backups are kept until you remove them

Nothing prunes backups/. One is added per upgrade and none are ever deleted automatically — auto-removing a rollback point is not a decision the installer should make for you. update refuses to start if the filesystem does not have room for a new backup, but it will not reclaim space to make room.

So that the growth stays visible, each run reports the size of the backup it just took and the running total once more than one exists:

✔ Backed up 3 database(s) and .secrets/ to backups/pre-update-0.19.7-20260922T120546Z (1.0 MiB)
[INFO ] backups/ now holds 2 backups totalling 2.1 MiB. They are never pruned automatically — delete old ones when you no longer need them.

./cpk uninstall asks separately whether to remove them, because they outlive the install they came from and still contain its credentials. Answering "no" keeps them; delete them by hand when you no longer need them.

Installs whose DATABASE__URL points at a managed or external database (RDS and similar) cannot be dumped through the compose stack. For those, take a snapshot through your provider and then run with --skip-backup.

What update preserves, and what it replaces

Your data is kept. update never runs docker compose down, so Postgres, Zitadel, Redis and Neo4j hold their volumes and stay up through the upgrade.

Your files are not. Every entry that exists in the new tarball replaces the copy in your install directory, and the cpk binary itself is swapped at the end. Anything the tarball does not ship survives, which covers .secrets/, volumes/ and any extra files you added yourself.

Warning

Local edits to compose.yml, traefik/, opa/ or any other bundled file are overwritten by an update. Keep customisations in .secrets/ or in your own compose override file, or re-apply them after each upgrade.

Steps that can be re-run afterwards

update finishes with two follow-up steps that are allowed to fail without failing the upgrade, because neither decides whether the new version runs. If either reports a problem, the upgrade itself succeeded and you simply run the command it names.

The identity-provider role sync. If the update reports that it did not run, repair the role catalogue with ./cpk sync-zitadel-roles. That happens in two cases: the sync failed after its retries, or it was skipped because the Zitadel environment variables could not be read.

The migration step. After swapping the binary, update runs migration with the previous version: ./cpk migration --last-version <previous-version>. This applies the one-time reconciliation steps introduced since the version you were on. If that step reports a failure, run it yourself with the version the update prints:

./cpk migration --last-version 0.8.34

Migrations are idempotent, so re-running is safe. It applies only the steps introduced between the version you give it and the installed version, which means a repeat run does nothing and a version at or above the current one reports that there is nothing to do.

© 2026 CloudPeek. Agentic AI for high-consequence security operations.