Deploy with a JVM backend (Java / Kotlin)
This guide pairs the sidecar with a JVM service — Spring Boot, Ktor, Quarkus,
Micronaut, plain servlet containers; the pattern is identical. It assumes you
have a config bundle or a hand-written
sidecar.yaml + token.
Docker Compose
Section titled “Docker Compose”A typical Spring Boot service with the sidecar as a companion service:
services: app: image: acme/acme-web:latest # your Spring Boot / Ktor image ports: - "8080:8080" environment: SPRING_PROFILES_ACTIVE: production
ringzero-sidecar: image: ghcr.io/ringzero/sidecar:1 restart: unless-stopped ports: - "7301:7301" # challenge listener — reachable at every (re)registration volumes: - ./ringzero-sidecar-config:/etc/ringzero:roThe sidecar registers the host (the Compose machine), so one sidecar per machine is enough even if you run several JVM services on it.
Kubernetes
Section titled “Kubernetes”The per-pod sidecar (suitable when each pod has its own reachable address):
apiVersion: apps/v1kind: Deploymentmetadata: name: acme-webspec: replicas: 1 selector: matchLabels: { app: acme-web } template: metadata: labels: { app: acme-web } spec: initContainers: - name: ringzero-sidecar image: ghcr.io/ringzero/sidecar:1 restartPolicy: Always # makes it a native sidecar ports: - containerPort: 7301 volumeMounts: - name: ringzero-config mountPath: /etc/ringzero readOnly: true resources: requests: { cpu: 10m, memory: 16Mi } limits: { memory: 64Mi } containers: - name: app image: acme/acme-web:latest ports: - containerPort: 8080 volumes: - name: ringzero-config secret: secretName: ringzero-sidecar# identical, but the sidecar goes under `containers` instead of# `initContainers` — it has no ordering guarantee relative to the app,# which is fine: registration is independent of your app's lifecycle.containers: - name: app image: acme/acme-web:latest ports: - containerPort: 8080 - name: ringzero-sidecar image: ghcr.io/ringzero/sidecar:1 ports: - containerPort: 7301 volumeMounts: - name: ringzero-config mountPath: /etc/ringzero readOnly: trueCreate the ringzero-sidecar Secret from your config bundle as shown in
Automated setup. If the
pod’s own address isn’t reachable from the internet, set
challenge.advertise_address.
Consider the hardening securityContext
for the sidecar container.
Bare metal / VMs (systemd)
Section titled “Bare metal / VMs (systemd)”For JVM services deployed as jars/wars on VMs, run the sidecar binary as a systemd unit next to your service — the unit file and install steps are stack-independent. One sidecar per host covers every JVM (and non-JVM) service on it.
Verify
Section titled “Verify”Same as any deployment: sidecar logs show host registered, Settings →
Hosts lists the host as active (see the
host lifecycle for what that buys you),
and the health probe
reports "registered": true. Troubleshooting lives in the
manual setup guide.