mirror of
https://github.com/caddyserver/caddy.git
synced 2025-11-24 23:35:21 -05:00
This change eliminates the `[ERROR] Could not write pidfile: open /var/run/caddy.pid: permission denied` from caddy.log. The start-stop-daemon writes the file as root so the DAEMONUSER that caddy runs as cannot write to the .pid file.
SysVinit conf for Caddy
Usage
- Download the appropriate Caddy binary in
/usr/local/bin/caddyor usecurl https://getcaddy.com | bash. - Save the SysVinit config file in
/etc/init.d/caddy. - Ensure that the folder
/etc/caddyexists and that the folder/etc/ssl/caddyis owned bywww-data. - Create a Caddyfile in
/etc/caddy/Caddyfile - Now you can use
service caddy start|stop|restart|reload|statusasroot.