caddy-retired/systemd/caddy@.service

35 lines
1006 B
INI

# caddy.service
#
# For using Caddy with a config file.
#
# Make sure the ExecStart and ExecReload commands are correct
# for your installation.
#
# 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
[Service]
User=caddy
Group=caddy
EnvironmentFile=/opt/caddy/env/AWS
WorkingDirectory=/opt/caddy
ExecStart=/opt/caddy/caddy run --environ --config /opt/caddy/conf/%i.conf --adapter=caddyfile
ExecReload=/opt/caddy/caddy reload --config /opt/caddy/conf/%.conf --adapter=caddyfile
TimeoutStopSec=5s
LimitNOFILE=1048576
LimitNPROC=512
PrivateTmp=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target