|
|
2ab2950 |
# caddy.service
|
|
|
2ab2950 |
#
|
|
|
2ab2950 |
# For using Caddy with a config file.
|
|
|
2ab2950 |
#
|
|
|
2ab2950 |
# WARNING: This service does not use the --resume flag, so if you
|
|
|
2ab2950 |
# use the API to make changes, they will be overwritten by the
|
|
|
2ab2950 |
# Caddyfile next time the service is restarted. If you intend to
|
|
|
2ab2950 |
# use Caddy's API to configure it, add the --resume flag to the
|
|
|
2ab2950 |
# `caddy run` command or use the caddy-api.service file instead.
|
|
|
2ab2950 |
|
|
|
6241751 |
[Unit]
|
|
|
2ab2950 |
Description=Caddy web server
|
|
|
2ab2950 |
Documentation=https://caddyserver.com/docs/
|
|
|
6241751 |
After=network.target
|
|
|
6241751 |
|
|
|
6241751 |
[Service]
|
|
|
6241751 |
User=caddy
|
|
|
6241751 |
Group=caddy
|
|
|
2ab2950 |
ExecStartPre=/usr/bin/caddy validate --config /etc/caddy/Caddyfile
|
|
|
2ab2950 |
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
|
|
|
2ab2950 |
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile
|
|
|
6241751 |
TimeoutStopSec=5s
|
|
|
6241751 |
LimitNOFILE=1048576
|
|
|
6241751 |
LimitNPROC=512
|
|
|
6241751 |
PrivateTmp=true
|
|
|
6241751 |
ProtectHome=true
|
|
|
a90fe1c |
ProtectSystem=full
|
|
|
6241751 |
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
|
|
6241751 |
|
|
|
6241751 |
[Install]
|
|
|
6241751 |
WantedBy=multi-user.target
|