eleven / messenger Public

Clone
git clone https://amadan.net/eleven/messenger

Plain git — no account needed to clone.

Download

Download this file

1[Unit]
2Description=lchat control daemon (local provisioning API)
3After=network-online.target
4Wants=network-online.target
5
6[Service]
7# The router's env FIRST: controld executes add-instance, whose mesh route
8# replication (fanOutMeshRoute) must see the box's mesh identity exactly as
9# the router does (LCHAT_MESH_SELF/_TOKEN/_DOMAINS, the hibernate bucket +
10# store credentials). Without this line the fan-out silently no-ops and any
11# create HRW-placed on a peer box is born dark — the peer answers "unknown
12# host" for it. control.env second, so control-specific values still win.
13EnvironmentFile=-/data/router.env
14# Optional overrides: LCHAT_MAX_INSTANCES / LCHAT_MIN_FREE_GB (capacity policy).
15EnvironmentFile=-/data/control.env
16ExecStart=/opt/lchat/lchat controld
17Restart=always
18RestartSec=1
19
20# --- hardening (see docs/instance-router.md § Hardening) ---
21# Runs as ROOT deliberately: this is the one process allowed to call systemctl
22# and write the version store (/opt/lchat), which is why it serves a local unix
23# socket only and is never routed publicly. NoNewPrivileges and the syscall
24# filter are omitted for the systemctl child; the rest of the sandbox applies.
25ProtectHome=yes
26PrivateTmp=yes
27PrivateDevices=yes
28ProtectClock=yes
29ProtectHostname=yes
30ProtectKernelTunables=yes
31ProtectKernelModules=yes
32ProtectKernelLogs=yes
33RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
34RestrictNamespaces=yes
35RestrictRealtime=yes
36LockPersonality=yes
37MemoryDenyWriteExecute=yes
38MemoryMax=256M
39TasksMax=64
40
41[Install]
42WantedBy=multi-user.target
43