Download this file
| 1 | [Unit] |
| 2 | Description=lchat links redirector (11ch.at short links) |
| 3 | After=network-online.target |
| 4 | Wants=network-online.target |
| 5 | |
| 6 | [Service] |
| 7 | # No env file: unlike home/push this holds no secrets and no database — just |
| 8 | # an in-memory, TTL-bounded verification cache (see linkscmd.go). |
| 9 | ExecStart=/opt/lchat/lchat links run --socket /run/lchat/links.sock |
| 10 | Restart=always |
| 11 | RestartSec=1 |
| 12 | |
| 13 | # --- hardening (see docs/instance-router.md § Hardening) --- |
| 14 | User=lchat |
| 15 | Group=lchat |
| 16 | CapabilityBoundingSet= |
| 17 | NoNewPrivileges=yes |
| 18 | ProtectSystem=strict |
| 19 | ProtectHome=yes |
| 20 | ReadWritePaths=/run/lchat |
| 21 | PrivateTmp=yes |
| 22 | PrivateDevices=yes |
| 23 | ProtectClock=yes |
| 24 | ProtectHostname=yes |
| 25 | ProtectKernelTunables=yes |
| 26 | ProtectKernelModules=yes |
| 27 | ProtectKernelLogs=yes |
| 28 | ProtectControlGroups=yes |
| 29 | ProtectProc=invisible |
| 30 | RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX |
| 31 | RestrictNamespaces=yes |
| 32 | RestrictRealtime=yes |
| 33 | RestrictSUIDSGID=yes |
| 34 | LockPersonality=yes |
| 35 | MemoryDenyWriteExecute=yes |
| 36 | SystemCallFilter=@system-service |
| 37 | SystemCallErrorNumber=EPERM |
| 38 | SystemCallArchitectures=native |
| 39 | MemoryMax=256M |
| 40 | TasksMax=256 |
| 41 | |
| 42 | [Install] |
| 43 | WantedBy=multi-user.target |
| 44 | |