1. The problem I’m having:
The first boot of Caddy after a system restart takes a significant amount of time. Subsequent restarts happen just fine, almost instantly. It takes long enough that the auto-start does not work, and I have to start it manually.
2. Error messages and/or full log output:
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6619427,"msg":"maxprocs: Leaving GOMAXPROCS=1: CPU quota undefined"}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6622036,"msg":"GOMEMLIMIT is updated","package":"github.com/KimMachineGun/automemlimit/memlimit","GOMEMLIMIT":58413562675,"previous":9223372036854775807}
Sep 15 11:28:38 hutao caddy[1073]: caddy.HomeDir=/var/lib/caddy
Sep 15 11:28:38 hutao caddy[1073]: caddy.AppDataDir=/var/lib/caddy/.local/share/caddy
Sep 15 11:28:38 hutao caddy[1073]: caddy.AppConfigDir=/var/lib/caddy/.config/caddy
Sep 15 11:28:38 hutao caddy[1073]: caddy.ConfigAutosavePath=/var/lib/caddy/.config/caddy/autosave.json
Sep 15 11:28:38 hutao caddy[1073]: caddy.Version=v2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
Sep 15 11:28:38 hutao caddy[1073]: runtime.GOOS=linux
Sep 15 11:28:38 hutao caddy[1073]: runtime.GOARCH=amd64
Sep 15 11:28:38 hutao caddy[1073]: runtime.Compiler=gc
Sep 15 11:28:38 hutao caddy[1073]: runtime.NumCPU=1
Sep 15 11:28:38 hutao caddy[1073]: runtime.GOMAXPROCS=1
Sep 15 11:28:38 hutao caddy[1073]: runtime.Version=go1.25.0
Sep 15 11:28:38 hutao caddy[1073]: os.Getwd=/
Sep 15 11:28:38 hutao caddy[1073]: LANG=en_US.UTF-8
Sep 15 11:28:38 hutao caddy[1073]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Sep 15 11:28:38 hutao caddy[1073]: NOTIFY_SOCKET=/run/systemd/notify
Sep 15 11:28:38 hutao caddy[1073]: HOME=/var/lib/caddy
Sep 15 11:28:38 hutao caddy[1073]: LOGNAME=caddy
Sep 15 11:28:38 hutao caddy[1073]: USER=caddy
Sep 15 11:28:38 hutao caddy[1073]: INVOCATION_ID=18eba0b6093f4de0beb29ca5ef78eca4
Sep 15 11:28:38 hutao caddy[1073]: JOURNAL_STREAM=8:4322965
Sep 15 11:28:38 hutao caddy[1073]: SYSTEMD_EXEC_PID=1073
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6623988,"msg":"using config from file","file":"/etc/caddy/Caddyfile"}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6653233,"msg":"adapted config to JSON","adapter":"caddyfile"}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"warn","ts":1757950118.6653304,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":10}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.669396,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//127.0.0.1:2019","//localhost:2019","//[::1]:2
019"]}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6712875,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"sr
v0","https_port":443}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6713042,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6986353,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000728c80"}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"warn","ts":1757950118.698958,"logger":"http","msg":"HTTP/2 skipped because it requires TLS","network":"tcp","addr":":80"}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"warn","ts":1757950118.6990113,"logger":"http","msg":"HTTP/3 skipped because it requires TLS","network":"tcp","addr":":80"}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.699024,"logger":"http.log","msg":"server running","name":"remaining_auto_https_redirects","protocols":["h1","h2","h3"]}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6990483,"logger":"http","msg":"enabling HTTP/3 listener","addr":":443"}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6991227,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-B
uffer-Sizes for details."}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6994047,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6994236,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["mondstat.dead-end.quest","testbot.aidansmith.dev","aidansmith.dev","foundr
ydown.aidansmith.dev","celestia.dead-end.quest","foundry.aidansmith.dev","bast.aidansmith.dev","ninbyo.aidansmith.dev","barbara.dead-end.quest","natlan.dead-end.quest","xiangling.dead-end.quest","irminsul.dead-end.quest","www.aidan
smith.dev","testbot.dead-end.quest","fontaine.dead-end.quest","adeptus.aidansmith.dev","keqing.dead-end.quest","dirty.aidansmith.dev","amileo.aidansmith.dev","jean.dead-end.quest"]}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.707152,"msg":"autosaved config (load with --resume flag)","file":"/var/lib/caddy/.config/caddy/autosave.json"}
Sep 15 11:28:38 hutao systemd[1]: Started caddy.service - Caddy.
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.7079587,"msg":"serving initial configuration"}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.7769969,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/var/lib/caddy/.local/share/caddy","instance":"5f3054
ce-85a2-415e-9bf7-83562e1e0d3b","try_again":1758036518.7769961,"try_again_in":86399.999999769}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.7770238,"logger":"tls","msg":"finished cleaning storage units"}
Sep 15 11:28:39 hutao caddy[1073]: {"level":"info","ts":1757950119.1464944,"msg":"got renewal info","names":["testbot.aidansmith.dev"],"window_start":1758304016,"window_end":1758459465,"selected_time":1758328849,"recheck_after":175
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6994047,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.6994236,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["mondstat.dead-end.quest","testbot.aidansmith.dev","aidansmith.dev","foundr
ydown.aidansmith.dev","celestia.dead-end.quest","foundry.aidansmith.dev","bast.aidansmith.dev","ninbyo.aidansmith.dev","barbara.dead-end.quest","natlan.dead-end.quest","xiangling.dead-end.quest","irminsul.dead-end.quest","www.aidan
smith.dev","testbot.dead-end.quest","fontaine.dead-end.quest","adeptus.aidansmith.dev","keqing.dead-end.quest","dirty.aidansmith.dev","amileo.aidansmith.dev","jean.dead-end.quest"]}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.707152,"msg":"autosaved config (load with --resume flag)","file":"/var/lib/caddy/.config/caddy/autosave.json"}
Sep 15 11:28:38 hutao systemd[1]: Started caddy.service - Caddy.
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.7079587,"msg":"serving initial configuration"}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.7769969,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/var/lib/caddy/.local/share/caddy","instance":"5f3054
ce-85a2-415e-9bf7-83562e1e0d3b","try_again":1758036518.7769961,"try_again_in":86399.999999769}
Sep 15 11:28:38 hutao caddy[1073]: {"level":"info","ts":1757950118.7770238,"logger":"tls","msg":"finished cleaning storage units"}
Sep 15 11:28:39 hutao caddy[1073]: {"level":"info","ts":1757950119.1464944,"msg":"got renewal info","names":["testbot.aidansmith.dev"],"window_start":1758304016,"window_end":1758459465,"selected_time":1758328849,"recheck_after":175
7971719.1464856,"explanation_url":""}
Sep 15 11:28:39 hutao caddy[1073]: {"level":"info","ts":1757950119.1597881,"msg":"got renewal info","names":["aidansmith.dev"],"window_start":1758282622,"window_end":1758438071,"selected_time":1758400687,"recheck_after":1757971719.
159785,"explanation_url":""}
Sep 15 11:28:39 hutao caddy[1073]: {"level":"info","ts":1757950119.207503,"logger":"tls","msg":"updated and stored ACME renewal information","identifiers":["testbot.aidansmith.dev"],"cert_hash":"bec007c71518102545397b0386785591a4d2
f6c0106905927439ecc4a97ff91a","ari_unique_id":"nytfzzwhT50Et-0rLMTGcIvS1w0.BaEI0paGOkUCzFxngMMhVkBa","cert_expiry":1760972571,"selected_time":1758374000,"next_update":1757971719.1464856,"explanation_url":""}
Sep 15 11:28:39 hutao caddy[1073]: {"level":"info","ts":1757950119.3017051,"logger":"tls","msg":"updated and stored ACME renewal information","identifiers":["aidansmith.dev"],"cert_hash":"634000f3853fa938af7ad2bacc0935d02e89db0b496
9912a453603de6a706b11","ari_unique_id":"nytfzzwhT50Et-0rLMTGcIvS1w0.BihyG99AZ3ZzKd9tW0RvzTAV","cert_expiry":1760951177,"selected_time":1758416153,"next_update":1757971719.159785,"explanation_url":""}
Sep 15 11:48:38 hutao caddy[1073]: {"level":"info","ts":1757951318.956453,"msg":"got renewal info","names":["celestia.dead-end.quest"],"window_start":1758373590,"window_end":1758529039,"selected_time":1758470087,"recheck_after":175
7972918.956446,"explanation_url":""}
Sep 15 11:48:39 hutao caddy[1073]: {"level":"info","ts":1757951319.0308232,"logger":"tls.cache.maintenance","msg":"updated and stored ACME renewal information","identifiers":["celestia.dead-end.quest"],"cert_hash":"2f99d133ed08bb38
24a4013451f515599b0b14ff1f0fca0ed95a89428e1553bd","ari_unique_id":"nytfzzwhT50Et-0rLMTGcIvS1w0.BqgslLbWqvfysJH2N9zE8XgP","cert_expiry":1761042145,"selected_time":1758460643,"next_update":1757972918.956446,"explanation_url":""}
Sep 15 11:48:39 hutao caddy[1073]: {"level":"info","ts":1757951319.176884,"msg":"got renewal info","names":["www.aidansmith.dev"],"window_start":1758329208,"window_end":1758484657,"selected_time":1758364617,"recheck_after":17579729
19.1768773,"explanation_url":""}
Sep 15 11:48:39 hutao caddy[1073]: {"level":"info","ts":1757951319.2339902,"logger":"tls.cache.maintenance","msg":"updated and stored ACME renewal information","identifiers":["www.aidansmith.dev"],"cert_hash":"081973230b69ba41e0054
d24f8362189856c98c43c30885286ee7a5af52fe68d","ari_unique_id":"kydGmAOpUWiOmNbEQkjbI79YlNI.BaJBsgVt922X0hjLBlBqitXa","cert_expiry":1760997763,"selected_time":1758412281,"next_update":1757972919.1768773,"explanation_url":""}
Sep 15 12:16:31 hutao caddy[1073]: {"level":"warn","ts":1757952991.424284,"logger":"http","msg":"looking up info for HTTP challenge","host":"aidansmith.dev","remote_addr":"52.231.100.9:3135","user_agent":"","error":"no information
found to solve challenge for identifier: aidansmith.dev"}
Sep 15 12:16:31 hutao caddy[1073]: {"level":"warn","ts":1757952991.610649,"logger":"http","msg":"looking up info for HTTP challenge","host":"aidansmith.dev","remote_addr":"52.231.100.9:8647","user_agent":"","error":"no information
found to solve challenge for identifier: aidansmith.dev"}
Sep 15 12:38:38 hutao caddy[1073]: {"level":"info","ts":1757954318.9804246,"msg":"got renewal info","names":["foundry.aidansmith.dev"],"window_start":1758352590,"window_end":1758508039,"selected_time":1758369943,"recheck_after":175
7975918.9804175,"explanation_url":""}
Sep 15 12:38:39 hutao caddy[1073]: {"level":"info","ts":1757954319.0175338,"logger":"tls.cache.maintenance","msg":"updated and stored ACME renewal information","identifiers":["foundry.aidansmith.dev"],"cert_hash":"1f34413f8a31691e0
6e3695d507a711e8f46e78257de0076978e49275222c014","ari_unique_id":"kydGmAOpUWiOmNbEQkjbI79YlNI.Bh4k5TLV7knfTuG_BXt-LYlI","cert_expiry":1761021145,"selected_time":1758368808,"next_update":1757975918.9804175,"explanation_url":""}
Sep 15 12:48:38 hutao caddy[1073]: {"level":"info","ts":1757954918.9799588,"msg":"got renewal info","names":["keqing.dead-end.quest"],"window_start":1758288390,"window_end":1758443839,"selected_time":1758412029,"recheck_after":1757
976518.9799514,"explanation_url":""}
Sep 15 12:48:39 hutao caddy[1073]: {"level":"info","ts":1757954919.0551214,"logger":"tls.cache.maintenance","msg":"updated and stored ACME renewal information","identifiers":["keqing.dead-end.quest"],"cert_hash":"fa619912ca1de3197e
5ba4723b57aa0aceb4bf3abe48cf95e1a8620533aca0d0","ari_unique_id":"kydGmAOpUWiOmNbEQkjbI79YlNI.BvT-BjJ_LsKZh1GNx-zmR_56","cert_expiry":1760956945,"selected_time":1758299719,"next_update":1757976518.9799514,"explanation_url":""}
Sep 15 13:34:28 hutao caddy[1073]: {"level":"info","ts":1757957668.59017,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
Sep 15 13:34:28 hutao caddy[1073]: {"level":"warn","ts":1757957668.5902183,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
3. Caddy version:
XCaddy with Porkbun DNS being the only custom plugin
v2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
4. How I installed and ran Caddy:
a. System environment:
Caddy is installed on Proxmox using the ProxmoxVE Helper scripts
https://community-scripts.github.io/ProxmoxVE/scripts?id=caddy
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/caddy.sh)"
b. Command:
systemctl start caddy
c. Service/unit/compose file:
# caddy.service
#
# For using Caddy with a config file.
#
# Make sure the ExecStart and ExecReload commands are correct
# for your installation.
#
# See https://caddyserver.com/docs/install for instructions.
#
# WARNING: This service does not use the --resume flag, so if you
# use the API to make changes, they will be overwritten by the
# Caddyfile next time the service is restarted. If you intend to
# use Caddy's API to configure it, add the --resume flag to the
# `caddy run` command or use the caddy-api.service file instead.
[Unit]
Description=Caddy
Documentation=https://caddyserver.com/docs/
After=network.target network-online.target
Requires=network-online.target
[Service]
Type=notify
User=caddy
Group=caddy
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force
TimeoutStopSec=5s
LimitNOFILE=1048576
LimitNPROC=512
PrivateTmp=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
d. My complete Caddy config:
There is no reasonable way for me to provide my Caddy config in plain text as it spans across many files for the sake of readability. Below is a link to a Git repository which includes all the data.