Bitwarden guide, Caddy dies on reboot
Hi all, I did the following Bitwarden guide…
All is well, except when my Linode reboots for any reason, Caddy dies. I have to issue sudo docker start caddy to get it back up. Is this normal?
Here's some of the log after a reboot. I get a SIGTERM. Not long after, you can see where I started manually (the change from 1625100132 to 1625100289). (Sorry about the bad formatting when pasting) Thanks for the help!
{"level":"info","ts":1625024109.4570212,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1625024109.461787,"msg":"input is not formatted with 'caddy fmt'","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1625024109.464118,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["localhost:2019","[::1]:2019","127.0.0.1:2019"]}
{"level":"info","ts":1625024109.4645295,"logger":"http","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
{"level":"info","ts":1625024109.4646013,"logger":"http","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
{"level":"info","ts":1625024109.4665654,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["MY.DOMAIN"]}
{"level":"info","ts":1625024109.4767854,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1625024109.4769795,"msg":"serving initial configuration"}
{"level":"info","ts":1625024109.4771616,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0005f2ee0"}
{"level":"info","ts":1625024109.477252,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/data/caddy"}
{"level":"info","ts":1625024109.4786587,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1625100132.0793424,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1625100132.0804844,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1625100132.0887666,"logger":"tls.cache.maintenance","msg":"stopped background certificate maintenance","cache":"0xc0005f2ee0"}
{"level":"info","ts":1625100132.0915496,"logger":"admin","msg":"stopped previous server","address":"tcp/localhost:2019"}
{"level":"info","ts":1625100132.091569,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
{"level":"info","ts":1625100289.4557214,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1625100289.4578342,"msg":"input is not formatted with 'caddy fmt'","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1625100289.461892,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["localhost:2019","[::1]:2019","127.0.0.1:2019"]}
{"level":"info","ts":1625100289.4624176,"logger":"http","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}…
2 Replies
I'll be honest, I'm not familiar with Docker.
Is it just a case that you need to configure the caddy container to start on boot?