Deploy to several servers
statio works per server. Each server runs its own agent, with its own hostname, and CI picks one by
setting target.
1. Set up the second server
Section titled “1. Set up the second server”Run the same two steps you ran on the first:
curl -fsSL https://statio.accentio.dev/install.sh | sudo shsudo statio init serversudo statio app add apiinit server prints that agent’s address. It differs from the first one.
2. Give the workflow a target per environment
Section titled “2. Give the workflow a target per environment”jobs: staging: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: accentiostudios/statio@v1 with: target: statio-staging.your-tailnet.ts.net service: api image: ghcr.io/your-org/api ts-oauth-client-id: ${{ secrets.STATIO_TS_OAUTH_CLIENT_ID }} ts-oauth-secret: ${{ secrets.STATIO_TS_OAUTH_SECRET }}Both jobs use the same CI OAuth client and the same image. Only target changes.
The agent compares target against its own hostname and rejects a payload addressed elsewhere with
403 [audience], so a wrong target fails loudly instead of deploying to the wrong box.
3. Read each server’s history
Section titled “3. Read each server’s history”statio logs api --target statio-staging.your-tailnet.ts.netstatio logs api --target statio.your-tailnet.ts.netServers keep separate state and never coordinate.