No description
src | ||
templates | ||
.dockerignore | ||
.env.example | ||
agent.py | ||
app.py | ||
compose.yml | ||
Dockerfile | ||
entrypoint.sh | ||
README.md | ||
requirements.txt |
🚀 CaddyDB - Modern Web Server Dashboard
A sleek, minimalist dashboard for monitoring and managing your Caddy and Nginx web servers.
Visualize all your domains in one place with a beautiful dark-themed interface.
✨ Features
- 🖥️ Multi-Server Support: Monitor both Caddy and Nginx servers across your infrastructure
- 🔄 Real-Time Updates: Automatically detects configuration changes
- 🔍 Instant Search: Quickly filter domains with keyboard shortcuts
- 📊 Visual Statistics: At-a-glance metrics for all your servers
- 🌙 Dark Mode: Easy on the eyes with a modern minimalist UI
- 🔒 Secure: Token-based authentication between servers and agents
- 🐳 Docker Ready: Easy deployment with Docker Compose
🚀 Getting Started
Quick Start with Docker
Server Mode (Dashboard)
-
Clone the repository:
git clone https://github.com/yourusername/caddydb.git cd caddydb
-
Build the Docker image:
./src/build.sh # Note: You can customize the image name/tag by editing build.sh
-
Configure your environment:
cp .env.example .env # Edit .env with your preferred settings nano .env
-
Start the server:
docker-compose up -d caddydb-server
-
Access your dashboard at http://localhost:5000
Agent Mode (Remote Servers)
-
Configure agent environment:
cp .env.example .env.agent # Edit .env.agent with remote server details nano .env.agent
-
Start the agent:
# For Caddy servers docker-compose --env-file .env.agent up -d caddydb-caddy-agent # For Nginx servers docker-compose --env-file .env.agent up -d caddydb-nginx-agent
📝 Configuration Options
Server Mode
Variable | Description | Default |
---|---|---|
API_KEY |
Authentication key for agents | Required |
DEBUG_MODE |
Enable debug logging | false |
SERVER_NAME |
Name for the local server | Local Server |
Agent Mode
Variable | Description | Default |
---|---|---|
API_KEY |
Same key as configured on server | Required |
DASHBOARD_URL |
URL to the dashboard API | http://caddydb-server:5000/api/update |
SERVER_NAME |
How this server appears in dashboard | Host name |
SERVER_TYPE |
Type of server (caddy or nginx ) |
caddy |
CHECK_INTERVAL |
Seconds between updates | 60 |
VERIFY_SSL |
Verify SSL certificates | true |
🔧 Advanced Usage
Multiple Server Monitoring
You can monitor multiple Caddy and Nginx servers by running the agent on each server:
# Remote server docker-compose.yml
services:
caddydb-agent:
image: caddydb:latest
volumes:
- /etc/caddy/Caddyfile:/app/Caddyfile:ro # Mount your actual Caddyfile
environment:
- API_KEY=your_shared_secret_key
- DASHBOARD_URL=https://your-dashboard-server.com/api/update
- SERVER_NAME=Production Caddy
- SERVER_TYPE=caddy
command: agent
restart: unless-stopped
Local Configuration
If you're running CaddyDB on the same server as your Caddy/Nginx instance, simply mount your config files:
volumes:
- /etc/caddy/Caddyfile:/app/Caddyfile:ro
- /etc/nginx/conf.d:/app/nginx:ro
🤝 Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgements
- Built with Flask and Tailwind CSS
- Inspired by modern dashboard design principles
Made with ❤️ for web server administrators