Back to search
systemd service unit
config serviceCustom systemd service unit file
/etc/systemd/system/{service_name}.service
Unit
Used as filename: {name}.service
Space-separated unit names
Weak dependency units
Strong dependency units
Service
Full path to executable
Command to reload the service
Command to stop the service
KEY=value pairs (space-separated)
Path to environment file
Timeout in seconds for stopping the service
How to kill remaining processes on stop
Install
Generated Config — /etc/systemd/system/{service_name}.service
[Unit] Description=My Application After=network.target [Service] Type=simple ExecStart=/usr/local/bin/myapp User=root Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target