No description
Find a file
pika ddb987be87
All checks were successful
Build and Push to Forgejo Registry / checkout (push) Successful in 16s
now
2025-04-12 12:21:51 +02:00
.forgejo/workflows now 2025-04-12 12:21:51 +02:00
src Addet container registry and changed compose to use it directly! 2025-04-02 10:23:19 +02:00
templates wip 2025-03-30 15:24:19 +02:00
.dockerignore batman 2025-03-10 18:24:23 +01:00
.env.example readme changes 2025-03-30 14:01:24 +02:00
agent.py file change on agent 2025-03-30 14:05:09 +02:00
app.py wip 2025-03-30 15:24:19 +02:00
compose.yml Addet container registry and changed compose to use it directly! 2025-04-02 10:23:19 +02:00
Dockerfile wip 2025-04-11 19:28:07 +02:00
entrypoint.sh wip 2025-03-24 17:51:57 +01:00
README.md readme changes 2025-03-30 14:01:24 +02:00
requirements.txt wip 2025-03-30 15:21:25 +02:00

🚀 CaddyDB - Modern Web Server Dashboard

Caddy 2.7+ Nginx Compatible Python 3.9+ Docker Ready

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.


CaddyDB Dashboard Screenshot

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)

  1. Clone the repository:

    git clone https://github.com/yourusername/caddydb.git
    cd caddydb
    
  2. Build the Docker image:

    ./src/build.sh
    # Note: You can customize the image name/tag by editing build.sh
    
  3. Configure your environment:

    cp .env.example .env
    # Edit .env with your preferred settings
    nano .env
    
  4. Start the server:

    docker-compose up -d caddydb-server
    
  5. Access your dashboard at http://localhost:5000

Agent Mode (Remote Servers)

  1. Configure agent environment:

    cp .env.example .env.agent
    # Edit .env.agent with remote server details
    nano .env.agent
    
  2. 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