[Unit] Description=Uberbringer receipt printer server Documentation=https://git.anomalous.dev/57_Wolve/uberbringer Wants=network-online.target After=network.target network-online.target # Start-rate limits are [Unit] settings (systemd v230+); systemd ignores # StartLimitIntervalSec= in [Service]. StartLimitIntervalSec=60 StartLimitBurst=3 # Change settings with `systemctl edit uberbringer` rather than editing this # file: drop-ins in /etc/systemd/system/uberbringer.service.d/ survive upgrades. [Service] Type=simple User=uberbringer Group=uberbringer WorkingDirectory=/etc/uberbringer ExecStart=/usr/local/bin/uberbringer --config /etc/uberbringer/config.toml Restart=on-failure RestartSec=5 LimitNOFILE=4096 # ── Privileges ──────────────────────────────────────────────────────────────── # The daemon binds an unprivileged port, dials the printer over TCP and fetches # images and reports errors to Sentry over HTTPS. It needs no capabilities. CapabilityBoundingSet= AmbientCapabilities= NoNewPrivileges=true # ── Sandboxing ──────────────────────────────────────────────────────────────── # The daemon reads its config and the system CA bundle, writes only the state # of its ntfy subscriptions and opens no devices. The file system is read-only # to it, apart from /var/lib/uberbringer, which systemd creates for the # service user (ntfy.state_dir). StateDirectory=uberbringer StateDirectoryMode=0700 ProtectSystem=strict ProtectHome=true PrivateTmp=true PrivateDevices=true ProtectKernelTunables=true ProtectKernelModules=true ProtectKernelLogs=true ProtectControlGroups=true ProtectClock=true ProtectHostname=true LockPersonality=true MemoryDenyWriteExecute=true RestrictSUIDSGID=true RestrictRealtime=true RestrictNamespaces=true SystemCallArchitectures=native SystemCallFilter=@system-service SystemCallErrorNumber=EPERM # IPv4 and IPv6 for the listener, the printer, DNS, image fetches and Sentry; # AF_UNIX for local sockets such as the journal. RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX [Install] WantedBy=multi-user.target