Skip to content

Downloading Streamplace

Terminal window
brew install streamplace/streamplace/streamplace
Terminal window
sudo mkdir -p /etc/apt/keyrings
curl https://release.stream.place/streamplace.key | sudo gpg --dearmor -o /etc/apt/keyrings/streamplace.key
echo 'deb [signed-by=/etc/apt/keyrings/streamplace.key] https://release.stream.place/debian/ all main' \
| sudo tee /etc/apt/sources.list.d/streamplace.list
sudo apt update
sudo apt install streamplace

This will install the streamplace systemd service. To configure it, you will want to edit the environment variables at /etc/streamplace/streamplace.env. An example production env file might look something like this:

# Handle default HTTP and HTTPS traffic for the server
SP_HTTP_ADDR=:80
SP_HTTPS_ADDR=:443
SP_SECURE=true
# Set this variable to your did:plc or did:web to have admin access to the node
SP_ADMIN_DIDS=did:web:example.com,did:plc:rbvrr34edl5ddpuwcubjiost
# If you're running Streamplace behind an HTTPS proxy, you'll want
# SP_SECURE=false
# SP_BEHIND_HTTPS_PROXY=true
# Necessary to advertise a public Streamplace broadcaster
SP_BROADCASTER_HOST=example.com
# If you have a multi-node cluster, they'll each need different public DNS names:
SP_SERVER_HOST=prod-nyc0.example.com
# If you don't want to syndicate everyone, add your list of allowed DIDs here:
SP_ALLOWED_STREAMS=did:web:example.com,did:plc:rbvrr34edl5ddpuwcubjiost
# Useful if your TLS cert and key aren't in the default
SP_TLS_CERT=/tls/tls.crt
SP_TLS_KEY=/tls/tls.key

Set SP_ATPROTO_DID=did:plc:... (or --atproto-did) to override the DID returned by /.well-known/atproto-did on all node hosts, including the broadcaster host in a multi-node cluster. Without an override, discovery returns the host-specific did:web identity. This does not change the node’s repository DIDs or DID documents.

A Streamplace node does not host the accounts from a PDS that previously ran at the same hostname. If their DID documents still point there, repository reads return HTTP 508 (Loop Detected) rather than repeatedly proxying back to the node. Restore the PDS or update those accounts’ PDS endpoints to make their records available again.

Repository reads forwarded by Streamplace carry X-Streamplace-Repo-Proxy. Reverse proxies must preserve this header: a node can serve its own repository to a forwarded request, but will not forward that request again.

Running Streamplace from a Docker image works great except for Docker networking. Streamplace relies heavily on WebRTC for playback, which requires large numbers of ephemeral UDP ports to work properly. So, we recommend using host networking. So that command would look something like:

Terminal window
docker run \
--name streamplace \
-d \
-e SP_HTTP_ADDR=:80 \
-e SP_HTTPS_ADDR=:443 \
-e SP_SECURE=true \
-e SP_BROADCASTER_HOST=example.com \
-e SP_ALLOWED_STREAMS=did:web:example.com,did:plc:rbvrr34edl5ddpuwcubjiost \
-v /var/lib/streamplace:/var/lib/streamplace \
--net=host \
ghcr.io/streamplace/streamplace

Binaries for all platforms are available to download from our GitLab server.

Terminal window
streamplace --http-addr=127.0.0.1:38080 \
--upstream-station=did:web:stream.place \
--relay-host=moqt://streamplace.network

SP_UPSTREAM_STATION and SP_RELAY_HOST are the environment equivalents. Without a station, normal server indexing and relay selection remain unchanged. With one, the node is a single-user AppView: it runs the usual indexing, but only for the accounts logged into it.

  • It takes each logged-in account’s events from that account’s per-DID track on every --relay-host, which must all be MoQ relays: an atmoq relay serves a per-DID track on demand. There is no aggregate firehose, no bsky.network and no local PDS firehose.
  • It indexes only users with a successfully completed, non-revoked local OAuth grant. Pending logins, unrelated followed users and repos left over from a previous standalone run do not permit PDS scraping. Per-DID subscriptions start at login and end when the last eligible grant ends. Reconnects reconcile the same scoped users with their actual PDS; historical records remain on disk after logout.
  • It signs users in through the station: the #streamplace HTTPS origin in the station’s DID document. The local node delegates to the station using its own DPoP key; the station independently authenticates to the PDS using its public HTTPS callback. Local HTTP OAuth requires a loopback listener; no public callback or development-only OAuth flag is needed on the local node.
  • It pushes the streams it ingests to the station over MoQ, unless --peers names other nodes.

Deploy the station’s chained-OAuth support before releasing Desktop clients that default to did:web:stream.place.

Recovering VODs after losing the server repository

Section titled “Recovering VODs after losing the server repository”

If the new node still has access to the old VOD objects but lost its server repository, point it at the original playback bucket (or local playback store). Make sure the node’s SQLite model index is up to date: recovery uses the published place.stream.video and place.stream.media.track records already in that index. It does not fetch records from the network.

Run on the node against the private admin listener:

Terminal window
curl -fsS -X POST 'http://127.0.0.1:39090/reindex-origins?recover=true'

Use SP_HTTP_INTERNAL_ADDR if you changed the listener address. With S3, the node needs permission to list the bucket and read object metadata. Recovery looks for blobs/<cid>.mp4 and its blobs/<cid>.json playback metafile. It publishes missing place.stream.media.origin records under the current server DID and indexes them immediately. It does not download video bytes, recreate missing playback files, or change existing origin records.

scanned and indexed count the existing server-repo records replayed into the index; recovered counts new origin commits. Review errors for any records or files that need attention. Run one recovery at a time; rerunning skips origins that have already been committed. Without ?recover=true, the endpoint only replays existing server-repo origins into the index.