systemd Unit Generator

Build, understand & export a .service file

recommended
recommended
recommended
recommended
recommended
recommended
recommended
recommended
1 [Unit]
2 Description=My example service
3 After=network-online.target
4 Wants=network-online.target
5
6 [Service]
7 ExecStart=/usr/local/bin/myapp --port 8080
8 Restart=on-failure
9 RestartSec=5s
10 User=myapp
11
12 [Install]
13 WantedBy=multi-user.target
Set it up run these on the target machine
  1. 1

    Place the unit file. System-wide units live in /etc/systemd/system/. (Or just drop your downloaded file there with sudo cp.)

    sudo tee /etc/systemd/system/myapp.service > /dev/null <<'EOF'
    # …paste the generated file here…
    EOF
  2. 2

    Sanity-check the file for syntax errors and unknown directives.

    sudo systemd-analyze verify /etc/systemd/system/myapp.service
  3. 3

    Make systemd aware of the new or changed unit file.

    sudo systemctl daemon-reload
  4. 4

    Start it immediately AND enable it to start on boot. Drop --now to only enable.

    sudo systemctl enable --now myapp.service
  5. 5

    Check it's running. Use journalctl -u myapp.service -f to follow logs.

    systemctl status myapp.service

Generated entirely in your browser — nothing is uploaded. Validate with systemd-analyze verify before deploying.

Made by Stefan Bogdanović

stefanbogdanovic.dev

Built for

Linux admins

from dev to devs