Caddy Stopped for some reason

1. Caddy version (Alpine):

2. How I run Caddy:

In a docker container

a. System environment:

Debain Docker

c. Service/unit/compose file:

docker run -d --name caddy -v /etc/Caddyfile:/etc/caddy/Caddyfile -v /etc/caddy:/root/.local/share/caddy --net host --restart on-failure caddy/caddy:alpine

3. The problem I’m having:

Just tried to browse to one of my services that caddy is handling, and found the page refused to load. Logged into the server and saw that caddy container has stopped 8 hours before that, checked the logs and I’ll attach them below

4. Error messages and/or full log output:

2021-08-05T00:00:36.739538141Z {“level”:“info”,“ts”:1628121636.7391362,“msg”:“shutting down apps, then terminating”,“signal”:“SIGTERM”}
2021-08-05T00:00:36.739604590Z {“level”:“warn”,“ts”:1628121636.739212,“msg”:“exiting; byeee!! :wave:”,“signal”:“SIGTERM”}
2021-08-05T00:00:36.742854229Z {“level”:“info”,“ts”:1628121636.7422419,“logger”:“tls.cache.maintenance”,“msg”:“stopped background certificate maintenance”,“cache”:“0xc000600ee0”}
2021-08-05T00:00:36.748508121Z {“level”:“info”,“ts”:1628121636.7435725,“logger”:“admin”,“msg”:“stopped previous server”,“address”:“tcp/localhost:2019”}
2021-08-05T00:00:36.748604752Z {“level”:“info”,“ts”:1628121636.7438266,“msg”:“shutdown complete”,“signal”:“SIGTERM”,“exit_code”:0}

5. What I already tried:

haven’t tried anything yet since this is the first time this has happened. I recently updated the docker container for caddy, so that might be related. but I was hoping someone could shed some light on the log messages as to why it shut down.

6. Links to relevant resources:

Don’t use that image. That’s not the official Docker image for Caddy, that’s our CI target. The official image is caddy, not caddy/caddy. See the docs Docker Hub

Follow those docs to make sure you’re using the latest version and the right volume mappings.

As for Caddy shutting down, it was sent a SIGTERM signal. Did you run package updates that updated Docker? If Docker itself is updating, it first shuts down all the containers since it needs to reboot the Docker daemon afterwards. You should set a restart policy on your Caddy container so it comes back online after doing so.

Hey and thanks for your reply.
I will change the image to caddy soon. caddy/caddy was what was recommended as part of a guide on Linode.

As for restarting, --restart on-failure, now I remembered that I need to make it unless-stopped. thanks!

Please link it, I’ll try to see if I can get it fixed. We’re constantly fighting misinformation.

Edit: Found it.

I’ve opened an issue to get Linode to update or drop this guide:


Yeah, that guide is also outdated since it pulls the bitwarden_rs docker and not the vaultwarden one. I opened a ticket to Linode to open up their guides to edits or suggestions to avoid this in the future.

Anyway, thanks, I updated to caddy instead of the CI image, and also changed the restart. have a great day!

Their guides are on github, in that repo I linked. Users can propose pull requests to fix them. But all the Caddy guides are outdated in various ways. I’d rather people just use our official documentation, which is kept up to date.


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