Docs

Getting started

This is the shortest practical path to a working Beam Networks Stream setup: get the worker online first, get OBS writing segments locally, then run the agent against a real ingest endpoint.

Prerequisites

  • macOS, Linux, or Windows for the on-site agent
  • OBS Studio 30+
  • Go 1.22+ if you are building the agent from source
  • A Cloudflare account for Worker and R2 setup
  • Docker for local development

Recommended order

  1. 1. Create the R2 bucket.
  2. 2. Deploy the ingest worker once by hand.
  3. 3. Point the agent at the deployed worker URL and verify uploads.
  4. 4. Add CI/CD automation after the manual path is confirmed.

That order is the least confusing way to get to a working test, because the pipeline in this repo assumes the Cloudflare bucket, worker, and deploy targets already exist.

Bootstrap the Cloudflare ingest worker

  1. 1. Create an R2 bucket named beam-stream-segments.
  2. 2. Copy your Cloudflare account ID.
  3. 3. Create an API token with Workers and R2 permissions.
  4. 4. Export CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN.
  5. 5. From cloud/worker, run npm install, set the API_SECRET_KEY Wrangler secret, then deploy with npx wrangler deploy.

Keep secrets in Wrangler or your deployment environment, not in tracked files. The intended production ingest hostname for this repo is ingest.beamnetworks.stream.

Get OBS writing segments locally

Configure OBS to record HLS output locally first. The agent expects small 2-second segments and a matching keyframe interval. The detailed settings live in the OBS guide below.

Open OBS setup

Build and run the agent

cd agent

cp agent.yaml my-config.yaml

# edit my-config.yaml with your stream_id, agent_id, and api_endpoint

go build -o beam-agent ./cmd/agent

./beam-agent --config my-config.yaml

Once the agent sees OBS output and the worker is reachable, you have the minimum viable path for upload testing.

Common firewall and network needs

If you are also running the reassembly buffer on a VM, the basic outbound ports to allow are:

  • 443/TCP to Cloudflare R2
  • 443/TCP to ingest.beamnetworks.stream
  • 1935/TCP to your RTMP destination such as YouTube