About Labelgate
Manage Cloudflare DNS, Tunnels and Access from Docker container labels.
Labelgate watches your Docker containers and sets up Cloudflare for them. You add labels to a container, and Labelgate creates the DNS record, the tunnel route or the Access rule. When the container goes away, Labelgate cleans up.
services:
webapp:
image: nginx
labels:
labelgate.tunnel.web.hostname: "app.example.com"
labelgate.tunnel.web.service: "http://webapp:80"Start with Getting Started.
What it manages
| Label type | What you get | Example |
|---|---|---|
dns | DNS records (A, AAAA, CNAME, TXT, MX, SRV, CAA) | Point api.example.com at your server |
tunnel | Cloudflare Tunnel routes | Publish app.example.com without opening ports |
access | Zero Trust Access applications and policies | Allow only alice@example.com into admin.example.com |
Every label has the same shape:
labelgate.<type>.<name>.<property>=<value><name> is any short name you choose, such as web or api. It groups the labels of one service. See the Label Reference.
How it works
- Labelgate reads labels from the local Docker socket. Other Docker hosts can run a small agent that sends their labels to the main instance.
- It applies changes as soon as a container starts or stops, and checks everything again every 5 minutes.
- It only changes or deletes Cloudflare resources it created. Your hand-made records are never touched. See Ownership & Conflicts.
- A built-in dashboard shows what it manages and any errors.
Next steps
- Getting Started: set it up in a few minutes.
- Label Reference: every label and option.
- Configuration: config files and settings.
- Upgrading to v0.3: coming from v0.2.