Skip to main content

Download

For an ARM64 server, replace amd64 with arm64. Use latest.txt rather than hard-coding a version; it contains the current version string, and the tarball path includes that version.

Generate keys

Prints an env-format bundle:
Treat the bundle as the crown jewels and keep it off terminal scrollback and shell history. Redirect it straight to a root-only file: custoscp gen-keys > /root/custos-keys && chmod 600 /root/custos-keys. Losing CUSTOS_MASTER_KEY means losing every stored secret.

Configure

The control plane reads everything from process environment variables and does not load .env files itself. Supply them through your shell, service manager, or deployment platform. Minimum:
  • CUSTOS_DATABASE_URL
  • CUSTOS_LISTEN_ADDR
  • CUSTOS_MASTER_KEY, CUSTOS_SIGNING_PRIVATE_KEY, CUSTOS_SERVER_TRANSPORT_PRIVATE_KEY
Full annotated list in Configuration.

Migrate and seed

migrate up creates the schema and is required before create-admin. create-admin prints a generated password unless you pass --password. Both accept --database-url if you would rather not set CUSTOS_DATABASE_URL in the environment. Migrations are embedded in the binary, so the binary and its schema always ship together.

Run

For a production deployment, run it under systemd with secrets in the encrypted credential store — see Running under systemd.

Expose the control plane over HTTPS

For a reverse proxy on the same server, bind custoscp to 127.0.0.1:8123 with CUSTOS_LISTEN_ADDR. Point your API hostname at the proxy and allow inbound TCP ports 80 and 443. Replace api.custos.example.com with your hostname and use the port your control plane listens on. The proxy forwards the API and the daemon’s WebSocket at /daemon to the same upstream. If you already have a TLS proxy or load balancer, use it and enable WebSocket upgrades on that route.

Caddy

Add this site to your Caddyfile and reload Caddy. Caddy obtains and renews the certificate, redirects HTTP to HTTPS, and proxies the WebSocket automatically. Caddy automatic HTTPS

nginx with Certbot

Add this configuration to a file included from nginx’s http context. The map supplies the connection header for WebSocket upgrades. nginx WebSocket proxying
With Certbot’s nginx plugin installed and port 80 reachable from the internet, validate and load the HTTP config, then let Certbot configure HTTPS. Certbot nginx instructions If Cloudflare proxies the hostname, use Full (strict) once nginx has a valid certificate. Flexible sends HTTP to nginx and loops if nginx redirects those requests to HTTPS. Cloudflare redirect troubleshooting
Use --no-redirect if your setup requires Certbot to skip adding the HTTP-to-HTTPS redirect. If you use certbot certonly, configure the certificate and port 443 in nginx yourself.

Verify the public URL

Use the HTTPS base URL for API clients and host enrollment. After enrolling a host, run custosd status on it to check the daemon connection. If a CDN or another proxy sits in front of this proxy, see Client IPs behind a proxy.

Health endpoints

Point your load balancer at /readyz and your process supervisor at /livez.