Skip to content

About

Record Twitch and Kick streams with streamlink, restream to YouTube Live, and upload finished recordings to YouTube. Alerts and admin control via Telegram bot or web panel.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

StreamArchive

StreamArchive monitors Twitch and Kick channels and records live streams with streamlink. It restreams to YouTube Live when you enable that. It also uploads finished recordings to YouTube, on demand or automatically. It sends alerts and takes admin commands through the Telegram bot or the web panel.

Live signals arrive in seconds. Twitch uses an EventSub conduit. Kick uses signed webhooks. A poll loop stays as fallback. The fallback catches missed events and restarts recordings that died mid-stream.

Setup

Use the setup wizard. It is the recommended path.

mkdir ~/stream-archive-data && cd ~/stream-archive-data
curl -LO https://github.com/giou/stream-archive/releases/latest/download/docker-compose.yml
docker compose pull
docker compose run --rm stream-archive stream-archive-setup
docker compose up -d
docker compose logs -f

The setup wizard writes config.json in the data directory. It asks for Twitch credentials and one control surface (web panel, Telegram bot, or both). Then it offers channels and each optional block: web panel access, Kick, YouTube restream, Telegram upload, and the control API. Run the setup wizard again later to add a block.

The data directory holds the settings, the recordings, the chat files, and the tokens. To move it to another disk, set STREAM_ARCHIVE_DATA in .env in that folder. See Backup and restore before you copy or move it:

# ~/stream-archive-data/.env
STREAM_ARCHIVE_DATA=/mnt/bigdisk/stream-archive-data

To update the app, pull the new image:

docker compose pull && docker compose up -d

Two blocks need extra steps:

Features

  • Channels. One settings file covers both platforms. A name is twitch:<name> or kick:<slug>.
  • Category filters. A channel records only while its live Twitch or Kick category is in its list. A channel without a list records every live stream.
  • Output modes. disk writes .ts files (.m4a for audio-only). youtube restreams to a YouTube broadcast. both runs disk and youtube together.
  • Chat recording. Twitch IRC chat and Kick webhook chat land in TwitchDownloader-compatible JSON. See Chat recording.
  • Retention and disk cap. Old files expire after retention_days. An optional disk.max_total_gb cap deletes the oldest files or stops new recordings.
  • Self-healing. Dead recordings restart on the next poll cycle. YouTube restreams restart with growing delays inside a daily broadcast budget. Quota errors fall back to disk.
  • Telegram alerts. Live and offline alerts carry the stream facts and the file facts. Failure alerts arrive at most once per 30 minutes for each channel.
  • Telegram bot. The admin manages channels, modes, quality, chat, limits, remote access, and uploads over the Telegram bot. See Telegram control.
  • Web panel. The browser replaces the Telegram bot: status, channels, settings, recordings with a player, reload, restart, and update. See Web panel.
  • Control API. Scripts change the same settings over HTTP with a key. See Control API.
  • Telegram upload. Large recordings go to your chat through MTProto (up to 2 GB). The Bot API allows 50 MB only.
  • YouTube upload. A finished recording goes to YouTube as a video from the Telegram Recordings menu or the web panel. A per-channel auto-upload sends each finished recording at once. See YouTube restream and VOD upload.

Guides

Guide Content
Settings All keys of config.json, and secrets from the environment
Running Data directory, container identity, logs, shutdown
Backup and restore Data directory contents, backup, restore rules
YouTube restream and upload OAuth client, the one-time authorization flow, and VOD uploads
Kick webhook Public URLs, proxy setup, delivery test
Telegram control Telegram bot menu and command list
Control API HTTP endpoints, accepted values, error answers
Chat recording Chat files and TwitchDownloader commands
Failure handling Behavior for each failure type
Web panel Browser control without Telegram
Development Project layout, commands, dependency updates

License

MIT. The image contains the third-party twitch.py plugin (streamlink-ttvlol). The build downloads it from the upstream release and records its sha256 in /app/plugins/twitch.py.sha256. Pin reviewed bytes with the TTVLOL_PLUGIN_SHA256 build argument. The plugin keeps its upstream license.

About

Record Twitch and Kick streams with streamlink, restream to YouTube Live, and upload finished recordings to YouTube. Alerts and admin control via Telegram bot or web panel.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages