🚀 Get Stream Daemon running in 10 minutes
This guide gets you from zero to posting stream announcements as fast as possible.
Before starting, make sure you have:
- Python 3.10+ installed (python.org/downloads)
- API credentials for at least one streaming platform (Twitch, YouTube, or Kick)
- Account on at least one social platform (Mastodon, Bluesky, Discord, or Matrix)
- (Optional) AI Provider: Ollama for local AI messages (recommended) or Google Gemini API for cloud AI
- (Optional) Doppler account for secure credential storage
Don't have credentials yet? See Platform Setup Guides for detailed instructions.
# Clone repository
git clone https://github.com/ChiefGyk3D/Stream-Daemon.git
cd Stream-Daemon
# Install dependencies
pip install -r requirements.txtHaving issues? See Installation Guide for troubleshooting.
Create a .env file with your credentials:
# Copy example configuration
cp .env.example .env
# Edit with your credentials
nano .env # or use your preferred editorMinimal working example:
# =====================================
# STREAMING PLATFORMS
# =====================================
TWITCH_ENABLE=True
TWITCH_USERNAME=your_twitch_username
TWITCH_CLIENT_ID=your_client_id_here
TWITCH_CLIENT_SECRET=your_client_secret_here
# =====================================
# SOCIAL PLATFORMS
# =====================================
MASTODON_ENABLE=True
MASTODON_INSTANCE_URL=https://mastodon.social
MASTODON_ACCESS_TOKEN=your_mastodon_token_here
# =====================================
# AI-POWERED MESSAGES (optional but recommended)
# =====================================
LLM_ENABLE=True
LLM_PROVIDER=ollama # Use 'ollama' for local AI or 'gemini' for cloud
LLM_OLLAMA_HOST=http://localhost
LLM_OLLAMA_PORT=11434
LLM_MODEL=gemma3:4b
# =====================================
# INTERVALS (optional)
# =====================================
SETTINGS_CHECK_INTERVAL=5 # Check every 5 minutesWhere to get credentials:
- Twitch: dev.twitch.tv/console/apps
- Mastodon: Your instance → Settings → Development → New Application
- Ollama: ollama.com - Install with
curl -fsSL https://ollama.com/install.sh | sh, thenollama pull gemma3:4b
Want more platforms? See configuration examples below.
Verify your configuration works:
# Test comprehensive production setup
python3 tests/test_connection.py
# Or test individual components:
python3 tests/test_local_install.py # Test dependencies
python3 tests/test_ollama.py # Test Ollama AIExpected output:
✅ Authentication successful
✅ Stream detection working
✅ Mastodon posting enabled
Errors? See Troubleshooting below.
Start the daemon:
python3 stream-daemon.pyYou should see:
🔷 Stream Daemon v2.0 Starting...
✅ Twitch: Enabled (@your_username)
✅ Mastodon: Enabled (mastodon.social)
🔄 Checking for live streams every 5 minutes...
That's it! Stream Daemon is now monitoring your Twitch streams and will post to Mastodon when you go live.
Perfect for streamers with a Discord community:
# Streaming
TWITCH_ENABLE=True
TWITCH_USERNAME=your_username
TWITCH_CLIENT_ID=your_client_id
TWITCH_CLIENT_SECRET=your_client_secret
# Social
DISCORD_ENABLE=True
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/123/abc...
DISCORD_ROLE_TWITCH=@Twitch Viewers # Optional: mention role
DISCORD_UPDATE_LIVE_MESSAGE=True # Update embed with viewer countBonus: Discord will show live viewer counts and update the embed in real-time!
Streaming to Twitch + YouTube + Kick simultaneously:
# Streaming Platforms
TWITCH_ENABLE=True
TWITCH_USERNAME=your_twitch
TWITCH_CLIENT_ID=xxx
TWITCH_CLIENT_SECRET=yyy
YOUTUBE_ENABLE=True
YOUTUBE_USERNAME=@YourHandle # Auto-resolves to channel ID!
YOUTUBE_API_KEY=AIzaSy...
KICK_ENABLE=True
KICK_USERNAME=your_kick
# Social Platform
MASTODON_ENABLE=True
MASTODON_INSTANCE_URL=https://mastodon.social
MASTODON_ACCESS_TOKEN=your_token
# Multi-Platform Strategy
MESSAGES_LIVE_THREADING_MODE=combined # Single post: "Live on Twitch, YouTube, and Kick!"
MESSAGES_END_THREADING_MODE=thread # Reply to original post when endingUse Google Gemini to generate unique announcements:
# Streaming
TWITCH_ENABLE=True
TWITCH_USERNAME=your_username
TWITCH_CLIENT_ID=xxx
TWITCH_CLIENT_SECRET=yyy
# Social
MASTODON_ENABLE=True
MASTODON_INSTANCE_URL=https://mastodon.social
MASTODON_ACCESS_TOKEN=your_token
BLUESKY_ENABLE=True
BLUESKY_HANDLE=yourhandle.bsky.social
BLUESKY_APP_PASSWORD=xxxx-xxxx-xxxx-xxxx
# AI Messages
LLM_PROVIDER=gemini
GEMINI_API_KEY=AIzaSyABC123... # From aistudio.google.com
LLM_MAX_LENGTH_MASTODON=500
LLM_MAX_LENGTH_BLUESKY=300Result: Every stream gets a unique, engaging announcement tailored to the platform!
Keep credentials safe with enterprise secrets management:
# Secrets Manager (10-min setup, free!)
SECRETS_MANAGER=doppler
DOPPLER_TOKEN=dp.st.dev.your_token_here
SECRETS_DOPPLER_TWITCH_SECRET_NAME=TWITCH
SECRETS_DOPPLER_MASTODON_SECRET_NAME=MASTODON
# Platform Config (non-sensitive)
TWITCH_ENABLE=True
TWITCH_USERNAME=your_username
MASTODON_ENABLE=True
MASTODON_INSTANCE_URL=https://mastodon.social
# NO CREDENTIALS IN .env!
# All secrets (client IDs, tokens, etc.) stored securely in DopplerSee: Secrets Management Guide for full Doppler setup.
Create custom announcements for each platform:
Edit messages.txt:
[DEFAULT]
🔴 I'm live! Come watch: {url}
[TWITCH]
🎮 Live on Twitch! Playing {title}
Viewers: {viewers}
👉 {url}
[YOUTUBE]
📺 Streaming now on YouTube!
{url}
[KICK]
⚡ Live on Kick right now!
{url}# .env
MESSAGES_USE_PLATFORM_SPECIFIC_MESSAGES=True
MESSAGES_MESSAGES_FILE=messages.txt{url}- Stream URL (auto-generated){title}- Stream title{game}- Game/category being played{viewers}- Current viewer count{platform}- Platform name (Twitch, YouTube, Kick)
See: Custom Messages Guide for advanced templating.
Prefer containers? Here's the fast track:
version: '3.8'
services:
stream-daemon:
build: .
restart: unless-stopped
environment:
# Streaming
TWITCH_ENABLE: 'True'
TWITCH_USERNAME: your_username
TWITCH_CLIENT_ID: your_client_id
TWITCH_CLIENT_SECRET: your_client_secret
# Social
MASTODON_ENABLE: 'True'
MASTODON_INSTANCE_URL: https://mastodon.social
MASTODON_ACCESS_TOKEN: your_token
# Intervals
SETTINGS_CHECK_INTERVAL: 5
volumes:
- ./messages.txt:/app/messages.txt
- ./end_messages.txt:/app/end_messages.txtcd Docker
docker-compose up -d
# View logs
docker-compose logs -f stream-daemonSee: Installation Guide for detailed Docker setup.
Before going live, test everything:
# Streaming platforms
python3 tests/test_doppler_twitch.py
python3 tests/test_doppler_youtube.py
python3 tests/test_doppler_kick.py
# Social platforms
python3 tests/test_mastodon.py
python3 tests/test_bluesky.py
python3 tests/test_discord.py
python3 tests/test_matrix.pypython3 tests/test_doppler_all.py- ✅ API credentials are valid
- ✅ Connections successful
- ✅ Stream detection working
- ✅ No secrets leaked in logs
All tests pass? You're ready to go live! 🎉
Problem: Missing Python dependencies
Solution:
pip install -r requirements.txt
# Or upgrade dependencies
pip install --upgrade -r requirements.txtProblem: Invalid credentials
Solutions:
- Twitch: Verify client ID and secret from developer console
- YouTube: Check API key from Google Cloud Console
- Mastodon: Regenerate access token in instance settings
- Discord: Verify webhook URL is correct and webhook wasn't deleted
Problem: Can't find your stream
Solutions:
- Check username: Exact match required (case-sensitive on some platforms)
- Verify you're live: Actually start streaming to test
- Lower check interval: Set
SETTINGS_CHECK_INTERVAL=1for faster detection (1 minute) - Check permissions: API keys need read access to stream status
Problem: Daemon running but not posting
Solutions:
- Check platform enabled:
MASTODON_ENABLE=TruenotMASTODON_ENABLE_POSTING=True - Verify credentials: Run platform-specific test
- Check logs: Look for errors in output
- Test manually: Try posting directly to platform to verify credentials
Problem: Can't fetch secrets from Doppler
Solutions:
- Verify token: Check
DOPPLER_TOKENstarts withdp.st. - Check environment: Token for
devcan't accessprdsecrets - Verify secret names: Must match configured prefix (e.g.,
TWITCH_CLIENT_ID) - Test connection:
python3 -c "from doppler_sdk import DopplerSDK; \ sdk = DopplerSDK(); \ sdk.set_access_token('YOUR_TOKEN'); \ print(sdk.secrets.list())"
Still stuck?
Create systemd service for automatic startup:
# Create service file
sudo nano /etc/systemd/system/stream-daemon.service[Unit]
Description=Stream Daemon - Multi-platform stream announcements
After=network.target
[Service]
Type=simple
User=your_username
WorkingDirectory=/path/to/Stream-Daemon
Environment="PATH=/usr/bin:/usr/local/bin"
ExecStart=/usr/bin/python3 /path/to/Stream-Daemon/stream-daemon.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target# Enable and start
sudo systemctl daemon-reload
sudo systemctl enable stream-daemon
sudo systemctl start stream-daemon
# Check status
sudo systemctl status stream-daemon
# View logs
sudo journalctl -u stream-daemon -fDifferent intervals for different states:
# Check every 5 minutes when offline
SETTINGS_CHECK_INTERVAL=5
# Check every 1 minute when live (detect stream end faster)
SETTINGS_POST_INTERVAL=1
# Update Discord embeds every 30 seconds (viewer counts)
DISCORD_UPDATE_INTERVAL=30Different webhooks for each streaming platform:
# Default webhook
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/default/xxx
# Platform-specific webhooks (override default)
DISCORD_WEBHOOK_TWITCH=https://discord.com/api/webhooks/twitch/xxx
DISCORD_WEBHOOK_YOUTUBE=https://discord.com/api/webhooks/youtube/xxx
DISCORD_WEBHOOK_KICK=https://discord.com/api/webhooks/kick/xxx
# Platform-specific roles
DISCORD_ROLE_TWITCH=@Twitch Viewers
DISCORD_ROLE_YOUTUBE=@YouTube Subscribers
DISCORD_ROLE_KICK=@everyoneSee: Discord Setup Guide for advanced Discord configuration.
Now that Stream Daemon is running:
- Platform Setup Guides - Detailed setup for all 7 platforms
- AI Messages - Generate unique announcements with Gemini
- Custom Messages - Advanced message templating
- Multi-Platform Strategies - Stream to multiple platforms
- Secrets Management - Secure credential storage with Doppler/AWS/Vault
- ⭐ Star the repo - Support the project!
- 🐛 Report issues - Found a bug?
- 💡 Suggest features - Have an idea?
- 🔧 Contribute - Submit a pull request!
- 📖 Documentation: docs/README.md
- 🐛 Bug Reports: GitHub Issues
- 💬 Questions: GitHub Discussions
Happy streaming! 🎉