-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
110 lines (88 loc) · 4.61 KB
/
Copy path.env.example
File metadata and controls
110 lines (88 loc) · 4.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Flask secret (signature for token/login cookie) — generate: python3 -c "import secrets; print(secrets.token_hex(32))"
FLASK_SECRET_KEY=change_me_secret
# Where app.py writes the rendered nginx RTMP config (restream list defaults to rtmp_endpoints.json beside the app).
NGINX_CONF_OUT=/etc/nginx/nginx.conf
# OBS host machine — SSH user/IP/MAC of the OBS PC (certificate-based SSH login)
MINI_PC_USER=youruser
MINI_PC_IP=192.168.1.50
MAC_ADDRESS=AA:BB:CC:DD:EE:FF
# OBS WebSocket — enable in OBS: https://obsproject.com/kb/obs-websocket-guide
OBS_HOST=192.168.0.50
OBS_PORT=4455
OBS_PASSWORD=your_obs_password
STARTING_SCENE_NAME=Starting soon
LIVE_SCENE_NAME=LIVE
LOW_SCENE_NAME=lowbitrate
BRB_SCENE_NAME=BRB
OFFLINE_SCENE_NAME=Offline
OBS_RECONNECT_INTERVAL_SEC=10
OBS_MAX_RECONNECT_WAIT_SEC=60
# --- Twitch (required) — one app powers both app.py and stream_guard.py ---
# 1) Create an app at https://dev.twitch.tv/console/apps, set the OAuth Redirect URL to
# AUTH_PUBLIC_BASE + /callback, then copy the Client ID + Secret below.
TWITCH_CLIENT_ID=
TWITCH_CLIENT_SECRET=
# 2) Your numeric user ID (not username):
# https://www.streamweasels.com/tools/convert-twitch-username-to-user-id/
TWITCH_BROADCASTER_ID=
# 3) First user tokens: run auth_server_SG.py and authorize in your browser (writes
# twitch_tokens.json; app.py refreshes them afterward). twitchtokengenerator.com works
# too — but never paste your Client Secret into third-party tools.
TWITCH_OAUTH_TOKEN=
TWITCH_REFRESH_TOKEN=
# Scopes — remove channel:read:hype_train, moderator:manage:banned_users, moderator:manage:chat_messages and channel:read:redemptions if not using unified-chat.
TWITCH_SCOPES=channel:manage:broadcast channel:manage:raids user:read:chat user:write:chat channel:read:hype_train moderator:manage:banned_users moderator:manage:chat_messages channel:read:redemptions
# Twitch auth helper (auth_server_SG.py) — see "First-time Twitch authorization" in the README.
# Empty AUTH_PUBLIC_BASE = http://localhost:3750. The Twitch app's OAuth Redirect URL must equal
# AUTH_PUBLIC_BASE + /callback. Headless box: use a browser/Twitch-reachable URL (e.g. a Cloudflare Tunnel).
AUTH_PUBLIC_BASE=
AUTH_BIND_HOST=0.0.0.0
AUTH_PORT=3750
# Login password. Run "python3 generate_password_hash.py yourpassword" to generate the hash, then paste it below. Empty = no password.
LOGIN_PASSWORD_HASH=
# Chatbot moderation (ONLY IF USING Chatbot-relay project) — file the add-word UI appends to (set to your chatbot's path).
CHATBOT_BANNED_WORDS_PATH=/home/USER/chatbot/banned_words.txt
# --- Optional embeds: leave EMPTY to hide the feature; fill in to enable ---
# Belabox tab. Example: https://belabox.example.com
BELABOX_EMBED_URL=
# Chat tab when "Unified chat" is ON (OFF = native Twitch chat).
# Example: https://unified-chat.example.com/popout?platform_names=0
# Tip: append &token=<POPOUT_TOKEN> (from unified-chat's .env) so the embedded chat skips login (incl. replying). Both must match.
UNIFIED_CHAT_EMBED_URL=
# SRT link under Advanced > Stream link. Example: srt://srt.example.com:PORT?streamid=play/stream/you
SRT_LINK_URL=
# PWA icons + favicon base. Empty = use the bundled static/logo.png. Example: https://assets.example.com/icons
PWA_ICON_BASE_URL=
# StreamElements alert overlay (donos/subs), played when sound is enabled. Example: https://streamelements.com/overlay/<id>/<token>
STREAMELEMENTS_OVERLAY_URL=
# Sound Alerts (channel-point TTS) browser-source URL, played when sound is enabled. Empty = off.
# Example: https://source.soundalerts.com/alert/<your-id>
SOUNDALERTS_URL=
LOGLEVEL=warning
GUNICORN_ACCESSLOG=./logs/access.log
# Stream Guard — SLS/Belabox stats endpoint (also drives the SLS health dot)
STATS_URL=http://192.168.0.50:8181/stats
BITRATE_LOW_KBPS=800
BITRATE_HIGH_KBPS=2000
POLL_INTERVAL_SEC=1
LOW_CONSEC_SAMPLES=2
REQUEST_TIMEOUT=1.0
WAIT_FOR_STREAM_START=true
IDLE_WHEN_STREAM_ENDS=true
EXIT_WHEN_STREAM_ENDS=false
OBS_RECONNECT_INTERVAL_SEC=10
# Where StreamGuard sends bitrate alerts (the web app). Default works.
ALERTS_BASE_URL=http://127.0.0.1:5000
TRUSTED_PROXY_IPS=127.0.0.0/8,::1/128
# Shared secret that enables the bitrate alert sounds — empty = alerts off. Generate one:
# python3 -c "import secrets; print(secrets.token_urlsafe(32))"
ALERT_TOKEN=
# Raid auto-stop (EventSub channel.raid -> stop OBS stream)
RAID_AUTO_STOP_ENABLED=true
RAID_AUTO_STOP_DELAY=0
RAID_SEND_CHAT_MESSAGE=true
RAID_CHAT_MESSAGE=Raided {channel} successfully & ended stream!
# Leave unset to let stream-guard mint its own app token.
TWITCH_TOKEN_EXPIRES_AT=
# ChatGuard — comma-separated Twitch usernames allowed to run chat commands.
TWITCH_ADMINS=admin1, admin2