[Unit] Description=personality: personal website, as a user service # No network-online.target: it is a system unit that a user manager cannot see, and personality binds 127.0.0.1. StartLimitIntervalSec=60 StartLimitBurst=5 [Service] Type=simple # Runs as the account that owns this unit (for example `apps`), under its user manager. No User= or Group=. # The binary is installed by kur into ~/bin/personality. Environment=HOST=127.0.0.1 Environment=PORT=2020 ExecStart=%h/bin/personality Restart=on-failure RestartSec=2 LimitNOFILE=65536 MemoryMax=256M UMask=0077 # Hardening. Only the options a user manager applies without special privileges. The namespace-based options # of the system unit (ProtectSystem, PrivateTmp, ProtectHome, PrivateDevices, and the rest) are left out: # a user manager can apply them only where unprivileged user namespaces are available. NoNewPrivileges=yes LockPersonality=yes RestrictRealtime=yes RestrictSUIDSGID=yes MemoryDenyWriteExecute=yes SystemCallArchitectures=native SystemCallFilter=@system-service SystemCallFilter=~@privileged RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 [Install] WantedBy=default.target