summaryrefslogtreecommitdiffstats
path: root/packaging/systemd
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-11 22:11:18 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-11 22:11:18 +0200
commitbbfc45925e82c364519b9d796758003365bc9005 (patch)
treed635473b6eea3d342b013c67552c52187e954e6c /packaging/systemd
parent3015c631883b8289369bb29a3842a3971e608170 (diff)
downloadmeshbay-bbfc45925e82c364519b9d796758003365bc9005.tar.gz
feat(node): Phase 11 — production-ready daemon with WebRTC, WS, chat, HTTP
The node daemon was previously a skeleton that only started QUIC/TCP servers and the local web UI. All browser-facing functionality (WebRTC, hub WebSocket, chat store, HTTP file API) lived in QE demo scripts. This rewrites daemon.py to be fully self-contained: - WebRTC transport for browser clients (aiortc DataChannel) - Hub WebSocket task (signaling, revocations, WebRTC offers) - ChatStore per group (SQLite in ~/.local/share/meshbay/) - HTTP file API per group (create_http_app on configured port) - Graceful shutdown (all transports, stores, tasks) - hub_client: _ws tracking + send_ws() for chat notifications - config: data_dir field for persistent state - systemd: security hardening (ProtectSystem, StateDirectory) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'packaging/systemd')
-rw-r--r--packaging/systemd/meshbay-node.service11
1 files changed, 8 insertions, 3 deletions
diff --git a/packaging/systemd/meshbay-node.service b/packaging/systemd/meshbay-node.service
index e64934f..edff7f1 100644
--- a/packaging/systemd/meshbay-node.service
+++ b/packaging/systemd/meshbay-node.service
@@ -1,5 +1,5 @@
[Unit]
-Description=MeshBay Node — local file host and streaming server
+Description=MeshBay Node — P2P file host, streaming, and chat
Documentation=https://meshbay.org/docs
After=network-online.target
Wants=network-online.target
@@ -12,18 +12,23 @@ Group=%i
# Per-user service: systemctl enable --now meshbay-node@$USER
WorkingDirectory=%h
-# Override unlock mode in ~/.config/meshbay/hub.env
+# Secrets: MESHBAY_PASSWORD (hub login), MESHBAY_UNLOCK_KEY (keystore)
EnvironmentFile=-%h/.config/meshbay/node.env
-# Alternative: MESHBAY_UNLOCK_KEY=<password> in environment file (chmod 600)
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