aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/systemd/meshbay-node.service
blob: ad4dc40cdd8c8c755d933408dfa76772d9e034da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[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=/opt/meshbay-common/venv/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