1. Caddy version (caddy version
):
Latest docker build (but with cloudflare plugin)
2. How I run Caddy:
a. System environment:
Docker on unRAID v6.8.2
b. Command:
docker run -d --name='caddy' --net='bridge' -e 'CLOUDFLARE_AUTH_TOKEN'='#########' -p '80:80/tcp' -p '443:443/tcp' -v '/mnt/user/appdata/caddy/Caddyfile:/etc/Caddyfile' -v '/mnt/user/appdata/caddy':'/root/.caddy':'rw' 'abiosoft/caddy'
c. Service/unit/compose file:
https://hub.docker.com/r/abiosoft/caddy/dockerfile
d. My complete Caddyfile or JSON config:
stream.lightsong.cc:443 {
reverse_proxy 192.168.1.20:32400 {
}
tls amman.sood@gmail.com {
dns cloudflare {env.CLOUDFLARE_AUTH_TOKEN}
client auth {
mode require_and_verify
trusted_ca_cert_file origin-pull-ca.pem
}
}
}
dl.lightsong.cc {
reverse_proxy 192.168.1.20:8112 {
]
tls amman.sood@gmail.com {
dns cloudflare {env.CLOUDFLARE_AUTH_TOKEN}
}
}
radarr.lightsong.cc {
reverse_proxy 192.168.1.20:7878 {
}
tls amman.sood@gmail.com {
dns cloudflare {env.CLOUDFLARE_AUTH_TOKEN}
}
}
share.lightsong.cc {
reverse_proxy 192.168.1.20:8686 {
}
tls amman.sood@gmail.com {
dns cloudflare {env.CLOUDFLARE_AUTH_TOKEN}
}
}
sonarr.lightsong.cc {
reverse_proxy 192.168.1.20:8989 {
}
tls amman.sood@gmail.com {
dns cloudflare {env.CLOUDFLARE_AUTH_TOKEN}
}
stats.lightsong.cc {
reverse_proxy 192.168.1.20:8181 {
}
tls amman.sood@gmail.com {
dns cloudflare {env.CLOUDFLARE_AUTH_TOKEN}
}
}
3. The problem Iâm having:
Iâm trying to upgrade my ancient deprecated Caddy install to v2, but no matter what I try, it immediately exits with âunknown directiveâ. I followed the V2 upgrade guide and I think I have all the syntax right, so I have no clue why it wonât run.
4. Error messages and/or full log output:
2020/09/11 01:49:10 /etc/Caddyfile:2 - Error during parsing: Unknown directive âreverse_proxyâ
5. What I already tried:
I tried using reverse_proxy without the { } after it, no dice. I originally had âencode gzipâ as the first line for each site definition, but that also gave me an unknown directive error.
6. Links to relevant resources:
Thanks in advance, been bashing my head into this for a few hours now, ended up going back to my V1 install for now.