systemd Service File Generator
Build a systemd service unit from the settings below and see the file update as you type. You can download the finished .service file, copy the installation commands, or share the current configuration through the page URL. Everything runs locally in your browser.
The suffix is added automatically.
System services require root to install.
Use an absolute executable path. Shell operators are not interpreted automatically.
Blank runs a system service as root.
Service file
Install and test
What the Generator Creates
The generator builds a service unit with the standard [Unit], [Service], and [Install] sections. It also prepares commands that install the downloaded file, check it with systemd-analyze verify, reload the service manager, enable the unit at boot, and start it.
System services are installed under /etc/systemd/system/ and usually run as root unless you set User=. User services are installed under ~/.config/systemd/user/, run as the current user, and use systemctl --user for management.
Choosing a Service Type
The service type tells systemd when startup is complete and how to track the process:
simple- A long-running process that stays in the foreground. This is the broadest compatible choice.exec- A long-running process where systemd should confirm that the executable started successfully before continuing.oneshot- A command that completes and exits, such as a setup or maintenance task.
For a oneshot unit, select Remain active after the command exits only when other units need to treat the completed task as active. The generator rejects the invalid combination of Type=oneshot and Restart=always.
ExecStart Does Not Use a Shell
systemd executes ExecStart= directly. Shell features such as pipes, output redirection, &&, and variable expansion do not work unless you explicitly invoke a shell. For example, a command that needs redirection would start with /bin/sh -c, but a script file is usually easier to read and maintain.
Use an absolute executable path such as /usr/bin/python3 or /usr/bin/node. Arguments can follow the executable on the same line. If the service needs environment variables, put them in a separate file and enter its absolute path in the Environment file field. Keep credentials out of the unit file and restrict access to the environment file with appropriate permissions.
Install and Test the Service
Download the generated file into your current directory, then run the commands shown below it. The first command copies the file into the correct systemd directory. The verification step catches unknown directives, missing executables, and dependency problems before the service is enabled.
After starting the service, systemctl status shows its current state and the final journalctl command follows its logs. See the guide to creating a systemd service
for a full explanation of each section, or use the systemctl command guide
for day-to-day service management.