eleven / ocho Public

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

Plain git — no account needed to clone.

Download

Download this file

1[Unit]
2Description=lchat push relay
3After=network-online.target
4Wants=network-online.target
5
6[Service]
7# /data/push.env holds LCHAT_ADMIN_TOKEN + the APNs signing key (LCHAT_APNS_*).
8# Required (no leading '-'): a push relay with no signing key is a fleet-wide iOS
9# push outage, so it must fail to boot rather than start silently broken.
10EnvironmentFile=/data/push.env
11ExecStart=/opt/lchat/push --addr /run/lchat/push.sock --db /data/push.db
12Restart=always
13RestartSec=1
14
15# --- hardening (see docs/instance-router.md § Hardening) ---
16User=lchat
17Group=lchat
18CapabilityBoundingSet=
19NoNewPrivileges=yes
20ProtectSystem=strict
21ProtectHome=yes
22ReadWritePaths=/data /run/lchat
23PrivateTmp=yes
24PrivateDevices=yes
25ProtectClock=yes
26ProtectHostname=yes
27ProtectKernelTunables=yes
28ProtectKernelModules=yes
29ProtectKernelLogs=yes
30ProtectControlGroups=yes
31ProtectProc=invisible
32RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
33RestrictNamespaces=yes
34RestrictRealtime=yes
35RestrictSUIDSGID=yes
36LockPersonality=yes
37MemoryDenyWriteExecute=yes
38SystemCallFilter=@system-service
39SystemCallErrorNumber=EPERM
40SystemCallArchitectures=native
41MemoryMax=256M
42TasksMax=256
43
44[Install]
45WantedBy=multi-user.target
46