Docker container for Caddy
Clone or download
Pull request Compare This branch is 5 commits ahead, 15 commits behind abiosoft:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

This project is forked from abiosoft/caddy-docker. And I modified it to make it be more convenient to use.


A Docker image for Caddy. This image includes no plugin.

Check MephistoMMM/caddy:builder for generating cross-platform Caddy binaries.


This image is built from source code. As such, it is subject to the project's Apache 2.0 license, but it neither contains nor is subject to the EULA for Caddy's official binary distributions.

Let's Encrypt Subscriber Agreement

Caddy may prompt to agree to Let's Encrypt Subscriber Agreement. This is configurable with ACME_AGREE environment variable. Set it to true to agree. ACME_AGREE=true.

Getting Started

This image is started by docker-compose, you have to install it first. If you had, run following script:

$ ./ path/to/service_dir

This script will build some necessary docker images, create your service_dir if it doesn't exist, and finally run the caddy server in docker container.

Point your browser to

All of running configurations could be modified in docker-compose.yml, except Paths in container.

Paths in container

Caddyfile: /root/conf/Caddyfile

Sites root: /root/srv

Let's Encrypt Auto SSL

Note that this does not work on local environments.

Use a valid domain and add email to your Caddyfile to avoid prompt at runtime. Replace with your domain and with your email.