Deploy a pilot installation
Define separate domains, Compose projects, volumes, buckets, SMTP credentials, Restic repositories, and secrets for staging and production. A further organisation gets a further installation.
- Copy
infra/pilot/production.env.exampleoutside the repository. The completed file belongs to the operator account and has mode0600. - Copy the lines of
release-images.envfrom the approved GitHub release (see Release a version): version, fullLEONAID_RELEASE_COMMITand images with tag and digest. Add an external backup target. - Render and inspect the effective configuration with
docker compose ... config --format json, usinginfra/compose/compose.ymlandinfra/pilot/compose.yml. - Run
./leonaid pilot-doctor --env-file ENV --backup-manifest MANIFEST --gate pilot-deploy. Exit 0 means technically ready, 1 means a blocker, 2 means open decisions, and 3 means a STOP decision. - Deploy only an approved release manifest with
./leonaid pilot-deploy --env-file ENV --backup-manifest BACKUP --release-manifest RELEASE.
The target host does not build and exposes only Caddy on ports 80/443. Staging is optional and may run on another host, for example a VM in the club’s own network. A staging installation waits for no decision in the register. A real production start stays blocked while DNS, trusted TLS, mail, operator details, recovery target, or business decisions remain open.
Staging behind a proxy and without an SMTP account
Section titled “Staging behind a proxy and without an SMTP account”Two options make a staging VM in the club’s own network easier. The doctor
refuses both when LEONAID_DEPLOYMENT_STAGE=production.
-
LEONAID_EDGE_TLS=true: a reverse proxy or tunnel in front of the server (for example Pangolin or Cloudflare Tunnel) owns the public certificate and port 80. Caddy then uses its internal CA. The proxy forwards HTTPS to port 443 of the server, with the public host name as TLS server name (SNI). The doctor checks the public certificate through the proxy and skips the port 80 check. Leave the key out to switch it off;falseis refused. -
LEONAID_STAGING_MAILPIT=true: Mailpit plays the SMTP relay inside the stack. Nothing leaves the server. Set these keys:Terminal-Fenster LEONAID_STAGING_MAILPIT=trueLEONAID_STAGING_MAILPIT_UI_AUTH=operator:<password, at least 16 characters>MAIL_SMTP_HOST=mailpitMAIL_SMTP_PORT=465MAIL_SMTP_MODE=tlsMAIL_SMTP_CA_FILE=/run/leonaid-staging-mail/ca.pemThe stack creates a private CA for Mailpit; only the core worker and Twenty trust it. Read the mails, such as sign-in codes, at
http://SERVER:8025with the user and password ofLEONAID_STAGING_MAILPIT_UI_AUTH. Open port 8025 only to your own network. The doctor skips the mail provider check. To switch to a real SMTP account later, remove the six lines above and set the provider’s values.