| 1 | # caddy-api.service |
| 2 | # |
| 3 | # For using Caddy with its API. |
| 4 | # |
| 5 | # This unit is "durable" in that it will automatically resume |
| 6 | # the last active configuration if the service is restarted. |
| 7 | # |
| 8 | # See https://caddyserver.com/docs/install for instructions. |
| 9 | |
| 10 | [Unit] |
| 11 | Description=Caddy |
| 12 | Documentation=https://caddyserver.com/docs/ |
| 13 | After=network.target network-online.target |
| 14 | Requires=network-online.target |
| 15 | |
| 16 | [Service] |
| 17 | Type=notify |
| 18 | User=caddy |
| 19 | Group=caddy |
| 20 | ExecStart=/usr/bin/caddy run --environ --resume |
| 21 | TimeoutStopSec=5s |
| 22 | LimitNOFILE=1048576 |
| 23 | PrivateTmp=true |
| 24 | ProtectSystem=full |
| 25 | AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE |
| 26 | |
| 27 | [Install] |
| 28 | WantedBy=multi-user.target |