Skip to content

Menu

Systemd Unit Generator

Generate systemd service/timer units

Runs entirely in your browserDevOpsFree, no sign-up
Loading tool

01What is Systemd Unit Generator?

Writing a systemd unit by hand is easy to get slightly wrong. A missing [Install] section means enable does nothing, and a relative ExecStart path makes the unit fail to load. This generator gives you a working service file from a short form, plus the commands to install it. The form has Service Name, Description, Type (simple, forking, oneshot or notify), User, Group, Restart (always, on-failure or no), ExecStart and Working Directory. The output follows the layout described in the systemd.unit and systemd.service man pages. [Unit] gets your description and After=network.target. [Service] writes the type, user, group, working directory and ExecStart, then the restart policy. RestartSec is added only when Restart is not "no". Output and errors go to the journal, and SyslogIdentifier matches the service name so journalctl output is easy to filter. [Install] uses WantedBy=multi-user.target, the normal target for services on a server. Tick Include Timer and an OnCalendar field appears. The tool then appends a matching .timer unit after a --- line, pointed at your service and installed under timers.target, as systemd.timer describes. The command cheat sheet at the bottom switches to enabling the .timer instead of the .service. The three presets fill in directives the form does not show. Web service adds EnvironmentFile and LimitNOFILE=65535. Worker service adds MemoryMax=512M and CPUQuota=50%, the resource limits from systemd.resource-control. Timer unit builds a oneshot cleanup job that runs daily at 02:00 with Persistent=true, so a run missed while the machine was off happens at next boot. Each preset starts from clean defaults, so a MemoryMax from the worker preset won't leak into the web one. A quick example: name a unit job, set Type to oneshot and Restart to always. systemd refuses that combination, so the generator writes Restart=on-failure and leaves a comment saying why. We'd rather fix it in the output than have you find out from a failed daemon-reload. Some honest limits. RestartSec, Environment and the resource limits have no form fields, so you only get them through presets or by editing the text. The tool doesn't validate ExecStart or check that the user exists. The service and timer come out in one block, and you need to split them into two files yourself. Run systemd-analyze verify on the result before you rely on it.

Developers and sysadmins who deploy apps to their own Linux servers use it to get a correct service or timer unit without digging through the systemd man pages. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Systemd Unit Generator

  1. Pick a preset (Web service, Worker service or Timer unit) or start from the default form
  2. Set Service Name, Description, Type, User, Group and Restart
  3. Enter the full command in ExecStart and the path in Working Directory
  4. Tick Include Timer and fill in OnCalendar if the job should run on a schedule
  5. Click Copy, save the service (and timer, if any) as separate files in /etc/systemd/system, then run the commented commands

03Worked examples

Input: Web service preset
Result: [Service] Type=simple User=www-data Group=www-data WorkingDirectory=/opt/my-app EnvironmentFile=/opt/my-app/.env ExecStart=/usr/bin/node /opt/my-app/server.js Restart=always RestartSec=5 LimitNOFILE=65535 StandardOutput=journal StandardError=journal SyslogIdentifier=my-app
Only the [Service] section is shown. [Unit] and [Install] use Description=My Web Application, After=network.target and WantedBy=multi-user.target.
Input: Worker service preset
Result: ExecStart=/usr/bin/node /opt/my-app/worker.js Restart=on-failure RestartSec=10 MemoryMax=512M CPUQuota=50%
Excerpt. The worker restarts only after a failure, waits 10 seconds first, and is capped on memory and CPU.
Input: Timer unit preset (cleanup, oneshot, daily at 02:00)
Result: Type=oneshot User=root WorkingDirectory=/opt/scripts ExecStart=/opt/scripts/cleanup.sh Restart=no … --- # cleanup.timer [Timer] OnCalendar=*-*-* 02:00:00 Persistent=true Unit=cleanup.service [Install] WantedBy=timers.target … # sudo systemctl enable cleanup.timer
Shortened. With Restart=no there is no RestartSec line, and the commands enable the .timer rather than the .service.
Input: Service Name job, Type oneshot, ExecStart /opt/job.sh, Restart always
Result: Type=oneshot User=www-data WorkingDirectory=/opt/app ExecStart=/opt/job.sh # Restart=always is not allowed with Type=oneshot; using on-failure Restart=on-failure RestartSec=5
Excerpt of [Service]. The generator swaps in on-failure because systemd will not load a oneshot unit with Restart=always.
Input: Service Name job, Description left empty
Result: [Unit] Description=job After=network.target
An empty Description falls back to the service name.

04Common use cases

  • Running a Node.js or Python web app as a managed service on a VPS, with logs in the journal
  • Keeping a queue worker alive with Restart=on-failure while capping it at 512M of memory and half a CPU
  • Replacing a nightly cron line with a oneshot service and a timer that catches up after downtime via Persistent=true
  • Raising the open file limit for a web server that holds many connections, using the web preset's LimitNOFILE
  • Checking why a oneshot unit with Restart=always fails to load, and seeing the allowed alternative
  • Showing students the [Unit], [Service] and [Install] sections side by side in a Linux admin class

05Tips

  • ExecStart should start with an absolute path such as /usr/bin/node. Check yours with command -v node before pasting it in.
  • Test an OnCalendar value with systemd-analyze calendar "*-*-* 02:00:00". It prints the next time the timer will fire.
  • If the app must reach the network at startup, change After to network-online.target and add Wants=network-online.target. network.target only means the network stack is up.
  • The text after --- belongs in its own file named after the service, such as cleanup.timer. Leave the --- line out of both files.
  • Use journalctl -u name.service -f from the cheat sheet while you start the unit. Errors from ExecStart show up there first.

06Related concepts

systemd, unit file, systemd timer, journalctl, service management.

Frequently Asked Questions

What is Systemd Unit Generator?

Systemd Unit Generator is a free, browser-based developer tool on AIDToolStack. Generate systemd service/timer units It requires no installation or sign-up and works entirely in your browser.

Is Systemd Unit Generator free to use?

Yes. No sign-up, no fees and no usage cap.

Does Systemd Unit Generator store my data?

No. It runs in your browser; nothing is uploaded.

Cheat sheet

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe