PLATINUM DOCS
Self-hosting

Configuration

The control plane settings in .env, and the runtime settings you change through the admin API.

The control plane reads its settings from infra/compose/.env. setup.sh writes a short one, and every setting is documented in env.example next to it.

Change a setting

Edit .env, or re-run setup.sh with the flag, then recreate the containers.

# on the control plane, in platinum/infra/compose
docker compose up -d

Re-running setup.sh keeps every value you do not pass, and never rotates a secret.

Know the derived values

Compose derives these, so .env stays short. Set one only to override it.

SettingDerived as
PT_PUBLIC_API_URLhttps://<PT_DOMAIN>. The URL clients, SDKs and hosts use. Baked into every install command.
PT_AUTH_BASE_URLThe API URL. Used for sign-in callbacks and session cookies.
PT_API_HOST<PT_DOMAIN>
PT_PUBLIC_APP_ORIGINhttps://<PT_CONSOLE_DOMAIN>, else the API URL. Used in emails and redirects.
PT_POSTGRES_BIND, PT_S3_BINDPT_PRIVATE_IP, else 127.0.0.1
PT_CP_ADVERTISE_IPPT_PRIVATE_IP. Hosts accept :18048 only from it.
PT_EDGE_DATABASE_URLPostgres at PT_PRIVATE_IP. Given to each host's edge proxy.
PT_S3_ENDPOINThttp://<PT_PRIVATE_IP>:<PT_S3_PORT>, the bundled store

Set endpoints and images

Keep the secrets

setup.sh generates all of these once. Back them up with .env.

Control accounts and sign-in

Send email

Without a provider, the server logs each message's subject and recipient and sends nothing.

SettingMeaning
RESEND_API_KEYSend through Resend
MAILTRAP_API_TOKENSend through Mailtrap
EMAIL_FROM_EMAIL, EMAIL_FROM_NAMEThe sender

Connect object storage

SettingDefaultMeaning
PT_S3_ENDPOINTthe bundled storehost[:port] (HTTPS) or a full http(s)://host[:port] URL
PT_S3_REGIONus-east-1
PT_S3_BUCKETplatinum
PT_S3_PREFIXemptyKey prefix inside the bucket
PT_S3_ACCESS_KEY, PT_S3_SECRET_KEYgenerated for the bundled store
PT_S3_PORT9000Port the bundled store is published on
PT_CAS_GC_IN_PROCESS1Runs the nightly storage garbage collection inside the server

The installer copies the PT_S3_* values to each host. See Object storage.

Change runtime settings

Some settings live in the database and change live, with no restart. Set one with the admin token.

curl -s -X PUT https://api.example.com/internal/admin/config/flags.volumes_enabled \
  -H "Authorization: Bearer $ADMIN_TOKEN" -H 'content-type: application/json' \
  -d '{"value":true}'

DELETE on the same path returns a key to its default.

KeyDefaultMeaning
flags.volumes_enabledfalsePersistent volumes. Needs object storage.
flags.vol_v1_enabledfalseThe current volume format. Needs flags.volumes_enabled.
placement.regionseu-west, us-eastMap of public region to the datacenter names hosts register with
overcommit.ram_alloc_ratio0.8Share of a host's RAM that sandboxes may be allocated
overcommit.host_cpu_refuse_pct85No new sandboxes on a host above this measured CPU use

placement.regions replaces the whole map, so include every region you keep:

curl -s -X PUT https://api.example.com/internal/admin/config/placement.regions \
  -H "Authorization: Bearer $ADMIN_TOKEN" -H 'content-type: application/json' \
  -d '{"value":{"eu-west":{"label":"EU West","datacenters":["eu-west"]},
                 "lab":{"label":"Lab","datacenters":["lab"]}}}'

A fresh install with no STRIPE_SECRET_KEY starts with billing off.