iz
Clone
https://git.tahinli.com/Tahinli/iz.git
0 watching0 forksRustAGPL-3.0567.3 KiB3950aceTahinli27 days ago34 commits
| 1 | # systemd unit for iz, the family task board. |
| 2 | # |
| 3 | # This file is installed by hand. Nothing enables it automatically: copy it to |
| 4 | # /etc/systemd/system/iz.service, run `systemctl daemon-reload`, then enable and |
| 5 | # start it yourself. See README.md, "First run". |
| 6 | |
| 7 | [Unit] |
| 8 | Description=iz family task board |
| 9 | After=network-online.target |
| 10 | Wants=network-online.target |
| 11 | StartLimitIntervalSec=60 |
| 12 | StartLimitBurst=5 |
| 13 | |
| 14 | [Service] |
| 15 | Type=simple |
| 16 | User=iz |
| 17 | Group=iz |
| 18 | ExecStart=/usr/local/bin/iz --config /etc/iz/iz.toml serve |
| 19 | WorkingDirectory=/var/lib/iz |
| 20 | StateDirectory=iz |
| 21 | StateDirectoryMode=0700 |
| 22 | Restart=on-failure |
| 23 | RestartSec=5 |
| 24 | UMask=0077 |
| 25 | |
| 26 | # Hardening |
| 27 | NoNewPrivileges=yes |
| 28 | ProtectSystem=strict |
| 29 | # Only the data directory is writable: database, iz.key, attachments, backups. |
| 30 | ReadWritePaths=/var/lib/iz |
| 31 | ProtectHome=yes |
| 32 | PrivateTmp=yes |
| 33 | PrivateDevices=yes |
| 34 | ProtectKernelTunables=yes |
| 35 | ProtectKernelModules=yes |
| 36 | ProtectKernelLogs=yes |
| 37 | ProtectControlGroups=yes |
| 38 | ProtectClock=yes |
| 39 | ProcSubset=pid |
| 40 | RestrictSUIDSGID=yes |
| 41 | RestrictRealtime=yes |
| 42 | RestrictNamespaces=yes |
| 43 | RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 |
| 44 | LockPersonality=yes |
| 45 | MemoryDenyWriteExecute=yes |
| 46 | SystemCallArchitectures=native |
| 47 | SystemCallFilter=@system-service |
| 48 | SystemCallFilter=~@privileged |
| 49 | ProtectProc=invisible |
| 50 | ProcSubset=pid |
| 51 | RemoveIPC=yes |
| 52 | PrivateMounts=yes |
| 53 | KeyringMode=private |
| 54 | MemoryMax=1G |
| 55 | SystemCallErrorNumber=EPERM |
| 56 | CapabilityBoundingSet= |
| 57 | AmbientCapabilities= |
| 58 | KeyringMode=private |
| 59 | |
| 60 | [Install] |
| 61 | WantedBy=multi-user.target |