Download this file
| 1 | [Unit] |
| 2 | Description=lchat home server (passkey blob backup) |
| 3 | After=network-online.target |
| 4 | Wants=network-online.target |
| 5 | |
| 6 | [Service] |
| 7 | # /data/home.env holds LCHAT_HOME_ORIGIN — the WebAuthn RP identity. It must equal |
| 8 | # the public host the router serves this on, or previously-enrolled passkeys orphan. |
| 9 | EnvironmentFile=/data/home.env |
| 10 | ExecStart=/opt/lchat/home --addr /run/lchat/home.sock --db /data/home.db |
| 11 | Restart=always |
| 12 | RestartSec=1 |
| 13 | |
| 14 | # --- hardening (see docs/instance-router.md § Hardening) --- |
| 15 | User=lchat |
| 16 | Group=lchat |
| 17 | CapabilityBoundingSet= |
| 18 | NoNewPrivileges=yes |
| 19 | ProtectSystem=strict |
| 20 | ProtectHome=yes |
| 21 | ReadWritePaths=/data /run/lchat |
| 22 | PrivateTmp=yes |
| 23 | PrivateDevices=yes |
| 24 | ProtectClock=yes |
| 25 | ProtectHostname=yes |
| 26 | ProtectKernelTunables=yes |
| 27 | ProtectKernelModules=yes |
| 28 | ProtectKernelLogs=yes |
| 29 | ProtectControlGroups=yes |
| 30 | ProtectProc=invisible |
| 31 | RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX |
| 32 | RestrictNamespaces=yes |
| 33 | RestrictRealtime=yes |
| 34 | RestrictSUIDSGID=yes |
| 35 | LockPersonality=yes |
| 36 | MemoryDenyWriteExecute=yes |
| 37 | SystemCallFilter=@system-service |
| 38 | SystemCallErrorNumber=EPERM |
| 39 | SystemCallArchitectures=native |
| 40 | MemoryMax=256M |
| 41 | TasksMax=256 |
| 42 | |
| 43 | [Install] |
| 44 | WantedBy=multi-user.target |
| 45 | |