📦 Complete installation instructions for all deployment methods
This guide covers all ways to install and run Stream Daemon, from simple Python execution to production Docker deployments.
- System Requirements
- Python Installation
- Docker Installation
- Systemd Service (Linux)
- Cloud Deployment
- Development Setup
- Troubleshooting
- OS: Linux, macOS, Windows, or any Docker-compatible platform
- Python: 3.10 or higher (3.11+ recommended)
- RAM: 128MB minimum, 256MB recommended
- Disk: 100MB for code + dependencies
- Network: Internet connection for API calls
✅ Linux (Ubuntu, Debian, Fedora, CentOS, Arch, etc.)
✅ macOS (10.14 Mojave or later)
✅ Windows (10/11, via Python or WSL2)
✅ Docker (any platform with Docker support)
✅ Raspberry Pi (3B+ or newer with 1GB+ RAM)
✅ Cloud (AWS EC2, Google Cloud, Azure, DigitalOcean, etc.)
Linux (Ubuntu/Debian):
sudo apt update
sudo apt install python3 python3-pip python3-venv git -yLinux (Fedora/CentOS):
sudo dnf install python3 python3-pip git -ymacOS:
# Install Homebrew if needed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Python
brew install python3 gitWindows:
- Download Python from python.org/downloads
- Run installer, check "Add Python to PATH"
- Install Git from git-scm.com
Verify installation:
python3 --version # Should be 3.10 or higher
pip3 --version# Clone from GitHub
git clone https://github.com/ChiefGyk3D/Stream-Daemon.git
cd Stream-Daemon
# Or download ZIP
curl -LO https://github.com/ChiefGyk3D/Stream-Daemon/archive/refs/heads/main.zip
unzip main.zip
cd Stream-Daemon-mainOption A: System Python (Simple)
pip3 install -r requirements.txtOption B: Virtual Environment (Recommended)
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
# Linux/macOS:
source venv/bin/activate
# Windows:
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtWhy virtual environment?
- ✅ Isolates dependencies from system Python
- ✅ Avoids version conflicts
- ✅ Easy to delete and recreate
# Create configuration file
cp .env.example .env
# Edit with your credentials
nano .env # or vim, emacs, code, etc.See Quick Start Guide for configuration examples.
# Test your configuration
python3 tests/test_doppler_all.py
# Or test specific platforms
python3 tests/test_doppler_twitch.py
python3 tests/test_mastodon.py# Run directly
python3 stream-daemon.py
# Or with virtual environment active
source venv/bin/activate
python stream-daemon.pyKeep it running:
# Background process (Linux/macOS)
nohup python3 stream-daemon.py > stream-daemon.log 2>&1 &
# Or use systemd (see below)Install Docker:
Linux:
# Ubuntu/Debian
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
# Log out and back in for group to take effect
# Fedora
sudo dnf install docker docker-compose -y
sudo systemctl enable --now docker
sudo usermod -aG docker $USERmacOS:
- Download Docker Desktop for Mac
- Install and start Docker Desktop
Windows:
- Download Docker Desktop for Windows
- Requires WSL2
Verify:
docker --version
docker-compose --versionStep 1: Clone repository
git clone https://github.com/ChiefGyk3D/Stream-Daemon.git
cd Stream-Daemon/DockerStep 2: Configure
Edit docker-compose.yml:
version: '3.8'
services:
stream-daemon:
build: ..
container_name: stream-daemon
restart: unless-stopped
environment:
# Streaming Platforms
TWITCH_ENABLE: 'True'
TWITCH_USERNAME: your_username
TWITCH_CLIENT_ID: your_client_id
TWITCH_CLIENT_SECRET: your_client_secret
YOUTUBE_ENABLE: 'True'
YOUTUBE_USERNAME: '@YourHandle'
YOUTUBE_API_KEY: your_api_key
# Social Platforms
MASTODON_ENABLE: 'True'
MASTODON_INSTANCE_URL: https://mastodon.social
MASTODON_ACCESS_TOKEN: your_token
DISCORD_ENABLE: 'True'
DISCORD_WEBHOOK_URL: your_webhook_url
# Intervals
SETTINGS_CHECK_INTERVAL: 5
SETTINGS_POST_INTERVAL: 5
volumes:
- ./messages.txt:/app/messages.txt
- ./end_messages.txt:/app/end_messages.txt
healthcheck:
test: ["CMD", "python3", "-c", "import sys; sys.exit(0)"]
interval: 30s
timeout: 10s
retries: 3Or use .env file (more secure):
Create .env in Docker directory:
TWITCH_CLIENT_ID=your_client_id
TWITCH_CLIENT_SECRET=your_client_secret
YOUTUBE_API_KEY=your_api_key
MASTODON_ACCESS_TOKEN=your_token
DISCORD_WEBHOOK_URL=your_webhook_urlUpdate docker-compose.yml:
services:
stream-daemon:
build: ..
env_file:
- .env
environment:
TWITCH_ENABLE: 'True'
TWITCH_USERNAME: your_username
# Sensitive values from .env fileStep 3: Build and run
# Build and start
docker-compose up -d
# View logs
docker-compose logs -f stream-daemon
# Stop
docker-compose down
# Restart
docker-compose restart stream-daemon# Build image
docker build -t stream-daemon:latest .
# Run with environment file
docker run -d \
--name stream-daemon \
--restart unless-stopped \
--env-file .env \
-v $(pwd)/messages.txt:/app/messages.txt \
-v $(pwd)/end_messages.txt:/app/end_messages.txt \
stream-daemon:latest
# View logs
docker logs -f stream-daemon
# Stop
docker stop stream-daemon
# Remove
docker rm stream-daemon# Pull from Docker Hub (when available)
docker pull chiefgyk3d/stream-daemon:latest
# Run
docker run -d \
--name stream-daemon \
--restart unless-stopped \
--env-file .env \
chiefgyk3d/stream-daemon:latestRecommended for production:
version: '3.8'
services:
stream-daemon:
build: ..
environment:
# Secrets Manager
SECRETS_MANAGER: doppler
DOPPLER_TOKEN: ${DOPPLER_TOKEN} # From .env file
# Secret prefixes
SECRETS_DOPPLER_TWITCH_SECRET_NAME: TWITCH
SECRETS_DOPPLER_YOUTUBE_SECRET_NAME: YOUTUBE
SECRETS_DOPPLER_MASTODON_SECRET_NAME: MASTODON
# Platform config (non-sensitive)
TWITCH_ENABLE: 'True'
TWITCH_USERNAME: your_username
YOUTUBE_ENABLE: 'True'
YOUTUBE_USERNAME: '@YourHandle'Create .env with only Doppler token:
DOPPLER_TOKEN=dp.st.prd.your_production_token_hereAll credentials stay in Doppler! No secrets in Docker config. ✅
For production Linux deployments, run Stream Daemon as a systemd service for automatic startup and restart.
sudo nano /etc/systemd/system/stream-daemon.serviceFor Python installation:
[Unit]
Description=Stream Daemon - Multi-platform stream announcement bot
Documentation=https://github.com/ChiefGyk3D/Stream-Daemon
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=your_username
Group=your_username
WorkingDirectory=/home/your_username/Stream-Daemon
# Use virtual environment if created
ExecStart=/home/your_username/Stream-Daemon/venv/bin/python stream-daemon.py
# Or system Python
# ExecStart=/usr/bin/python3 /home/your_username/Stream-Daemon/stream-daemon.py
# Environment file
EnvironmentFile=/home/your_username/Stream-Daemon/.env
# Restart on failure
Restart=always
RestartSec=10
# Resource limits (optional)
MemoryMax=256M
CPUQuota=25%
# Security hardening (optional)
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=read-only
ReadWritePaths=/home/your_username/Stream-Daemon
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=stream-daemon
[Install]
WantedBy=multi-user.targetFor Docker installation:
[Unit]
Description=Stream Daemon (Docker)
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/home/your_username/Stream-Daemon/Docker
ExecStart=/usr/bin/docker-compose up -d
ExecStop=/usr/bin/docker-compose down
[Install]
WantedBy=multi-user.target# Reload systemd
sudo systemctl daemon-reload
# Enable service (start on boot)
sudo systemctl enable stream-daemon
# Start service
sudo systemctl start stream-daemon
# Check status
sudo systemctl status stream-daemon# Stop service
sudo systemctl stop stream-daemon
# Restart service
sudo systemctl restart stream-daemon
# Disable service (prevent auto-start)
sudo systemctl disable stream-daemon
# View logs
sudo journalctl -u stream-daemon -f
# View logs from last boot
sudo journalctl -u stream-daemon -bLaunch instance:
- Choose Ubuntu 22.04 LTS AMI
- t3.micro (free tier eligible, sufficient for Stream Daemon)
- Security group: Allow SSH (22) and HTTPS (443) outbound
- Create or use existing key pair
Connect and install:
ssh -i your-key.pem ubuntu@your-instance-ip
# Update system
sudo apt update && sudo apt upgrade -y
# Install Python
sudo apt install python3 python3-pip python3-venv git -y
# Clone and install (follow Python Installation above)
git clone https://github.com/ChiefGyk3D/Stream-Daemon.git
cd Stream-Daemon
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Configure
cp .env.example .env
nano .env
# Setup systemd service (see above)
sudo nano /etc/systemd/system/stream-daemon.service
sudo systemctl enable --now stream-daemonUse IAM roles for AWS Secrets:
# No AWS credentials needed! Use instance role
SECRETS_MANAGER=aws
AWS_REGION=us-east-1
SECRETS_AWS_TWITCH_SECRET_NAME=stream-daemon/twitchBuild and deploy:
# Install gcloud CLI
curl https://sdk.cloud.google.com | bash
# Build container
gcloud builds submit --tag gcr.io/your-project/stream-daemon
# Deploy
gcloud run deploy stream-daemon \
--image gcr.io/your-project/stream-daemon \
--platform managed \
--region us-central1 \
--memory 256Mi \
--cpu 1 \
--set-env-vars TWITCH_ENABLE=True,TWITCH_USERNAME=your_username \
--set-secrets TWITCH_CLIENT_ID=twitch-client-id:latest \
--allow-unauthenticatedCreate droplet:
- Choose Ubuntu 22.04 LTS
- Basic plan ($4/mo sufficient)
- Add SSH key
Same as EC2 setup above:
ssh root@your-droplet-ip
# Follow Python installation stepsDeploy to Heroku:
# Install Heroku CLI
curl https://cli-assets.heroku.com/install.sh | sh
# Login
heroku login
# Create app
heroku create your-stream-daemon
# Set config vars
heroku config:set TWITCH_ENABLE=True
heroku config:set TWITCH_USERNAME=your_username
heroku config:set TWITCH_CLIENT_ID=your_client_id
heroku config:set TWITCH_CLIENT_SECRET=your_secret
# Deploy
git push heroku main
# View logs
heroku logs --tailFor contributors and developers:
# Fork repository on GitHub first
# Clone your fork
git clone https://github.com/YOUR_USERNAME/Stream-Daemon.git
cd Stream-Daemon
# Add upstream remote
git remote add upstream https://github.com/ChiefGyk3D/Stream-Daemon.git
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Install development dependencies
pip install black flake8 pytest# Copy example
cp .env.example .env.dev
# Use Doppler dev environment
SECRETS_MANAGER=doppler
DOPPLER_TOKEN=dp.st.dev.your_dev_token
# Or set up .env.dev with test credentials# Format code with Black
black stream-daemon.py stream_daemon/
# Check linting
flake8 stream-daemon.py stream_daemon/# Run all tests
python3 tests/test_doppler_all.py
# Run specific platform tests
python3 tests/test_doppler_twitch.py# Create feature branch
git checkout -b feature/amazing-feature
# Make changes, commit
git add .
git commit -m "Add amazing feature"
# Push to your fork
git push origin feature/amazing-feature
# Open PR on GitHub"python3: command not found"
# Install Python
# Ubuntu/Debian:
sudo apt install python3
# macOS:
brew install python3
# Verify
python3 --version"pip: command not found"
# Install pip
# Ubuntu/Debian:
sudo apt install python3-pip
# macOS (usually included with Python)
python3 -m ensurepip
# Verify
pip3 --versionDependency installation fails
# Upgrade pip
python3 -m pip install --upgrade pip
# Install with verbose output
pip3 install -r requirements.txt --verbose
# If specific package fails, install separately
pip3 install package-name --verbose"docker: command not found"
# Install Docker (Linux)
curl -fsSL https://get.docker.com | sudo sh
# Add user to docker group
sudo usermod -aG docker $USER
# Log out and back in"permission denied while trying to connect to the Docker daemon"
# Add user to docker group
sudo usermod -aG docker $USER
# Log out and back in, or:
newgrp docker"docker-compose: command not found"
# Install docker-compose
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-composeContainer won't start
# Check logs
docker logs stream-daemon
# Check for port conflicts
docker ps
# Remove and recreate
docker-compose down
docker-compose up -dService won't start
# Check status
sudo systemctl status stream-daemon
# View logs
sudo journalctl -u stream-daemon -n 50
# Common issues:
# - Wrong path in ExecStart
# - Missing .env file
# - Wrong user/group
# - Python not foundService starts but stops immediately
# Check for errors in code
sudo journalctl -u stream-daemon -n 100
# Test running manually
cd /path/to/Stream-Daemon
python3 stream-daemon.py
# Check permissions
ls -la .env
# Should be readable by service userOut of memory errors
# Add swap space (Linux)
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
# Make permanent
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
# Reduce check interval to lower memory usage
SETTINGS_CHECK_INTERVAL=10 # Check less frequentlyNow that Stream Daemon is installed:
- Quick Start Guide - Get up and running in 10 minutes
- Platform Setup - Configure Twitch, YouTube, Kick, Mastodon, etc.
- Secrets Management - Secure your credentials with Doppler
- Custom Messages - Personalize announcements
- 📖 Documentation: docs/README.md
- 🐛 Bug Reports: GitHub Issues
- 💬 Questions: GitHub Discussions