[Unit] Description=MeshBay Node โ€” P2P file host, streaming, and chat Documentation=https://meshbay.org/docs After=network-online.target Wants=network-online.target [Service] Type=simple User=%i Group=%i # Per-user service: systemctl enable --now meshbay-node@$USER WorkingDirectory=%h # Secrets: MESHBAY_PASSWORD (hub login), MESHBAY_UNLOCK_KEY (keystore), # MESHBAY_TMDB_DEFAULT_TOKEN (Videos app โ€” optional, no literal default # ships in source; absent means TMDB lookups are inert until the operator # sets one here or configures a custom token in Settings, docs/mediacenter.md ยง5.5) EnvironmentFile=-%h/.config/meshbay/node.env ExecStart=/usr/bin/meshbay-node --config %h/.config/meshbay/node.toml Restart=on-failure RestartSec=10 TimeoutStopSec=30 # Data: chat DBs, indexes โ€” default ~/.local/share/meshbay/ StateDirectory=meshbay # Security hardening NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ReadWritePaths=%h/.config/meshbay %h/.local/share/meshbay # Groups' shared_dir paths must be added to ReadWritePaths if outside ~ [Install] WantedBy=default.target