2025-07-23 11:50:12 +07:00
2025-01-26 11:59:51 +07:00


Caddy Manager

A UI for managing Caddy configuration files
Explore the docs »

Report Bug (label bug) · Request Feature (label enhancement)

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Caddy Management is an opinionated UI for managing Caddy configuration files. It is designed to be simple and easy to use. The architecture is based on the following principles:

  • There has been a Caddy container running on the host machine
  • The Caddy container is having its configuration files organized as:
    • A Caddyfile contains the global configuration, and ending with the line import *.caddy
    • Other proxy configurations are saved in individual *.caddy files

(back to top)

Built With

DotNet Gitea Docker

  • DotNet 9 with Blazor and MudBlazor
  • Source code and container registry are stored with Gitea
  • Docker is used for containerization with DotNet container publishing

(back to top)

Getting Started

Given that there has already been a Caddy container running on the host machine, the following steps are required to set up the Caddy Manager using Docker compose.

Prerequisites

These software are required to be installed on the host machine:

Global Caddy configuration

Add this directive at the end of your caddy configuration (global):

import *.caddy

This is to have the caddy files managed by this application be imported and work as expected.

Installation with Docker compose

services:
  caddy:
    image: caddy:latest
    container_name: caddy
    restart: always
    network_mode: "host"
    security_opt:
      - label:disable
    volumes:
      - /root/compose/caddy/config:/etc/caddy
      - /etc/localtime:/etc/localtime:ro

  caddy-manager:
    image: ghcr.io/daothanhduy305/caddymanager
    container_name: caddy-manager
    restart: always
    environment:
      ASPNETCORE_ENVIRONMENT: "Production"
      CaddyService__ConfigDir: "/config"
      DockerService__CaddyContainerName: "caddy"
    # To have the access to the caddy config file
    user: "1000:1000"
    ports:
      - "8080:8080"
    volumes:
      - /root/compose/caddy/config:/config
      - /var/run/docker.sock:/var/run/docker.sock

(back to top)

Usage

Currently, the Caddy Manager is able to:

  • List all the Caddy configuration files
  • Edit the content of the Caddy configuration files by clicking on the file name
  • Create and manage the caddy files
  • Edit the global Caddy configuration file by using the tab "Global Cadddyfile"
  • Restart caddy container on demand
  • Parse simple information from the caddy configurations

(back to top)

Roadmap

  • Parse the caddy files to get more information, i.e. the domain names, the proxy addresses, etc.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GNU GPLv3 License. See COPYING for more information.

(back to top)

Contact

Ebolo - @duydao - daothanhduy305@gmail.com

Project Link: CaddyManager

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)

Description
UI to manage Caddy files
Readme 527 KiB
Languages
C# 90.2%
HTML 5.1%
Shell 2.2%
PowerShell 2.2%
Dockerfile 0.2%
Other 0.1%