guided .service file builder · no googling the syntax · runs locally
[Unit] Description=My Application Service After=network.target [Service] Type=exec User=myapp Group=myapp WorkingDirectory=/opt/myapp ExecStart=/usr/bin/myapp --config /etc/myapp/config.yaml StandardOutput=journal Restart=on-failure RestartSec=5s TimeoutStartSec=30s TimeoutStopSec=30s KillMode=control-group PrivateTmp=yes NoNewPrivileges=yes [Install] WantedBy=multi-user.target
sudo cp myapp.service /etc/systemd/system/ && sudo systemctl daemon-reload && sudo systemctl enable --now myapp