···11# Replace 'your-registry.example.com' with your real domain
22# Caddy will automatically obtain TLS certificates for this domain via Let's Encrypt
33-# and reverse-proxy traffic to the `grain` service on port 8888 (same Docker network)
33+# and reverse-proxy traffic to the grain service on port 8888 (same Docker network)
44+# Note: Caddy passes the Authorization header through by default - do NOT use header_up
55+# directives as they can cause literal placeholder strings to be passed instead of values
4657your-registry.example.com {
66- reverse_proxy grain:8888
88+ # Allow large uploads for container images
99+ request_body {
1010+ max_size 0
1111+ }
1212+1313+ reverse_proxy grain:8888 {
1414+ # Rewrite Location headers from internal address to public HTTPS URL
1515+ header_up Host {host}
1616+ header_down Location http://0.0.0.0:8888 https://your-registry.example.com
1717+ }
1818+719 log {
820 output file /var/log/caddy/grain_access.log
921 }