-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
130 lines (120 loc) · 5.24 KB
/
.env.example
File metadata and controls
130 lines (120 loc) · 5.24 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Flask
# Generate a random secret:
# python3 -c "import secrets; print(secrets.token_hex(32))"
FLASK_SECRET_KEY=change_me_secret
# Paths
# CONFIG_PATH: local JSON file that stores restream endpoints
CONFIG_PATH=/home/USER/stream-control/rtmp_endpoints.json
# NGINX_CONF_OUT: where app.py writes the rendered nginx RTMP config
NGINX_CONF_OUT=/etc/nginx/nginx.conf
# OBS host machine
# MINI_PC_USER / MINI_PC_IP / MAC_ADDRESS:
# Fill in the SSH username, LAN IP, and MAC address of the machine running OBS.
# Need to be configured to use 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 and configure this inside 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 (the same app is used by both app.py and stream_guard.py)
# Create/manage your Twitch app here:
# https://dev.twitch.tv/console/apps
# Twitch OAuth / token docs:
# https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/
# Twitch channel settings dashboard:
# https://dashboard.twitch.tv/settings/channel
# Easier web tools for non-technical setup:
# - Twitch user ID lookup: https://www.streamweasels.com/tools/convert-twitch-username-to-user-id/
# - Twitch user token generator: https://twitchtokengenerator.com/
# Only use third-party tools if you trust them.
# Never paste your TWITCH_CLIENT_SECRET, website password, or other private secrets into them.
TWITCH_CLIENT_ID=your_client_id
TWITCH_CLIENT_SECRET=your_client_secret
# TWITCH_BROADCASTER_ID:
# Your numeric Twitch user ID, not your username.
# Example lookup request after you have an app access token:
# GET https://api.twitch.tv/helix/users?login=YOUR_USERNAME
# This returns your numeric user ID in the "id" field.
TWITCH_BROADCASTER_ID=12345678
# Initial user tokens.
# Recommended: run auth_server_SG.py after setting TWITCH_CLIENT_ID / TWITCH_CLIENT_SECRET
# and visit AUTH_PUBLIC_BASE in your browser to authorize.
# app.py refreshes and rewrites twitch_tokens.json automatically afterward.
# If you prefer a web tool for the first user token, twitchtokengenerator.com is the easiest option.
TWITCH_OAUTH_TOKEN=initial_access_token
TWITCH_REFRESH_TOKEN=initial_refresh_token
# Where refreshed Twitch tokens are stored on disk.
TWITCH_TOKENS_PATH=/absolute/path/to/twitch_tokens.json
# auth_server_SG.py also supports this name; keep it aligned with TWITCH_TOKENS_PATH if you use it.
TWITCH_TOKENS_FILE=/absolute/path/to/twitch_tokens.json
# Scopes used by the web app (title / category / raid).
# If you reuse this token file in unified-chat, include channel:read:hype_train
# so hype train backfill works after refresh/reconnect.
# Do not include offline_access here.
TWITCH_SCOPES=channel:manage:broadcast channel:manage:raids user:read:chat channel:read:hype_train
# Optional auth helper server used by auth_server_SG.py
# AUTH_PUBLIC_BASE must be reachable in your browser and by Twitch redirects.
# The callback URL becomes: AUTH_PUBLIC_BASE + /callback
# For public internet use, HTTPS is strongly recommended.
# A Cloudflare Tunnel URL works well for temporary setup.
# Example: https://auth-twitch.example.com
AUTH_PUBLIC_BASE=
AUTH_BIND_HOST=0.0.0.0
AUTH_PORT=3750
# Website Login
# Generate a Werkzeug-compatible hash inside your project virtualenv, for example:
# . venv/bin/activate
# python -c "from werkzeug.security import generate_password_hash; print(generate_password_hash('change-me'))"
# Avoid online password-hash tools for this value.
# They would require you to paste the real password into a third-party website.
LOGIN_PASSWORD_HASH=
# Chatbot moderation
# Stream-Control add-only endpoint appends one entry per line here.
# Default (if unset): /home/kim3k/chatbot/banned_words.txt
CHATBOT_BANNED_WORDS_PATH=/home/kim3k/chatbot/banned_words.txt
# Optional service names / preference files for Advanced auto-start toggles.
# Chatbot defaults to the existing "chatbot" unit if unset.
UNIFIED_CHAT_SERVICE_NAME=unified-chat
UNIFIED_CHAT_PREF_PATH=/home/USER/stream-control/unified_chat_autostart.json
BELABOX_EMBED_URL=https://belabox.domain.com
LOGLEVEL=warning
GUNICORN_ACCESSLOG=./logs/access.log
# Stream Guard settings
# STATS_URL:
# BELABOX / SLS stats endpoint used by stream_guard.py.
STATS_URL=http://192.168.0.50:8181/stats
BITRATE_LOW_KBPS=1000
BITRATE_HIGH_KBPS=2500
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
# ALERTS_BASE_URL:
# Base URL of this Stream-Control instance, used for local alert callbacks.
ALERTS_BASE_URL=http://127.0.0.1:5000
# Generate a random alert token:
# python3 -c "import secrets; print(secrets.token_urlsafe(32))"
ALERT_TOKEN=your_alert_token_here
# 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
TWITCH_ADMINS=admin1, admin2