A lightweight Go application that automatically records Twitch streams when they go live.
- Twitch Developer App Credentials - Get
CLIENT_IDandCLIENT_SECRETfrom Twitch Developers Console - Twitch Authentication Token -
WEB_API_TOKENfrom Streamlink Authentication Guide - Runtime Environment - Golang or Docker
- Rename
.env.exampleto.env - Configure your environment variables:
# Twitch API credentials
CLIENT_ID=your_client_id_here
CLIENT_SECRET=your_client_secret_here
WEB_API_TOKEN=your_web_api_token_here
# Stream configuration
USERNAME=ishowspeed # Twitch channel to monitor
QUALITY=best # Stream quality (best, 720p, 480p, etc.)
REFRESH=15s # Check interval (15s, 30s, 1m)
# Path configuration (required for non-Docker setup)
TEMP_PATH=./temp # Temporary download directory
FINAL_PATH=./final # Final recordings storage- For non-Docker execution only: Create the directories specified in
TEMP_PATHandFINAL_PATH
docker-compose up --build- Build the image:
docker build -t twitch-recorder .- Run the container:
docker run -d \
--name twitch-stream-recorder \
--env-file .env \
-v /path/to/your/temp:/app/temp \
-v /path/to/your/recordings:/app/final \
twitch-recordergo mod download
go run ./app/temp→ Temporary files during recording (mapped to host directory)/app/final→ Completed recordings storage (mapped to host directory)
Example host paths:
- Linux/Mac:
-v ~/twitch/temp:/app/temp -v ~/twitch/recordings:/app/final - Windows:
-v C:\twitch\temp:/app/temp -v C:\twitch\recordings:/app/final
Based on ancalentari/twitch-stream-recorder