Skip to content

Automated setup

Instead of writing sidecar.yaml by hand, the app can generate a config bundle for you: a pre-filled config plus a fresh registration token, packaged so you can mount it straight into a container.

ManualAutomated bundle (this page)
Best forInfra-as-code shops templating sidecar.yaml themselves (Terraform, Helm values, Ansible)Getting a first host registered fast; teams without config templating
Token handlingYou place the token into your secret store yourselfToken arrives inside the bundle — move it into your secret store
Config driftYou own the fileRegenerate on changes, or edit the YAML — it’s the same format

Either path converges on the same sidecar and the same configuration surface.

  1. In the app, go to Settings → Hosts and click Register host.

  2. Choose the label(s) for the host(s) you’re registering (e.g. env=production, service=acme-web) — the generated config includes them, and they feed scan scoping.

  3. Click Download config bundle. You get ringzero-sidecar-config.tar.gz:

    • Directoryringzero-sidecar-config/
      • sidecar.yaml pre-filled: api_url, labels, token file path
      • token a freshly issued registration token (rz_reg_…)

The bundled sidecar.yaml is exactly the documented format, with registration_token_file pointing at /etc/ringzero/token — the bundle is designed to be mounted as one directory at /etc/ringzero. Nothing is magic; you can edit it.

Extract next to your compose.yaml (outside the build context) and mount the whole directory at /etc/ringzero:

Terminal window
tar -xzf ringzero-sidecar-config.tar.gz
compose.yaml
services:
app:
image: acme/acme-web:latest
ringzero-sidecar:
image: ghcr.io/ringzero/sidecar:1
restart: unless-stopped
ports:
- "7301:7301"
volumes:
- ./ringzero-sidecar-config:/etc/ringzero:ro

Then verify registration the same way as in the manual setup (step 5): logs show host registered, and Settings → Hosts shows the host active.

  • The bundled token expires like any registration token (org default, shown at download time). After expiry the bundle can’t register new hosts; hosts already registered keep working.
  • Regenerate any time with Register host → Download config bundle — each download issues a distinct token, so you can hand different bundles to different teams/pipelines and revoke them independently.
  • One bundle can register many hosts (e.g. baked into a deploy pipeline for a fleet) — each host gets its own hst_… registration.

At fleet scale, treat the bundle as the source of your templated config rather than mounting it verbatim:

  • Template sidecar.yaml in your Helm values / Terraform / Ansible from the bundled one; keep the token in your secret manager and project it via registration_token_file.
  • One token per pipeline or team — revocation stays granular, and the audit trail attributes registrations cleanly.
  • Differentiate hosts per environment with RINGZERO_LABELS (it replaces the config file’s labels — set the full map).
  • For replicated Kubernetes workloads, deploy the sidecar once per node via the DaemonSet pattern instead of once per pod.
  • Ephemeral hosts (CI runners, preview envs): set deregister_on_shutdown: true so they leave scan scope in seconds.