Download
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
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_URLCUSTOS_LISTEN_ADDRCUSTOS_MASTER_KEY,CUSTOS_SIGNING_PRIVATE_KEY,CUSTOS_SERVER_TRANSPORT_PRIVATE_KEY
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
Expose the control plane over HTTPS
For a reverse proxy on the same server, bindcustoscp 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 HTTPSnginx with Certbot
Add this configuration to a file included from nginx’shttp context. The map supplies the
connection header for WebSocket upgrades. nginx WebSocket proxying
--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
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.