adr1an@programming.devM to Linux@programming.dev · 1 month ago[Weekly thread] GNU+Linux help: ask anything!message-squaremessage-square8fedilinkarrow-up114arrow-down10
arrow-up114arrow-down1message-square[Weekly thread] GNU+Linux help: ask anything!adr1an@programming.devM to Linux@programming.dev · 1 month agomessage-square8fedilink
minus-squareadr1an@programming.devOPMlinkfedilinkarrow-up2·1 month agoCreate a user, and then a systemd unit for it, under ~/.config/systemd/user/ with contents like these: [Unit] Description=Caddy web server After=network.target [Service] ExecStart=/usr/local/bin/caddy run --config /path/to/Caddyfile --envfile /path/to/Envfile ExecReload=/usr/local/bin/caddy reload --config /path/to/Caddyfile --envfile /path/to/Envfile Restart=on-failure User=caddy Group=caddy [Install] WantedBy=default.target Adjust the paths in the arguments. It will require systemctl daemon-reload for such unit to be available for enabling and starting it…
Create a user, and then a systemd unit for it, under ~/.config/systemd/user/ with contents like these:
[Unit] Description=Caddy web server After=network.target [Service] ExecStart=/usr/local/bin/caddy run --config /path/to/Caddyfile --envfile /path/to/Envfile ExecReload=/usr/local/bin/caddy reload --config /path/to/Caddyfile --envfile /path/to/Envfile Restart=on-failure User=caddy Group=caddy [Install] WantedBy=default.target
Adjust the paths in the arguments. It will require systemctl daemon-reload for such unit to be available for enabling and starting it…