Running your server
Where your data lives, how it is backed up, how to update, and what to do when something looks wrong.
The short version
- All on your server: files plus one SQLite database under
/opt/operationkit. No external database and no Operation Kit cloud. - Backed up every night at 03:30 (server time). The newest 7 stay on the server. Send them off the server, encrypted, with one command, and run the restore test monthly.
- Updates are manual. Nothing pulls new Operation Kit code on its own.
update.shbacks up first and prints the rollback steps. - First stop for any problem: run
verify.sh. Each FAIL line names the check.
Commands on this page run on the server. They assume the code is in /opt/operationkit-src and you log in with sudo.
Where your data lives
Everything is on your server, as files plus one SQLite database.
| Path on the server | What |
|---|---|
/opt/operationkit/state/data | The database (command-center.db), uploads, branding and model account logins |
/opt/operationkit/state/home | The knowledge base, bot files, notes, memory and project checkouts. Plain markdown that opens in any editor |
/opt/operationkit/state/tmp | Job work folders and sandbox homes |
/opt/operationkit/secrets | Generated secrets, the Cloudflare token, the setup password, and the key that decrypts stored secrets (root only) |
/opt/operationkit/backups | Nightly, pre-update and manual backups (root only) |
/opt/operationkit/logs | Build logs and backup.log |
/opt/operationkit-src | The code and client.conf (no secrets) |
Change the main folder with INSTALL_DIR in client.conf. Only secrets are encrypted at rest. If you want the rest encrypted too, see Disk encryption.
To remove an install completely, including its Cloudflare setup, data and secrets: sudo bash /opt/operationkit-src/install/uninstall.sh --config /opt/operationkit-src/client.conf --yes. It leaves Docker, the firewall and the update settings in place.
Backups
Every night at BACKUP_TIME (default 03:30, server time zone) one job writes /opt/operationkit/backups/nightly-<time>/. It holds the database (copied while the app runs, then integrity-checked), the data and home folders, the secrets and your settings, with a checksum manifest. The newest 7 (BACKUP_KEEP_LOCAL) stay on the server.
Send it off the server
A copy on the same disk doesn't survive losing the server, so send backups to a private Backblaze B2 bucket. In Backblaze, create the bucket and an application key with Read and Write access to that bucket only. Then, in your own terminal (it asks for the key, so never through a chat):
ssh -t ubuntu@<IP address> sudo bash /opt/operationkit-src/install/b2-setup.sh --config /opt/operationkit-src/client.conf
It checks the key, sets BACKUP_TARGET, sends the first snapshot, runs the restore test and ends with restore test PASS. From then on the same nightly job also sends each backup off the server. restic encrypts every copy before it leaves, and keeps one a day for 7 days, one a week for 4 weeks and one a month for 6 months. Any S3-compatible store works too: set BACKUP_TARGET by hand (see INSTALL.md → Backups and restore).
Put the backup password (OK_BACKUP_PASSWORD in secrets/stack.env) and a copy of secrets/secrets-kek in a password manager, off the server. Without the password nobody can read the off-site copies, including you. Without the key, the stored secrets in a restored database can't be read. Read them in your own terminal, never in a chat.
Test a restore
Run the restore test after the first backup and then monthly. It downloads the newest backup into a scratch folder, checks every file, archive and the database, prints RESTORE TEST: PASS or FAIL, and changes nothing:
sudo bash /opt/operationkit-src/install/backup.sh verify --config /opt/operationkit-src/client.conf
Other actions:
# back up now (label "manual", kept until you delete it)
sudo bash /opt/operationkit-src/install/backup.sh run --config /opt/operationkit-src/client.conf
# list what exists, here and off the server
sudo bash /opt/operationkit-src/install/backup.sh list --config /opt/operationkit-src/client.conf
# put a backup back on this server (moves the current data aside first)
sudo bash /opt/operationkit-src/install/backup.sh restore /opt/operationkit/backups/nightly-<time> --config /opt/operationkit-src/client.conf --yes
Recovering onto a new server after the old one is gone: INSTALL.md → Backups and restore. You need the same client.conf, the bucket keys and the saved backup password.
Updates
Operation Kit updates are manual. Nothing pulls new code on its own. The only automatic updates the installer switches on are Ubuntu's security patches. To hear about new versions, watch the repository on GitHub and read the CHANGELOG.
Update when no cards are running. The app restarts and cuts off running jobs.
sudo bash /opt/operationkit-src/install/update.sh --config /opt/operationkit-src/client.conf
# a specific version: … --ref v1.4.0 (a tag, branch or commit)
It backs up first into backups/pre-update-<time>/, keeps the running images for rollback (the newest 3), fetches the new code, re-runs the installer with your data and secrets, brings your Cloudflare setup in line with the new version, and prints the rollback steps. Then run verify.sh again.
To see which version is running, look at Build at the bottom of Settings.
Troubleshooting
Start with the full check. Each FAIL line names what to look at:
sudo bash /opt/operationkit-src/install/verify.sh --config /opt/operationkit-src/client.conf
| Symptom | Likely fix |
|---|---|
| Install stops: "cannot read the Zero Trust organization" or "cannot write Configuration Rules" | The Cloudflare token is missing a permission. Edit it (see Cloudflare sign-in and tunnel) and re-run. |
| "the app did not become healthy" | Read the app's log: sudo docker logs --tail 100 command-center. |
| Cards wait with "All Claude seats are unavailable" | No model account is free. Queued cards retry every 30 seconds and start when one frees up. If it happens often, add one in Settings → Models. |
| verify: "no Claude seat can run a sandboxed session" | Connect Claude with Settings → Models → Add Claude seat (see Connect your model), then re-run verify. |
| Someone is asked to "choose a new password" on an install with one login | The app couldn't verify Cloudflare's token. Check OK_CF_ACCESS_TEAM and OK_CF_ACCESS_AUD in secrets/stack.env and restart the app, and check the person's Sign-in email in Settings → Workspaces → Users matches exactly, on one user only. |
| "This setup password has expired" | sudo bash /opt/operationkit-src/install/admin-password.sh --config /opt/operationkit-src/client.conf issues a new one. |
| An AI app gets a Cloudflare sign-in page or error 1010 | See Key-only routes for AI apps and CLOUDFLARE-API-ACCESS.md. |
| A card looks stuck | Its sandbox may still be working: sudo docker ps | grep ok-jail. Wait for it before restarting anything. |
RESTORE TEST: FAIL | The FAIL lines say which check. Wrong password or keys: compare with your password manager. A damaged snapshot: test an older one with --snapshot <id> (ids from backup.sh list). |
| Anything else | See INSTALL.md → When something goes wrong. |
To change a setting such as your company name, the allowed emails or the time zone, edit client.conf and re-run sudo ./install.sh --config client.conf from /opt/operationkit-src.
f504a64), 11 Nov 2026Suggest an edit