1. The problem I’m having:
I run caddy locally for development, but sometimes I work on other projects for some time before returning to the caddy-powered projects. Every time I leave for a few days or weeks and come back, I get net::ERR_CERT_DATE_INVALID
in my browser when accessing the caddy server.
2. Error messages and/or full log output:
Your connection is not private
Attackers might be trying to steal your information from local.mydomain.net (for example, passwords, messages, or credit cards). Learn more about this warning
net::ERR_CERT_DATE_INVALID
3. Caddy version:
v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=
4. How I installed and ran Caddy:
brew install caddy
a. System environment:
MacOS Sonoma 14.6.1 (23G93)
I have Docker installed, but I am not using it to run Caddy.
b. Command:
caddy run --config=path/to/my/config
c. Service/unit/compose file:
Not using Docker, systemd nor Kubernetes.
d. My complete Caddy config:
local.mydomain.net {
tls internal
reverse_proxy https://www.qa.mydomain.net {
header_up Host {upstream_hostport}
}
reverse_proxy /dev/hello-world* 127.0.0.1:51501
handle_errors 502 {
reverse_proxy https://www.qa.mydomain.net {
header_up Host {upstream_hostport}
}
}
}
5. Links to relevant resources:
I’ve found this other thread that seems related, so I went and did some checks based on the recommendations there.
I have the caddy Local Authority installed in my keychain as you can see:
I’ve also verified that clicking “Manage certificates” in my Chrome’s Privacy and Security settings directly opens my MacOS system keychain: