systemd Socket Unit Builder

Write a socket unit that starts its service on the first connection. Nothing is executed or uploaded.

Generator only: review the unit before installing it. The socket unit owns the listening socket and systemd passes it to the service, so the service must not bind the port itself. Trigger limits and MaxConnections apply to the unit types documented in systemd.socket(5).

Socket unit

Base name only; the .socket and service suffixes are added.
One per line, up to 8: /run/app.sock, @abstract-name, 8080, 127.0.0.1:8080 or [::1]:8080.
Connections served at once; only with Accept=yes. systemd's default is 64.
Mode of a file-system unix socket; default 0666. Parent directories are created with 0755.
Owner of a unix socket; root when unset.
Group of a unix socket; the user's default group when only SocketUser is set.

Generated unit

example-app.socket
Companion service
    Install the file in /etc/systemd/system, review it, then reload and enable the socket:sudo systemctl daemon-reload && sudo systemctl enable --now example-app.socket