Public | Automated Build

Last pushed: a year ago
Short Description
Caddy server image
Full Description

Caddy Docker image

Based on abiosoft/caddy

A Docker image for Caddy. This image includes all addons.

Getting Started

Serve current directory

$ docker run -d -v `pwd`:/srv -p 2015:2015 frosquin/caddy

Point your browser to


Default Caddyfile

The image contains a default Caddyfile.
root /srv

Paths in container

Caddyfile: /etc/Caddyfile

Sites root: /srv

Using local Caddyfile and sites root

Replace /path/to/Caddyfile and /path/to/sites/root accordingly.

$ docker run -d -v /path/to/sites/root:/srv -v path/to/Caddyfile:/etc/Caddyfile -p 2015:2015 frosquin/caddy

Let's Encrypt Auto SSL

Note that this does not work on local environments.

Add email to your Caddyfile to avoid prompt at runtime. Replace with your email.

Run the image

You can change the the ports if ports 80 and 443 are not available on host. e.g. 81:80, 444:443

$ docker run -d -v `pwd`/Caddyfile:/etc/Caddyfile -p 80:80 -p 443:443 frosquin/caddy

Optional but advised. Save certificates on host machine to prevent regeneration every time container starts.

$ docker run -d -v `pwd`/Caddyfile:/etc/Caddyfile -v $HOME/.caddy:/root/.caddy -p 80:80 -p 443:443 frosquin/caddy
Docker Pull Command
Source Repository