[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). # MESHBAY_MUSICBRAINZ_CONTACT_DEFAULT (Music app — optional, no literal # default ships in source either; not a credential, but still never a # literal value in git — it's a personal contact address sent as-is in # every MusicBrainz request's User-Agent, docs/musicbay.md §3.2). Absent # means MusicBrainz lookups are inert until the operator sets one here or # configures a contact in Settings. 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