Caddy + Cloudflare + remote_ip block by ipaddress not working

After reviewing further, decided to create /etc/caddy/envfile, added all the configurable variables there and referenced in Caddyfile as {$VAR}

caddy.service

EnvironmentFile=-/etc/caddy/envfile

Your thoughts?

Also looks like you can’t use {env.VAR} when using EnvironmentFile which means those values still will be in generated json?

No, you definitely should be able to. That’s a systemd thing, not a Caddy thing.

That’s what I thought, found out what the problem was. I was doing

sudo systemctl reload caddy

and it didn’t get picked up,

when restarted it works

sudo systemctl restart caddy

Thanks for the help

1 Like

Yeah, any change to the systemd config requires a service restart. Changes only to your Caddy config can simply be a zero-downtime reload.

1 Like

I’ve configured S3 as storage, just went through the bucket and I don’t see any json stored there, all i see is a acme folder with certificates, you mean json generated/stored in the filesystem?

The data storage is different from the config storage. See that link which explains the difference.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.