# HG changeset patch # User Richard Westhaver # Date 1724203150 14400 # Node ID 9d962d355197f629e4f0c81df241904b81a68a02 # Parent faec9ab70733ccdd3037ae4600d78cf3d7503a7d addy caddy service unit diff -r faec9ab70733 -r 9d962d355197 systemd/system/caddy.service --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/systemd/system/caddy.service Tue Aug 20 21:19:10 2024 -0400 @@ -0,0 +1,26 @@ +# 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/local/bin/caddy run --environ --config /etc/caddy/Caddyfile +ExecReload=/usr/local/bin/caddy reload --config /etc/caddy/Caddyfile --force +TimeoutStopSec=5s +LimitNOFILE=1048576 +PrivateTmp=true +ProtectSystem=full +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE + +[Install] +WantedBy=multi-user.target \ No newline at end of file