Hello. I’m trying to run Caddy with the “official” systemd.service but so far I haven’t had any luck.
I used the guide on GitHub but the service fails to start and running systemctl status caddy.service
gives:
● caddy.service - Caddy HTTP/2 web server
Loaded: loaded (/etc/systemd/system/caddy.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-03-08 23:13:20 CET; 4min 5s ago
Docs: https://caddyserver.com/docs
Process: 16306 ExecStart=/usr/local/bin/caddy -log stdout -agree=true -conf=/etc/caddy/Caddyfile -root=/var/tmp (code=exited, status=1/FAILURE)
Main PID: 16306 (code=exited, status=1/FAILURE)
Mar 08 23:13:11 t110 systemd[1]: Started Caddy HTTP/2 web server.
Mar 08 23:13:17 t110 caddy[16306]: Activating privacy features... 2018/03/08 23:13:17 [INFO][test.page] acme: Obtaining bundled SAN certificate
Mar 08 23:13:18 t110 caddy[16306]: 2018/03/08 23:13:18 [INFO][test.page] AuthURL: https://acme-v01.api.letsencrypt.org/acme/authz/8KHdBW0tvJFlGbMVc_B7OhngWbA7eLAlf6fSIq25VXY
Mar 08 23:13:18 t110 caddy[16306]: 2018/03/08 23:13:18 [INFO][test.page] acme: Trying to solve HTTP-01
Mar 08 23:13:20 t110 systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Mar 08 23:13:20 t110 systemd[1]: caddy.service: Unit entered failed state.
Mar 08 23:13:20 t110 systemd[1]: caddy.service: Failed with result 'exit-code'.
This is my Caddyfile:
test.page {
root /var/www/test/
log stdout
errors stderr
gzip
}
I don’t see any particular error reported by systemctl status
or journalctl
, Caddy seems to just die, and that is strange.
This is on a Dell PowerEdge T110 machine running fresh Debian 9 with the latest updates and systemd v232.