Watch
1
0
Fork
You've already forked twitch-recorder-service
0
A lightweight, self-hosted Twitch stream recorder for Linux. Automatically monitors selected channels and records live streams using Streamlink, running continuously as a systemd service
  • Go 95.9%
  • Shell 4.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-25 01:57:21 +02:00
cmd/twitch-recorder fix(recorder): retry dirty user resolution 2026-04-25 01:56:48 +02:00
docs docs(structure): move docs into docs/, add setup/testing guides, and update links 2026-03-06 08:28:41 +01:00
internal fix(recording): avoid restart loops by choosing collision-safe output paths and covering collisions with tests 2026-03-07 06:02:02 +01:00
.env.example feat(webhooks): add signed lifecycle webhooks with retries, filtering, and heartbeat support 2026-03-06 08:28:51 +01:00
.gitignore chore: update .gitignore 2026-04-25 01:57:21 +02:00
go.mod update: use go>=1.21 when building 2025-12-25 03:40:23 +01:00
LICENSE Initial commit 2025-12-24 02:29:32 +01:00
README.md docs(structure): move docs into docs/, add setup/testing guides, and update links 2026-03-06 08:28:41 +01:00
setup.sh docs(structure): move docs into docs/, add setup/testing guides, and update links 2026-03-06 08:28:41 +01:00
twitch-recorder.conf feat(webhooks): add signed lifecycle webhooks with retries, filtering, and heartbeat support 2026-03-06 08:28:51 +01:00
twitch-recorder.service update: merge local changes with remote 2025-12-24 04:08:50 +01:00
users.txt update: initial commit 2025-12-24 02:31:35 +01:00

Twitch Recorder Service

A lightweight script that automatically records Twitch streams (using Streamlink) when users go live.

This script is intended to be a personal and easy-to-use alternative to more general recorders. It can simply be ran as a continous systemd service, and its minimalistic nature means you only need to maintain a simple userlist.

What does it do?

  • Monitors a list of usernames
  • Periodically polls live status via the API
  • Starts recording with streamlink when a user goes live
  • Stops automatically when the stream ends

Requirements

  • Streamlink in PATH
  • Twitch application credentials:
    • TWITCH_CLIENT_ID
    • TWITCH_CLIENT_SECRET
  • FFmpeg in PATH (optional, only for post-processing)
  • Go (for building from source)

Create Twitch credentials at dev.twitch.tv/console. A dummy redirect URL such as http://localhost/ is fine for this use case.

Setup

Quick setup (recommended):

./setup.sh
# Or to run it with the recommended values set:
# ./setup.sh --dir /opt/twitch-recorder --env-file /etc/twitch-recorder.env --force

If you want to later update the script, simply pulling from source and running the setup script again (allowing a restart) should suffice.

For full setup details (including manual setup), see docs/SETUP.md.

Configuration

Configuration is read from twitch-recorder.conf.

License

MIT License