Skip to content
IT_TOOLS_

Systemd Service Generator

Build and download a systemd service unit locally, with environment variables and optional hardening.

Local processing

This tool processes your input in your browser.

[IN] Unit & service

A .service suffix is added once. Template units are not supported.

A short description of the service.

Use an absolute executable path. This is systemd command syntax, not a shell: pipes and redirects need an explicit shell. Use %% for a literal percent and $$ for a literal dollar.

The account must exist on the target machine. Empty means root.

Optional absolute path. Spaces are preserved; percent signs are escaped automatically.

[ENV] Environment

No environment variables

Add a variable when the service needs it.

Values are literal: spaces, quotes, backslashes and percent signs are preserved. Avoid storing secrets in unit files.

[SEC] Service hardening

ProtectHome restricts access to home directories. Check that these settings allow the files and devices your service needs.

[OUT] Service unit

/etc/systemd/system/my-app.service

systemd
1[Unit]2Description=My Custom Node.js App3After=network-online.target4Wants=network-online.target5 6[Service]7Type=simple8User=nobody9WorkingDirectory=/opt/myapp10ExecStart=/usr/bin/node /opt/myapp/server.js11Restart=on-failure12RestartSec=513NoNewPrivileges=true14PrivateTmp=true15ProtectHome=true16 17[Install]18WantedBy=multi-user.target19 

[RUN] Install on target

Save the unit at the path above. Verify it on the target Linux host before enabling the service.

shell
1sudo systemd-analyze verify /etc/systemd/system/my-app.service2sudo systemctl daemon-reload3sudo systemctl enable --now my-app.service