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 public SSH access ledger (one collect pass)
3After=network-online.target
4Wants=network-online.target
5
6[Service]
7Type=oneshot
8# Optional overrides: STATUS_BUCKET / STATUS_REGION (mirror status-publish.sh).
9EnvironmentFile=-/data/status.env
10# "+" = outside the sandbox: both ReadWritePaths must exist before
11# ProtectSystem=strict mounts them, or the first-ever run fails to namespace.
12ExecStartPre=+/usr/bin/mkdir -p /data/ssh-ledger /opt/lchat/status-pages
13ExecStart=/opt/lchat/ssh-ledger-collect.sh
14
15# --- hardening (see docs/instance-router.md § Hardening) ---
16# Runs as ROOT deliberately: the sshd journal is root/systemd-journal readable
17# and /data/ssh-ledger + /opt/lchat/status-pages are its only writes —
18# ProtectSystem=strict pins exactly those. It is fired by
19# lchat-ssh-ledger.timer, never routed or listening, and publishes METADATA
20# ONLY (see the script's privacy header).
21ProtectSystem=strict
22ReadWritePaths=/data/ssh-ledger /opt/lchat/status-pages
23ProtectHome=yes
24PrivateTmp=yes
25PrivateDevices=yes
26ProtectClock=yes
27ProtectHostname=yes
28ProtectKernelTunables=yes
29ProtectKernelModules=yes
30ProtectKernelLogs=yes
31NoNewPrivileges=yes
32RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
33RestrictNamespaces=yes
34RestrictRealtime=yes
35LockPersonality=yes
36MemoryDenyWriteExecute=yes
37MemoryMax=256M
38TasksMax=64
39