Modern web-based GUI for managing DigitalOcean DNS zones
4.2K
A custom web-based GUI for managing DigitalOcean DNS zones. This application provides a modern, user-friendly interface to view, add, edit, and delete DNS records using DigitalOcean API authentication.
The easiest way to run DigitalOcean DNS Manager is using Docker:
docker run -d -p 5000:5000 \
-e DO_API_TOKEN=your-api-token \
-e DO_DNS_ZONE=your-domain.com \
--name digitalocean-dns-manager \
yourusername/digitalocean-dns-manager:latest
Then open http://localhost:5000 in your browser.
# Pull the latest image
docker pull yourusername/digitalocean-dns-manager:latest
# Run with environment variables
docker run -d \
--name digitalocean-dns-manager \
-p 5000:5000 \
-e DO_API_TOKEN=your-api-token \
-e DO_DNS_ZONE=your-domain.com \
yourusername/digitalocean-dns-manager:latest
# Or use a .env file
docker run -d \
--name digitalocean-dns-manager \
-p 5000:5000 \
--env-file .env \
yourusername/digitalocean-dns-manager:latest
# Clone the repository
git clone https://github.com/awkto/digitalocean-dns-gui.git
cd digitalocean-dns-gui
# Build the image
docker build -t digitalocean-dns-manager .
# Run the container
docker run -d -p 5000:5000 --env-file .env digitalocean-dns-manager
Create a docker-compose.yml:
version: '3.8'
services:
digitalocean-dns-manager:
image: yourusername/digitalocean-dns-manager:latest
container_name: digitalocean-dns-manager
ports:
- "5000:5000"
environment:
- DO_API_TOKEN=${DO_API_TOKEN}
- DO_DNS_ZONE=${DO_DNS_ZONE}
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:5000/api/health')"]
interval: 30s
timeout: 10s
retries: 3
Then run:
docker-compose up -d
git clone https://github.com/awkto/digitalocean-dns-gui.git
cd digitalocean-dns-gui
pip install -r requirements.txt
Copy the example environment file and fill in your DigitalOcean credentials:
cp .env.example .env
Edit .env with your values:
# DigitalOcean API Credentials
DO_API_TOKEN=your-digitalocean-api-token-here
DO_DNS_ZONE=your-domain.com
Important: Never commit the .env file to version control!
python test_connection.py
python app.py
The application will start on http://localhost:5000
Open your web browser and navigate to:
http://localhost:5000
When you first access the application:
To update your DigitalOcean credentials later:
All configuration can be provided via environment variables (useful for Docker):
DO_API_TOKEN=dop_v1_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DO_DNS_ZONE=example.com
The main page displays all DNS records in your configured zone in a table format showing:
Fill in the "Add New DNS Record" form:
www, mail) or @ for the root domain192.168.1.1)target.example.com)10 mail.example.com)v=spf1 include:_spf.google.com ~all)Click "Add Record"
Click the "š Refresh" button in the header to reload all records from DigitalOcean.
The backend provides the following REST API endpoints:
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health | Health check and zone info |
| GET | /api/config/status | Check if configuration is complete |
| GET | /api/config | Get current configuration |
| POST | /api/config | Save configuration |
| POST | /api/config/test | Test DigitalOcean credentials |
| GET | /api/records | List all DNS records |
| POST | /api/records | Create a new DNS record |
| PUT | /api/records/<type>/<name> | Update a DNS record |
| DELETE | /api/records/<type>/<name> | Delete a DNS record |
This app includes a built-in MCP server for AI agent integration (e.g., Claude Code). MCP allows AI assistants to manage DNS records programmatically.
Set the MCP_ENABLED environment variable:
docker run -d -p 5000:5000 \
-e MCP_ENABLED=true \
-e DO_API_TOKEN=your-api-token \
-e DO_DNS_ZONE=your-domain.com \
digitalocean-dns-manager
| Endpoint | Description |
|---|---|
GET /mcp/sse | SSE transport (requires Bearer token) |
POST /mcp/messages | JSON-RPC messages (requires Bearer token) |
GET /mcpdocs | Interactive MCP tool documentation |
| Tool | Description |
|---|---|
list_records | List all DNS records in the zone |
create_record | Create a new DNS record |
update_record | Update an existing DNS record |
delete_record | Delete a DNS record |
health_check | Check API health and zone info |
Add to your Claude Code MCP settings:
{
"mcpServers": {
"dodns": {
"type": "url",
"url": "https://your-dodns-host/mcp/sse",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}
The MCP server uses the same API token as the REST API.
digitalocean-dns-gui/
āāā static/
ā āāā index.html # Main DNS records page
ā āāā settings.html # Configuration page
ā āāā app.js # Main page JavaScript
ā āāā settings.js # Settings page JavaScript
ā āāā styles.css # Modern CSS with dark mode
āāā mcp_server.py # MCP server integration
āāā app.py # Flask backend application
āāā test_connection.py # Connection test script
āāā requirements.txt # Python dependencies
āāā Dockerfile # Docker image definition
āāā docker-compose.yml # Docker Compose configuration
āāā .dockerignore # Docker build exclusions
āāā .env.example # Example environment variables
āāā .env # Your configuration (not in git)
āāā .gitignore # Git ignore rules
āāā README.md # This file
.env to git)0.0.0.0) - consider restricting this in productionContainer won't start
# Check container logs
docker logs digitalocean-dns-manager
# Check if port is already in use
netstat -an | grep 5000 # Linux/Mac
netstat -ano | findstr :5000 # Windows
Configuration not persisting
docker run -d -p 5000:5000 -v $(pwd)/.env:/app/.env digitalocean-dns-manager
"Module not found" errors
pip install -r requirements.txt
"Missing required environment variables" error
Make sure you've created a .env file with all required values or configured via the Settings page.
example.com, not www.example.com)http://127.0.0.1:5000 insteadContributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
Note: This is a development tool. For production use, implement proper security measures including user authentication, HTTPS, and access controls.
docker pull awkto/digitalocean-dns-gui:latest