Skip to content

Caddy basicauth

Open an interactive terminal in the Caddy docker container:

docker exec -it caddy /bin/sh

Make your password:1

caddy hash-password

Update the Caddyfile:2

https://website.xyz:443 {
    basicauth /* {
        username hashFromPreviousStep
    }

    reverse_proxy 10.0.0.1:1234
}