Upgrading & Rollback
A Broch upgrade swaps the container image. The new image applies any pending database migrations on its first start, then serves. This page covers what every platform shares: what to do first, how to tell it worked, and how to roll back. The commands for each platform:
Before You Upgrade
Section titled “Before You Upgrade”- Back up the database. It holds Broch’s state: the Data Protection key ring, your license token, the audit log and usage counters. The image carries none. On Docker Compose, keep
.envtoo, for the master key and database password. Use your platform’s backup: a managed snapshot, orpg_dumpfor a bundled database. On the appliances, see Back Up. - Pin a version. Set the release you’re moving to, not
latest:BROCH_VERSIONin/opt/broch/.envon the Azure appliance,BrochVersionon AWS,BROCH_VERSIONon Docker Compose,image_tagon DigitalOcean,broch_imageon the Terraform modules. An upgrade should be a decision, not whatever happened to publish. - Keep
BROCH_MASTER_KEYand the database connection unchanged. The same key keeps the key ring readable, so no one has to sign in again. See At-Rest Encryption.
Upgrade
Section titled “Upgrade”Change the version and roll out with your platform’s commands. On its first start the new container runs any pending migrations, then serves.
Verify
Section titled “Verify”Watch the startup logs, then the health endpoints:
curl https://broch.{your-domain}/healthz # liveness — 200 once the process is upcurl https://broch.{your-domain}/healthz/ready # readiness — 200 once the license and database check outA clean upgrade logs Running database migrations, boots normally, and returns 200 from /healthz/ready. Active tunnels drop on the restart, and CLI clients reconnect automatically.
If a Migration Fails
Section titled “If a Migration Fails”Migrations apply as a unit on startup. If one fails, the server logs the error at Critical and refuses to start rather than serve on a half-applied schema. The container never becomes ready.
- Capture the startup log. It names the failure.
- Roll back (below) to restore service.
- Send the log to [email protected].
Rolling Back
Section titled “Rolling Back”Reverting the image alone isn’t enough. Migrations move the schema forward only, and an older image refuses to start on a migrated schema. A rollback takes two steps:
- Restore the database from the backup you took before upgrading. Docker Compose → Backup has the commands.
- Revert the image to the previous version.
That backup is your only way back, which is why step 1 of Before You Upgrade isn’t optional.
On the appliances, restore the database, then rebuild at the earlier version as in Recover.
Staying Current
Section titled “Staying Current”Broch ships as an image you control. It never updates itself and never downloads code. Watch broch-io/broch-deploy for new releases and upgrade on your own schedule. Apply security releases promptly: a deployment runs whatever version you last deployed.