Modern web-based GUI for managing Cloudflare DNS zones
1.8K
A web-based GUI for managing Cloudflare DNS zones. View, add, edit, and delete DNS records against the Cloudflare API.
Test Connection before savedocker run -d -p 5000:5000 \
-e CF_API_TOKEN=your-cloudflare-api-token \
-e CF_DNS_ZONE=your-domain.com \
--name cloudflare-dns-manager \
awkto/cloudflare-dns-manager:latest
Open http://localhost:5000 in your browser and set an admin password on first visit.
API_TOKEN for scriptsdata/ directoryCreate a token at https://dash.cloudflare.com/profile/api-tokens with:
Scope it to the specific zone(s) you want to manage.
version: '3.8'
services:
cloudflare-dns-manager:
image: awkto/cloudflare-dns-manager:latest
container_name: cloudflare-dns-manager
ports:
- "5000:5000"
environment:
- CF_API_TOKEN=${CF_API_TOKEN}
- CF_DNS_ZONE=${CF_DNS_ZONE}
volumes:
- ./data:/app/data
restart: unless-stopped
git clone https://github.com/awkto/cloudflare-dns.git
cd cloudflare-dns
pip install -r requirements.txt
python app.py
| Variable | Description |
|---|---|
CF_API_TOKEN | Cloudflare API token with Zone:DNS:Edit |
CF_DNS_ZONE | Zone name (e.g. example.com) |
MCP_ENABLED | true to expose the MCP SSE endpoints |
Credentials entered in the Settings UI are written to /app/data/.env and persist across restarts.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health | Health check |
| GET | /api/config/status | Is Cloudflare configured? |
| GET/POST | /api/config | Read / write configuration |
| POST | /api/config/test | Verify credentials |
| GET | /api/records | List all DNS records |
| POST | /api/records | Create a DNS record |
| PUT | /api/records/<type>/<name> | Update a DNS record |
| DELETE | /api/records/<type>/<name> | Delete a DNS record |
Swagger UI is available at /apidocs/.
All endpoints under /api/ (except /api/health and auth endpoints) require either a session cookie or an Authorization: Bearer <API_TOKEN> header. The app generates the API_TOKEN on first boot and exposes it in Settings → API Token.
192.0.2.1, target.example.com)priority exchange — e.g. 10 mail.example.compriority weight port target — e.g. 10 5 5060 sipserver.example.comflags tag value — e.g. 0 issue "letsencrypt.org"TTL of 1 means Cloudflare "automatic".
When MCP_ENABLED=true (or toggled on in Settings), the server exposes:
| Endpoint | Description |
|---|---|
GET /mcp/sse | SSE transport (Bearer auth) |
POST /mcp/messages | JSON-RPC messages (Bearer auth) |
GET /mcpdocs | Interactive tool documentation |
Tools: list_records, create_record, update_record, delete_record, health_check.
{
"mcpServers": {
"cloudflare-dns": {
"type": "url",
"url": "https://your-host/mcp/sse",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}
Tag-triggered:
git tag v1.2.3 && git push origin v1.2.3
The GitHub Actions workflow at .github/workflows/docker-publish.yml:
amd64, arm64) Docker imagelatest and <version> tags to Docker HubRequired repository secrets:
DOCKER_USERNAME — Docker Hub usernameDOCKER_PASSWORD — Docker Hub access token (not account password)MIT
docker pull awkto/cloudflare-dns-manager:latest