FROM EXECUTABLE TO UBUNTU SERVICE

Give your process
a proper home.

Configure a service, understand what it does, and take the unit file with you. No terminal wizardry required.

Ubuntu 22.04 / 24.04 LTSsystemd 249+100% client-side

01 / CONFIGURE

Your service, your rules.

* Required
Start with a recipe (replaces configuration)

01 The essentials

Runs as your current account, without sudo. Usually stops after your last login session ends.

.service

Letters, numbers, dashes, underscores. Don't include .service.

One line, no backslashes or leading/trailing whitespace.

02 What should run?

Absolute Linux file path. No ~, quotes, backslashes, glob characters, dot segments or outer whitespace. Internal spaces are allowed. Install the executable separately.

Arguments optional

One row = one exact argument. Spaces and quotes are literal; an empty row passes an empty argument. Do not add shell quotes. No shell, pipes or redirects are invoked.

Absolute, normalized path with the same restrictions as above, already present and accessible.

03 Keep things predictable

A manual stop never triggers a restart. oneshot cannot use Always. Rate limits can stop a failing restart loop; inspect logs before reset-failed.

Timeouts, dependencies & environment

For oneshot, the start timeout covers the entire task. For exec/simple it does not wait for application readiness. Stop timeout limits graceful shutdown before forced termination.

Space-separated literal unit names in the same manager. After orders units only if both start; it does not start them. Wants/Requires pull units in but do not order them. Pair with After when needed. Failure of a required dependency prevents startup when also ordered After it.

System services may use Wants + After = network-online.target if truly needed. It requires a configured wait-online provider, is only a boot-time synchronization point, and guarantees neither internet/DNS nor ongoing connectivity. User units cannot order after system-manager targets.

Environment variables optional

Not secret storage. Values are literal, not shell-expanded. Avoid passwords and tokens.

Absolute, normalized path. Required if specified: missing files fail startup. Use systemd environment-file syntax (KEY=value), not a shell script: no export or command substitution. File values override matching inline variables. Review ownership and permissions.

Your configuration stays on this page. Refreshing resets it.

03 / ON YOUR UBUNTU MACHINE

Review first. Run second.

A valid file doesn't prove your app will run. Check accounts, paths, permissions, dependencies and the journal on the target host.

Go straight to the sourceService types ↗Execution & escaping ↗Dependencies ↗Ubuntu server docs ↗