Skip to content
Documentation

Documentation

swarmctl is a small Go daemon that runs inside a Docker Swarm cluster, on a manager node, with the Docker socket mounted. It does two largely independent jobs:

  1. A deploy endpoint. POST /v1/update/{serviceName}?image=… pulls a new image into a running Swarm service. CI calls it instead of holding a SSH key.
  2. A background reconciler. It watches the Docker event stream and keeps Cloudflare Tunnel ingress, DNS records, and Access applications in sync with the services that carry cloudflared.tunnel.* labels.

Service discovery is entirely label-driven — swarmctl itself has no per-service configuration.

Start here

Going deeper

The one thing to know first

swarmctl talks to the Docker API as a manager, and the deploy endpoint will change the image of any service you name. The bearer token in AUTH_TOKEN is therefore root-equivalent on the cluster. Only /v1/* is authenticated — /ping, /version, and /metrics are deliberately public, so put the service behind the tunnel and treat the token as a cluster credential.