.env.example

# ===========================================
# Discord Self-Bot Configuration
# ===========================================

# Your Discord user token (NOT a bot token)
# See: https://github.com/ysdragon/StreamBot/wiki/Get-Discord-user-token
TOKEN=

# ===========================================
# Stream Settings
# ===========================================

# Video resolution and quality
STREAM_WIDTH=1280
STREAM_HEIGHT=720
STREAM_FPS=15
STREAM_BITRATE_KBPS=1500
STREAM_MAX_BITRATE_KBPS=2500

# Video codec for !stable: H264, H265, or VP8 (!join/!beta always use H264)
STREAM_VIDEO_CODEC=H264

# H26x encoding preset (ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow)
STREAM_H26X_PRESET=ultrafast

# Enable hardware acceleration for video decoding in !stable only
STREAM_HARDWARE_ACCELERATION=false

# ===========================================
# Chrome/Selenium Settings
# ===========================================

# X11 display number for Xvfb (e.g., ":99")
DISPLAY=:99

# Default URL to load when Chrome starts
DEFAULT_URL=https://youtube.com/tv

PRESET_YOUTUBE_URL=https://youtube.com/tv
PRESET_PLEX_URL=https://app.plex.tv/desktop

# User Agent (to allow YouTube TV)
USER_AGENT=Mozilla/5.0 (SMART-TV; LINUX; Tizen 7.0) AppleWebKit/537.36 (KHTML, like Gecko) 94.0.4606.31/7.0 TV Safari/537.36

# ===========================================
# Web UI Server
# ===========================================

# Enable after configuring Discord OAuth below; missing credentials fail startup closed
SERVER_ENABLED=false

# Port for the web UI server
SERVER_PORT=8080

# Native default is loopback; the Containerfile listens on 0.0.0.0 inside the container
SERVER_HOST=127.0.0.1

# ===========================================
# RBAC Configuration
# ===========================================

# Optional JSON map keyed by guild ID; see permissions.example.json and README.
# Without a file, only server owners and members with Administrator may join/control/navigate.
# Each guild has join/control/navigate/admin arrays of Discord role or user ID strings.
# Configured admin grants all levels within the member's current voice channel.
# A malformed or unreadable configured file prevents startup. Restart after editing.
# PERMISSIONS_FILE=./permissions.json

# ===========================================
# Discord OAuth Web Login
# ===========================================

# Create a Discord application and register this exact /auth/callback URL.
# HTTPS is required for remote access; HTTP is allowed only for loopback development.
# OAuth requests only identify; guild roles use the existing Discord connection.
# OAuth access/refresh tokens are not retained in web sessions.
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
DISCORD_REDIRECT_URI=http://localhost:8080/auth/callback