Skip to content

Add a domain

The agent configures the reverse proxy and the DNS record during a deploy, with credentials you give it once. The workflow never sees them.

1. Configure the integrations on the server

Section titled “1. Configure the integrations on the server”
Terminal window
sudo statio init integrations

The wizard writes both settings into the agent config. Re-run it any time to change one value: it fills every answer with the current one.

For NPMplus it asks two separate things:

  • Admin API URL, how the agent reaches NPMplus. The agent runs on the host, so this is loopback: https://127.0.0.1:81.

  • Data-plane mode, how NPMplus reaches your app:

    ModeForward targetPick it when
    loopback (default)127.0.0.1:<port> on the hostNPMplus runs on the host network
    containeryour app’s slot name over a shared docker networkNPMplus and your app share a docker network

In container mode the wizard also asks for the shared network name, such as statio-edge. Attach NPMplus to that network yourself; statio attaches your app on deploy.

The agent reads its config at boot, so accept the restart the wizard offers at the end.

The server decides which domains an app may claim. Run the app wizard and answer yes to “Expose a public domain?”, or pass the suffixes as flags:

Terminal window
sudo statio app edit api --proxy-domain-suffix example.com --dns-domain-suffix example.com

The agent rejects a deploy that asks for a domain outside the allowed suffix.

proxy: { domain: api.example.com }
dns: { domain: api.example.com }

Both blocks sit at the root of the file, at column 0, never inside a service.

On the next deploy the agent creates or updates the proxy host in NPMplus and the A record in Cloudflare, after the container passes its health check.

statio creates the proxy host. Request the certificate in the NPMplus UI, under that host’s SSL tab, once the first deploy has created it.

The Action runs a read-only preflight before every deploy. Run the same check by hand:

Terminal window
statio preflight --target statio.your-tailnet.ts.net --service api \
--image ghcr.io/your-org/api --digest sha256:…

It fails with [proxy_unconfigured] when the server has no NPMplus, and with [proxy_unreachable] when it cannot reach it. See error codes.