Skip to content

CLI

statio --help groups the commands the way this page does.

Setup and app commands run on the server, as root. status and logs --target run from a machine on the tailnet, such as your laptop or a CI runner. The server’s own OS is not a tailnet peer, since the agent runs Tailscale in userspace, so statio status cannot query the agent from the server itself. Use statio doctor there.

CommandWhereWhat it does
statio init serverserverWrites the agent config and the systemd unit, then enables and starts statio-agent.
statio init integrationsserverConfigures NPMplus, Cloudflare, and the pinned public IP. Idempotent.
statio init repoyour repoWrites statio.yaml and prints or generates the workflow.
FlagDefaultMeaning
--hostnamedetectedThe tsnet MagicDNS hostname.
--ts-oauth-client-idThe agent’s Tailscale OAuth client id.
--ts-oauth-secret-stdinfalseRead the client secret from stdin.
--ts-oauth-secret-fileRead the client secret from a file.
--issuerThe cosign OIDC issuer.
FlagDefaultMeaning
--targetThe agent’s MagicDNS host, for the printed snippet.
--serviceThe service name.
--imageThe image repository.
--branchmainThe deploy branch, for the printed cosign identity.
--workflowdeploy.ymlThe workflow file name, for the printed identity.
--create-workflowfalseGenerate a starter deploy.yml when none exists.
--out.github/workflows/deploy.ymlWhere to write it.
--statio-outstatio.yamlWhere to write the starter statio.yaml.
--action-refaccentiostudios/statio@v1The Action ref used in the snippet.

init repo never edits an existing workflow. It prints the step for you to paste.

CommandWhat it does
statio app add [name]Accepts an app: its image repository, its cosign signer, its allowed domains.
statio app listLists accepted apps, then lets you view one’s config or edit it.
statio app edit <name>Re-runs the wizard with the current values filled in.
statio app rm <name>Stops accepting an app’s deploys and frees its host port.
statio env set <svc> KEY=VALUESets a server-side base env key.
statio env set <svc> KEY --secret-stdinReads the value from stdin and stores a secret reference.
statio env list <svc>Lists base keys, with secret and protected values redacted.
statio env rm <svc> KEYRemoves a base key.
FlagDefaultMeaning
--imageThe image repository, compared for equality on every deploy.
--repoowner/repo or a URL. The app’s signing identity.
--workflowdeploy.ymlThe workflow file of the signing identity.
--branchmainThe branch allowed to deploy.
--issuerThe cosign OIDC issuer.
--registriesdocker.io,ghcr.ioRegistries allowed for dependency images.
--proxy-domain-suffixDomain suffixes this app may claim on the proxy.
--proxy-upstreamAllowed upstream containers.
--dns-domain-suffixDomain suffixes this app may claim in DNS.
--rollbacktrueRoll back when the health check fails.
--max-services10Cap on services in one deploy.
--services-dir/etc/statio/servicesWhere manifests live.
--state-dir/var/lib/statioWhere the port registry lives.

app rm takes -y to skip its confirmation.

FlagMeaning
--secret-stdinRead the value from stdin and store a secret reference.
--protectedCI cannot override this key. A deploy that tries fails with 422 [protected].
--requiredA deploy must supply this key, or it fails with 422 [required].
CommandWhat it does
statio status --target <host>Queries the agent’s /status and prints its health and the apps it accepts.
statio logs <svc>Reads the local deploy audit log on the server.
statio logs <svc> --target <host>Fetches a remote agent’s log over the tailnet, redacted.
FlagDefaultMeaning
--targetThe agent’s MagicDNS host, such as statio.your-tailnet.ts.net.
--limit20Records to show.
--jsonfalseEmit raw JSON records.
--state-dir/var/lib/statioWhere the local log lives.
CommandWhat it does
statio upgradeDownloads the latest release, verifies its checksum, replaces the binary, restarts the agent when it runs.
statio doctorChecks the environment and reports what is missing.
statio versionPrints the version. Same as statio --version.
FlagCommandMeaning
--checkupgradeReport whether a newer version exists, and install nothing.
--no-restartupgradeReplace the binary and leave the service alone.
--versionupgradeInstall an exact version, such as v1.2.3.
-yupgradeSkip the confirmation.
--fixdoctorApply the safe repairs: create a missing state directory, tighten a secret’s permissions, restart a crash-looping agent. Needs root.
--configdoctorPath to the agent’s config.yaml.

statio doctor runs the same secret-file check the agent runs at boot, so a missing or world-readable secret shows up here instead of as a crash loop. When the service is down it prints the agent’s last log line. Run it with sudo on a server for the full picture.

The CLI checks for a newer release once a day and prints a line when it finds one. Set STATIO_NO_UPDATE_CHECK=1 to silence it.

CommandRun by
statio agent run --config <path>systemd
statio deploy …the GitHub Action
statio preflight …the GitHub Action

Both take the same inputs. preflight posts the same signed payload to the agent’s read-only /preflight endpoint, which checks the host port and the proxy and DNS readiness and changes nothing.

FlagDefaultMeaning
--targetThe agent’s MagicDNS host. Also the signed audience.
--serviceThe service slot, accepted on the server.
--imageThe image repository, with no tag or digest.
--digestThe image digest, sha256:….
--statio-filestatio.yamlPath to the repo’s statio.yaml.
--audience--targetOverride the signed audience.
--strictfalseTreat success_degraded as a failure.