Caddy Proxy Manager runs as a Docker Compose stack that bundles Caddy Server, the dashboard, and optional analytics and geo-IP services. This guide walks you through cloning the repository, configuring your environment, starting the stack, and creating your first proxy host with automatic HTTPS.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fuomag9/caddy-proxy-manager/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have:- Docker Engine 24+ and Docker Compose v2 installed (
docker compose versionshould show v2.x) - Ports 80 and 443 available on the host (required for Let’s Encrypt HTTP-01 challenge and HTTPS traffic)
- Port 3000 available for the dashboard
- A domain name with a DNS A record pointing to your server if you want automatic HTTPS certificates
Deploy with Docker Compose
Clone and configure
Clone the repository and copy the example environment file:Open
Generate a secure A minimal production Restrict file permissions on
.env and set the following required variables:| Variable | Description |
|---|---|
SESSION_SECRET | 32-character random string used to encrypt sessions |
ADMIN_USERNAME | Username for the initial admin account |
ADMIN_PASSWORD | Password for the initial admin account (12+ chars, mixed case, numbers, special chars) |
BASE_URL | Public URL where users access the dashboard (e.g. https://caddy-manager.example.com) |
SESSION_SECRET with:.env looks like:.env to prevent other users from reading your credentials:Start the stack
Start all services in detached mode:Docker will pull the required images and start the Access the dashboard at
web, caddy, docker-socket-proxy, and l4-port-manager containers. Wait for the health checks to pass — this takes about 40 seconds on first start.Check that all containers are running:http://localhost:3000/login (or your BASE_URL if set).Log in
Open
http://localhost:3000/login in your browser. Enter the ADMIN_USERNAME and ADMIN_PASSWORD values you set in .env.On first login, CPM creates the admin account from those environment variables. Subsequent changes to the credentials in .env do not update the stored account — use the User Management page to change the password after the initial setup.Create your first proxy host
- In the sidebar, click Proxy Hosts.
- Click Add Proxy Host.
- Fill in the Domain field with your public hostname (e.g.
app.example.com). - Set the Upstream URL to your backend service (e.g.
http://192.168.1.10:8080). - Under SSL, enable Automatic HTTPS — Caddy will obtain a Let’s Encrypt certificate for the domain automatically.
- Click Save.
Automatic HTTPS requires that the domain resolves to your server’s public IP and that port 80 is reachable from the internet so Let’s Encrypt can complete the HTTP-01 challenge.
Enable analytics (optional)
Analytics requires the ClickHouse service, which is activated via theclickhouse Docker Compose profile. Add the following to your .env:
clickhouse from COMPOSE_PROFILES (or leave the variable empty) and omit CLICKHOUSE_PASSWORD.
Enable geo IP updates (optional)
Geo blocking requires MaxMind GeoLite2 databases. The bundledgeoipupdate service downloads and refreshes them automatically every 72 hours.
- Register for a free MaxMind account at maxmind.com.
- Generate a license key with GeoLite2-Country and GeoLite2-ASN edition permissions.
-
Add the following to your
.env: -
Add
geoipupdatetoCOMPOSE_PROFILES: -
Restart the stack:
geoip-data Docker volume and are shared between the web and caddy containers. Geo blocking rules become available immediately after the first download completes.
What’s next
Configuration
Full reference for every environment variable and Docker Compose volume in the stack.
Proxy hosts
Configure load balancing, custom headers, location rules, and health checks.
Certificates
Set up DNS-01 challenge, import custom certificates, and issue mTLS client certs.
Web Application Firewall
Enable OWASP CRS protection, suppress rules, and write custom SecLang directives.