docs/examples/agenthub/ez-agent-hub.service

# User unit for systemd 255+. Bootstrap and prepare the application socket first.
[Unit]
Description=EzAgent Hub

[Service]
Type=simple
ExecStart=%h/.local/bin/ez-agent-hub
Environment=XDG_CONFIG_HOME=%h/.config XDG_STATE_HOME=%h/.local/state XDG_RUNTIME_DIR=%t
UMask=0077
Restart=on-failure
RestartSec=5s
TimeoutStopSec=15s
KillSignal=SIGTERM
RuntimeDirectory=ez-agent/hub
RuntimeDirectoryMode=0700
NoNewPrivileges=yes
PrivateUsers=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=tmpfs
BindReadOnlyPaths=%h/.local/bin/ez-agent-hub %t/ez-agent-application/ez-agent:/application
BindPaths=%h/.config/ez-agent/hub %h/.local/state/ez-agent/hub %h/.local/state/ez-agent/hub-client %t/ez-agent/hub
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6

[Install]
WantedBy=default.target