Caddy docker image
- Setting up a reverse proxy using environment variables
- Supports only two architectures: linux/amd64 and linux/arm64
- Curl and Docker installed
- You need to have a domain name
If you haven't installed Docker yet, install it by running
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker $(whoami)curl -O https://raw.githubusercontent.com/jinndi/caddy/main/compose.ymlnano compose.ymlIf you are using a firewall, you need to open 80 and 443 ports in compose.yml
From the same directory where you uploaded and configured compose.yml
docker compose up -dStop:
docker compose down, Update:docker compose pull, Logs:docker compose logs
| Env | Default | Description |
|---|---|---|
TZ |
- | Timezone. Useful for accurate logs and scheduling. Example: Europe/Moscow |
DOMAIN |
- | Required. Domain linked to your server's IP. |
EMAIL |
- | Required. Your email adress, used when creating an ACME account with your CA. |
PROXY |
- | Addresses for the reverse proxy. You can add multiple values separated by commas. Each value must follow the format <domain_or_ip>:<port>/<prefix> or <domain_or_ip>/<prefix>. The prefix will be passed to the proxy backend itself. |
PROXY_STRIP_PREFIX |
- | Same as PROXY, except the prefix will not be passed to the proxy backend. |
LOG_LEVEL |
info |
Log Level. Possible values: debug, info, warn, error, and very rarely, panic, fatal |
