Install Cake
The same script installs and upgrades Cake. A production install resolves and pins a release. A staging install follows the moving image tag built from every push to main.
Production
Section titled “Production”For the quickest install, replace the example hostname and run:
curl -fsSL https://github.com/Tctcl/cake-harness/releases/latest/download/install.sh | sudo bash -s -- --domain cake.example.comTo inspect the script before running it as root, download it first:
curl -fsSL https://github.com/Tctcl/cake-harness/releases/latest/download/install.sh -o install.shless install.shsudo bash install.sh --domain cake.example.com --acme-email you@example.com--acme-email defaults to admin@ followed by your domain. The default version is latest, which the installer resolves to a concrete X.Y.Z release before writing the image configuration.
Staging
Section titled “Staging”Staging has no tagged release bundle. Run the installer from a checkout of main:
git clone https://github.com/Tctcl/cake-harness.gitcd cake-harnesssudo bash deploy/install.sh --channel staging --domain staging.example.com --acme-email you@example.comThe installer assembles the same flat installation directory from deploy/ and infrastructure/ that a release bundle provides. The project’s own staging app runs at https://cake.tctcl.de; use your own hostname for another install.
Development is not an installation channel. A checkout uses the repository’s development commands instead, and --channel dev is refused.
Installer flags
Section titled “Installer flags”| Flag | Meaning |
|---|---|
--version X.Y.Z |
Release to install. Defaults to latest; X.Y.Z and latest are accepted. Not valid with --channel staging. |
--channel production|staging |
Channel to follow. Defaults to the channel already recorded in .env, or production for a first install. |
--domain HOST |
Bare hostname to serve. Required for a first install. |
--acme-email ADDR |
Let’s Encrypt contact. Defaults to admin@HOST when a domain is supplied. |
--admin-user NAME |
Username for the first owner account. Defaults to admin; created only once. |
--dry-run |
Print the changes without making them. Does not require root. |
-h, --help |
Print usage. |
Re-running the installer without --channel preserves the existing channel. A staging install therefore does not silently switch to production.
What the installer does
Section titled “What the installer does”Each step is idempotent:
- Validate the channel, version, domain, architecture, and privileges.
- Resolve the release and the product, workspace, and secrets-store images.
- Install Docker from Docker’s apt repository when Compose is unavailable.
- Put the deployment bundle in
/opt/cake-harness. - Create
/var/lib/cake-harnessand itstraefik,workspaces, andbackupsdirectories. - Create the
cake-updatergroup with gid1001and the/run/cakeruntime directory. - Write
/var/lib/cake-harness/.envonce, with generated database and encryption secrets. On later runs, update only the channel/version/image settings. - Generate the secrets-store keyfile, initialise its database, and create the
cake-backendreader consumer. - Pull the images and start Compose with
--remove-orphans. - Wait up to two minutes for the app’s
/healthendpoint, then create the first owner account with a generated password. - Install and enable the
cake-updater.socketsystemd unit. - Print the installed version, paths, credentials location, and URL.
First-run credentials
Section titled “First-run credentials”The root-only file /var/lib/cake-harness/first-run-credentials contains the initial owner username/password and the secrets-store admin API key:
sudo cat /var/lib/cake-harness/first-run-credentialsMove these values to a password manager and delete the file. Re-running the installer does not reset an existing owner password, rotate the database password, or regenerate encryption keys.
Back up /var/lib/cake-harness/ciphergate/gateway.key separately from its database. The keyfile can decrypt every value in the secrets store.
Finish the network setup
Section titled “Finish the network setup”Point the domain’s A/AAAA record at the server and allow 80/tcp and 443/tcp (plus 22/tcp if needed). Once Traefik obtains the certificate, open https://your-domain and continue with First steps.