Development

systemd Service Generator

Generate systemd service units, validate runtime settings and create installation commands.

Service templates

Start from a Node.js service, Python worker, Docker Compose project or one-shot task.

[Unit]

Configure service metadata and startup dependencies.

After

Units that should start before this service.

network-online.target

Wants

Soft dependencies requested by this unit.

network-online.target

Requires

Hard dependencies required by this unit.

[Service]

Configure the runtime account, working directory and commands.

ExecStartPre

Commands executed before the main service command.

ExecStartPost

Commands executed after the main process starts.

Environment

Add inline variables or protected environment files.

EnvironmentFile

Load variables from one or more external files.

/var/www/bigforgekit-api/.env

Logging and hardening

Configure journal output and common systemd security restrictions.

[Install]

Select the targets used when enabling the service.

WantedBy

Targets that should include this service when enabled.

multi-user.target

No service issues detected

The current rules did not detect obvious systemd configuration problems.

Generated service unit

Copy or download the complete .service file.

bigforgekit-api.service
[Unit]
Description=BigForgeKit API service
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=deploy
Group=deploy
WorkingDirectory=/var/www/bigforgekit-api
ExecStart=/usr/bin/node server.js
Restart=on-failure
RestartSec=5
TimeoutStartSec=90
TimeoutStopSec=30
Environment="NODE_ENV=production"
EnvironmentFile=/var/www/bigforgekit-api/.env
StandardOutput=journal
StandardError=journal
PrivateTmp=true
NoNewPrivileges=true
ProtectSystem=full
ProtectHome=yes

[Install]
WantedBy=multi-user.target

Installation commands

Commands for installing, enabling and inspecting the generated service.

Terminal commands
sudo cp bigforgekit-api.service /etc/systemd/system/bigforgekit-api.service
sudo systemctl daemon-reload
sudo systemctl enable --now bigforgekit-api.service
sudo systemctl status bigforgekit-api.service
journalctl -u bigforgekit-api.service -f

Service units are generated locally. Review paths, users, permissions and hardening options before installing a unit on a production system.

About this tool

What is systemd Service Generator?

systemd Service Generator creates complete Linux service units through a structured editor. Configure startup dependencies, runtime commands, environment variables, restart behavior and common hardening options, then copy or download the generated service file.

Features

Built for fast developer workflows

  • Generate complete Unit, Service and Install sections.
  • Configure service names, descriptions and documentation.
  • Add After, Wants and Requires dependencies.
  • Configure service type, runtime user and group.
  • Generate ExecStart, ExecStop, ExecReload and lifecycle commands.
  • Configure restart policies and timeout values.
  • Add inline environment variables and EnvironmentFile entries.
  • Configure journal output and error handling.
  • Enable PrivateTmp and NoNewPrivileges.
  • Configure ProtectSystem and ProtectHome.
  • Detect invalid paths, ports and duration values.
  • Warn about root services and inline secrets.
  • Generate installation and monitoring commands.
  • Copy or download the generated .service file.
  • Generate every unit locally inside your browser.

Frequently asked questions

Questions about systemd Service Generator

Where should a systemd service file be installed?

Custom system-wide service units are commonly installed in /etc/systemd/system.

What does ExecStart do?

ExecStart defines the command systemd runs when starting the service. Absolute executable paths are recommended.

What does Restart=on-failure mean?

The service is restarted when its process exits unsuccessfully or is terminated unexpectedly.

What does NoNewPrivileges do?

It prevents the service and its child processes from gaining additional privileges through mechanisms such as setuid binaries.

Should services run as root?

Only when required. A dedicated non-root account reduces the impact of a compromised service.

Does this tool install or start the service?

No. It only generates the unit and example terminal commands locally.

Related tools