I\'m using systemd to start a caddy webserver on an ubuntu 16.04 machine. Whenever I run sudo service caddy start and service caddy status, I get this
For anyone else pulling their hair out, note the lines StartLimitInterval and StartLimitBurst in the caddy.service file - if you're testing and repeatedly stop / starting you will hit the StartLimitBurst limit. Need to increase it to lots, or change the StartLimitInterval, to allow this.
In my /etc/systemd/system/caddy.service file, I had the following line:
Restart=on-failure
Commenting that out (with # or ;) and restarting the service showed the underlying problem, which was in my Caddyfile.
EDIT:
service caddy status only prints a few lines from the log, so sometimes you can find the underlying problem by simply looking at the full log. If using syslog, this is done with:
journalctl -u caddy