[READ-ONLY] Mirror of https://github.com/mrgnw/dlna-rs. Single-binary DLNA media server in Rust. Auto-discovered by VLC on Apple TV.
0

Configure Feed

Select the types of activity you want to include in your feed.

28 2 1

Clone this repository

https://git.vm.fail/xcc.es/dlna-rs https://git.vm.fail/did:plc:sooj3ukm5gee6whwa2curf62
ssh://git@knot1.tangled.sh:2222/xcc.es/dlna-rs ssh://git@knot1.tangled.sh:2222/did:plc:sooj3ukm5gee6whwa2curf62

For self-hosted knots, clone URLs may differ based on your setup.


README.md

dlna-rs#

Single-binary DLNA/UPnP media server in Rust. Auto-discovered by VLC on AppleTV. Embedded Svelte web UI for managing the advertised folders.

Built on librqbit-upnp-serve for SSDP + UPnP ContentDirectory; HTTP streaming with Range requests + DLNA headers handled directly.

Build#

Requires Rust (stable) and bun.

cargo build --release

The web UI is built automatically via build.rs (runs bun install + bun run build in web/).

Run#

./target/release/dlna-rs --folder /path/to/media

Then on Apple TV: VLC → Network → Local Network. The server appears under its friendly name (default: dlna-rs (hostname)).

For the admin UI, open http://localhost:9119/ in a browser.

Config#

~/.config/dlna-rs/config.styx (auto-created on first save):

port 9119
friendly_name "dlna-rs (hostname)"
folders ({path "/Users/m/Movies", recursive true})

(Format is whatever facet-styx 3.x parses — close to styx but not identical to bearcove's reference.)

CLI flags override:

--config <PATH>         path to config file
--port <PORT>           HTTP port (default 9119)
--friendly-name <NAME>  DLNA friendly name
--folder <PATH>         append a recursive folder (repeatable)
--folder-flat <PATH>    append a non-recursive folder (repeatable)

Endpoints#

Path Purpose
/ Embedded Svelte admin UI
/status Plain-text folder + count summary
/api/folders GET / POST / DELETE folders
/api/folders/refresh POST to recount a folder
/api/browse?path=… Server-side directory browser
/api/status JSON status
/stream/{id} File streaming, Range + DLNA headers
/description.xml UPnP device description
/scpd/*, /control/* UPnP SOAP services

VLC AppleTV verification#

  1. Start: ./target/release/dlna-rs --folder ~/Movies (or a folder with video files).
  2. On macOS: System Settings → Network → Firewall → ensure incoming connections to dlna-rs are allowed (or temporarily disable firewall).
  3. Apple TV: open VLC → "Network" tab → "Local Network".
  4. Expect: a row labelled with the friendly name (dlna-rs (<your-hostname>)).
  5. Open it; configured folders appear as containers.
  6. Open a video file → playback should start.

Troubleshooting:

  • curl http://localhost:9119/description.xml should return XML.
  • curl http://localhost:9119/status should list your folders.
  • On a Mac on the same network: dns-sd -B _ssdp._udp or pip install ssdpy && ssdpy-discover to confirm SSDP announcements.
  • If VLC doesn't see it: macOS firewall and "Local Network" privacy settings (Settings → Privacy & Security → Local Network) are the usual culprits.

License#

LLM-assisted. MIT.