Skip to main content

stream-gateway

stream-gateway — ɳSelf documentation.

Stream Gateway Plugin

Stream admission control, viewer authentication, analytics, and family controls. Pro plugin.

Requires: Basic license tier or higher. nself license set nself_pro_...

Install

nself license set nself_pro_xxxxx...
nself plugin install stream-gateway

What It Does

Acts as a gatekeeper between viewers and your streaming server. Validates viewer entitlements before allowing stream access, tracks concurrent viewer counts, collects per-viewer quality analytics (buffering, bitrate switches), and enforces family member controls such as content ratings and concurrent stream limits per account.

Configuration

Env VarDefaultDescription
STREAM_GATEWAY_PORT3093Stream gateway port
STREAM_GATEWAY_MAX_STREAMS_PER_ACCOUNT3Concurrent stream limit
STREAM_GATEWAY_TOKEN_TTL3600Viewer access token TTL
STREAM_GATEWAY_GEO_ENABLEDfalseEnable geo-restriction

Ports

PortPurpose
3093Stream gateway REST API

Database Tables

4 tables added to your Postgres database:

  • np_stream_gateway_sessions: active viewer sessions
  • np_stream_gateway_analytics: per-viewer quality metrics
  • np_stream_gateway_profiles: family member profiles
  • np_stream_gateway_restrictions: content access restrictions

Nginx Routes

RouteTarget
/stream-gateway/Stream gateway API
/stream-gateway/admitViewer admission endpoint