Streamd v0.2.0: rename, modules panel, stable/beta channels
All checks were successful
release / build-and-upload (push) Successful in 7m5s

- Rename product/host binary to streamd (drm compat copy still shipped)
- Go module path streamd; STREAMD_* env aliases; agent UA streamd-agent
- Panel Modules store + agent pull sync (modstore / modsync)
- Rolling stable + beta download tags; README/docs channel curl blocks
- Release notes in docs/releases/v0.2.0.md attached by Forgejo Actions
This commit is contained in:
404errordeveloper 2026-10-10 15:58:26 +02:00
parent 066e018749
commit da8e1123ec
140 changed files with 2949 additions and 851 deletions

View file

@ -1,6 +1,6 @@
# Streamd + agent on a Linux server (for dummies)
This guide is only for **streamd** (`drm serve`) and the **agent** (`drm agent run`)
This guide is only for **streamd** (`streamd serve`) and the **agent** (`streamd agent run`)
on a **Linux** box. Copy-paste the commands. Change the bits in `CAPS` or
`<angle brackets>`.
@ -14,8 +14,8 @@ For the deep reference (every flag, every API route), see [streamd.md](streamd.m
| Piece | Command | Job |
|---|---|---|
| **streamd** | `drm serve` | Dashboard + API + pulls the MPD and serves HLS |
| **agent** | `drm agent run` | Optional. Uses a phone to refresh MPD/keys when they expire |
| **streamd** | `streamd serve` | Dashboard + API + pulls the MPD and serves HLS |
| **agent** | `streamd agent run` | Optional. Uses a phone to refresh MPD/keys when they expire |
If you already have a working MPD URL and Widevine keys (`KID:KEY`), you can run
**streamd alone**. Start the agent later when you want automatic refresh.
@ -35,8 +35,8 @@ Check your CPU type:
uname -m
```
- `x86_64` → download `drm-linux-amd64`
- `aarch64` → download `drm-linux-arm64`
- `x86_64` → download `streamd-linux-amd64`
- `aarch64` → download `streamd-linux-arm64`
---
@ -47,24 +47,36 @@ mkdir -p ~/null-drm
cd ~/null-drm
```
Pick the matching line (replace `v0.1.4` if a newer `v*` release exists — check
[releases](https://git.nulldrm.com/nulldrm/Null-DRM-Official/releases)):
Grab a rolling channel build (always the newest — no version pin). Pick **one**
block for your CPU. Pin with a concrete tag (`v0.1.5`, `v0.2.0-beta.1`, …) when
you need a fixed install.
**Linux Intel / AMD 64-bit (stable)**
```bash
# Intel / AMD 64-bit
curl -fL -o drm \
"https://git.nulldrm.com/nulldrm/Null-DRM-Official/releases/download/v0.1.4/drm-linux-amd64"
curl -fL -o streamd \
"https://git.nulldrm.com/nulldrm/Null-DRM-Official/releases/download/stable/streamd-linux-amd64"
```
# OR ARM 64-bit (Raspberry Pi 4+, many cloud ARM VMs)
# curl -fL -o drm \
# "https://git.nulldrm.com/nulldrm/Null-DRM-Official/releases/download/v0.1.4/drm-linux-arm64"
**Linux ARM 64-bit (stable)** — Raspberry Pi 4+, many cloud ARM VMs
```bash
curl -fL -o streamd \
"https://git.nulldrm.com/nulldrm/Null-DRM-Official/releases/download/stable/streamd-linux-arm64"
```
**Beta channel (Linux Intel / AMD 64-bit pre-release)**
```bash
curl -fL -o streamd \
"https://git.nulldrm.com/nulldrm/Null-DRM-Official/releases/download/beta/streamd-linux-amd64"
```
Make it executable and check it works:
```bash
chmod +x drm
./drm help
chmod +x streamd
./streamd help
```
You should see a list of commands including `serve` and `agent`.
@ -73,7 +85,7 @@ Optional layout after first run:
```text
~/null-drm/
drm # the binary
streamd # the binary
.cache/streamd/ # created by serve (database, HLS, logs)
.cache/agent/ # created by agent
agent.yaml # you create this for the agent
@ -92,7 +104,7 @@ not stuck hunting a setup token in the logs:
```bash
cd ~/null-drm
./drm serve \
./streamd serve \
--bind 0.0.0.0:8083 \
--data .cache/streamd \
--admin-user admin \
@ -236,7 +248,7 @@ Skip this section if you will paste MPD/keys yourself forever.
- `adb` on the server `PATH`
- A rooted phone with the streaming app **already installed** (agent never installs apps)
- USB debugging authorised (`adb devices` shows `device`)
- Provider modules under `modules/` if you use phone capture for that app
- Provider modules uploaded in the streamd **Modules** page (drag-drop `.zip`); agents pull them with `sync_modules: true`
- A `.wvd` at `data/device.wvd` (or set `wvd:` in the config) for key fetch
### Config file
@ -265,15 +277,15 @@ Save, then run:
```bash
cd ~/null-drm
./drm agent run --config agent.yaml
./streamd agent run --config agent.yaml
```
Useful checks:
```bash
./drm agent devices
./drm agent status
./drm agent enqueue --stream city-news --reason manual
./streamd agent devices
./streamd agent status
./streamd agent enqueue --stream city-news --reason manual
```
In the dashboard, **Refresh keys** on a stream asks connected agents to capture now.
@ -282,7 +294,7 @@ In the dashboard, **Refresh keys** on a stream asks connected agents to capture
## 6. Keep it running when you close the terminal
If you close SSH while `drm serve` is in the foreground, it dies. Pick one method.
If you close SSH while `streamd serve` is in the foreground, it dies. Pick one method.
### Method A — `screen` (simplest)
@ -296,7 +308,7 @@ Start streamd inside a named screen:
```bash
cd ~/null-drm
screen -S streamd
./drm serve --bind 0.0.0.0:8083 --data .cache/streamd
./streamd serve --bind 0.0.0.0:8083 --data .cache/streamd
```
Detach without killing it: press **`Ctrl+A`**, then **`D`**.
@ -312,7 +324,7 @@ Second screen for the agent:
```bash
screen -S agent
cd ~/null-drm
./drm agent run --config agent.yaml
./streamd agent run --config agent.yaml
# Ctrl+A then D
```
@ -324,7 +336,7 @@ List sessions: `screen -ls`
sudo apt-get install -y tmux
cd ~/null-drm
tmux new -s streamd
./drm serve --bind 0.0.0.0:8083 --data .cache/streamd
./streamd serve --bind 0.0.0.0:8083 --data .cache/streamd
# Detach: Ctrl+B then D
# Reattach: tmux attach -t streamd
```
@ -333,11 +345,11 @@ tmux new -s streamd
```bash
cd ~/null-drm
nohup ./drm serve --bind 0.0.0.0:8083 --data .cache/streamd > streamd.log 2>&1 &
nohup ./streamd serve --bind 0.0.0.0:8083 --data .cache/streamd > streamd.log 2>&1 &
echo $! > streamd.pid
# optional agent
nohup ./drm agent run --config agent.yaml > agent.log 2>&1 &
nohup ./streamd agent run --config agent.yaml > agent.log 2>&1 &
echo $! > agent.pid
```
@ -356,7 +368,7 @@ Create a user unit (no root binary needed). Paths assume install in `/home/ubunt
```bash
sudo tee /etc/systemd/system/streamd.service >/dev/null <<'EOF'
[Unit]
Description=Null-DRM streamd (drm serve)
Description=Streamd (streamd serve)
After=network-online.target
Wants=network-online.target
@ -364,7 +376,7 @@ Wants=network-online.target
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu/null-drm
ExecStart=/home/ubuntu/null-drm/drm serve --bind 0.0.0.0:8083 --data /home/ubuntu/null-drm/.cache/streamd
ExecStart=/home/ubuntu/null-drm/streamd serve --bind 0.0.0.0:8083 --data /home/ubuntu/null-drm/.cache/streamd
Restart=on-failure
RestartSec=5
# Optional first-boot admin (ignored once users exist):
@ -374,9 +386,9 @@ RestartSec=5
WantedBy=multi-user.target
EOF
sudo tee /etc/systemd/system/drm-agent.service >/dev/null <<'EOF'
sudo tee /etc/systemd/system/streamd-agent.service >/dev/null <<'EOF'
[Unit]
Description=Null-DRM credentials agent
Description=Streamd credentials agent
After=network-online.target streamd.service
Wants=network-online.target
Requires=streamd.service
@ -385,7 +397,7 @@ Requires=streamd.service
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu/null-drm
ExecStart=/home/ubuntu/null-drm/drm agent run --config /home/ubuntu/null-drm/agent.yaml
ExecStart=/home/ubuntu/null-drm/streamd agent run --config /home/ubuntu/null-drm/agent.yaml
Restart=on-failure
RestartSec=5
@ -396,7 +408,7 @@ EOF
sudo systemctl daemon-reload
sudo systemctl enable --now streamd.service
# when ready for the agent:
# sudo systemctl enable --now drm-agent.service
# sudo systemctl enable --now streamd-agent.service
```
Useful commands:
@ -408,7 +420,7 @@ sudo systemctl restart streamd
sudo systemctl stop streamd
```
Same pattern with `drm-agent` for the agent unit.
Same pattern with `streamd-agent` for the agent unit.
---
@ -418,7 +430,7 @@ Same pattern with `drm-agent` for the agent unit.
cd ~/null-drm
# binary runs
./drm help
./streamd help
# streamd answers
curl -sS http://127.0.0.1:8083/api/health
@ -439,7 +451,7 @@ Play the m3u8 in VLC / ffplay / any HLS player using the server IP URL.
| Symptom | Fix |
|---|---|
| `Permission denied` running `./drm` | `chmod +x drm` |
| `Permission denied` running `./streamd` | `chmod +x streamd` |
| Browser cannot open the page | Use `--bind 0.0.0.0:8083`, open firewall port 8083, check `curl` from the server itself |
| Stream will not start | MPD must be `http://` or `https://`. Encrypted streams need `KID:KEY` lines |
| Agent does nothing | Operator API key wrong; stream **Enabled**; phone in `adb devices` as `device`; app installed |
@ -458,11 +470,11 @@ Upgrade:
```bash
cd ~/null-drm
# stop streamd first (systemctl stop streamd / kill / Ctrl+C)
curl -fL -o drm.new \
"https://git.nulldrm.com/nulldrm/Null-DRM-Official/releases/download/v0.1.4/drm-linux-amd64"
chmod +x drm.new
mv drm drm.bak
mv drm.new drm
curl -fL -o streamd.new \
"https://git.nulldrm.com/nulldrm/Null-DRM-Official/releases/download/stable/streamd-linux-amd64"
chmod +x streamd.new
mv streamd streamd.bak
mv streamd.new streamd
# start again
```