DNSGate is a lightweight web-based management GUI for CoreDNS.
It provides an easy way to manage a CoreDNS instance through a web interface without requiring direct editing of the Corefile and hosts configuration.
The CoreDNS server can optionally be created and managed directly by DNSGate. However, CoreDNS runs independently from the GUI and continues serving DNS requests even if the DNSGate container is stopped or removed.
DNSGate consists of two containers:
The CoreDNS container is optional and can be created by DNSGate itself.
When DNSGate creates or recreates the CoreDNS container, the existing CoreDNS configuration and hosts files managed by DNSGate are mounted into the new container. This means the configuration is preserved across container recreation.
The CoreDNS container does not depend on the GUI being available at runtime. Once CoreDNS is running, it can continue serving DNS requests independently.
Example docker-compose.yml:
services:
gui:
build: .
container_name: dnsgate-gui
restart: unless-stopped
ports:
- "8080:8080"
environment:
COOKIE_SECURE: "false"
TRUST_PROXY: "false"
DNS_CONTAINER_NAME: "dnsgate-dns"
DNS_IMAGE: "coredns/coredns:1.12.1"
SELF_CONTAINER: "dnsgate-gui"
volumes:
- ./data:/data
- ./config:/config
- /var/run/docker.sock:/var/run/docker.sock
| Variable | Description |
|---|---|
COOKIE_SECURE | Set to true when the GUI is served over HTTPS. |
TRUST_PROXY | Set to true when running behind a reverse proxy that provides X-Forwarded-For. |
DNS_CONTAINER_NAME | Name of the CoreDNS container managed by DNSGate. |
DNS_IMAGE | CoreDNS Docker image to use. |
SELF_CONTAINER | Name of the DNSGate GUI container. |
| Path | Purpose |
|---|---|
/data | SQLite database |
/config | CoreDNS configuration and hosts files |
/var/run/docker.sock | Allows DNSGate to create, start, stop and remove the managed CoreDNS container |
Security note: Mounting
/var/run/docker.sockgives the container extensive control over the Docker host. Only use this feature when you trust the DNSGate image and its configuration.
DNSGate supports several common DNS management functions:
Control which domains are allowed or blocked through DNS.
Create custom DNS responses for specific domains, for example:
internal.example.com → 192.168.10.50
This can be useful for internal services and local DNS records.
Forward specific domains or DNS requests to dedicated upstream DNS servers while using another resolver for everything else.
This makes DNSGate suitable for home labs, self-hosted environments, internal networks and small infrastructure deployments.
DNSGate is the management layer. CoreDNS remains the actual DNS server.
Content type
Image
Digest
sha256:87f6db818…
Size
9.7 MB
Last updated
18 days ago
docker pull raphaeljaeger/dnsgate