-
Notifications
You must be signed in to change notification settings - Fork 3
Getting Started
This page walks you from a fresh clone to a running miner in under 5 minutes.
- Go 1.25+ — required for local builds
- A Twitch account
- Twitch runtime identifiers (see Authentication and How to obtain Twitch runtime identifiers)
git clone https://github.com/Guliveer/twitch-miner-go.git
cd twitch-miner-go
# Create a config file for your account (filename = Twitch username)
cp configs/example.yaml.example configs/your_twitch_username.yamlNote: The repository includes the maintainer's own account configs. They are skipped automatically — you do not need to delete or disable them. Set
RUN_OWNER_ACCOUNTS=trueonly if you are the maintainer running on your own infrastructure.
Open the file and set at least:
enabled: true
streamers:
- username: "some_streamer"See Configuration Reference for all options.
Create a .env file (copy .env.example as a starting point):
TWITCH_CLIENT_ID_TV=your_tv_client_id
TWITCH_CLIENT_ID_BROWSER=your_browser_client_id
TWITCH_CLIENT_VERSION=your_client_versionSee How to obtain Twitch runtime identifiers in the README for step-by-step instructions.
Linux / macOS:
./_run.shWindows:
_run.batBoth scripts build the binary and run it immediately.
On first run the miner walks through the authentication chain. The easiest path is the device code flow — the miner will print:
To activate, visit https://www.twitch.tv/activate and enter code: ABCD-1234
Visit the URL, enter the code, and the miner saves a cookie for future runs — no re-auth needed.
# Health check
curl http://localhost:8080/health
# Test notifications (if configured)
curl -X POST http://localhost:8080/api/test-notificationThe analytics dashboard is available at http://localhost:8080.
By default the miner sends anonymous usage heartbeats — instance ID, version, OS, architecture, deployment label, running accounts count, and total configs count. No personal data, channel names, or IP addresses are transmitted. Set TELEMETRY_AGREE=false in your environment to disable.
The server-side dashboard is open source: twitch-miner-go-telemetry.
Pass -auto-update to have the miner update itself on startup:
./_run.sh -auto-updateWhen a new release is found, the miner downloads the new binary, replaces itself, and exits — the service manager restarts it with the new version. If anything goes wrong, it falls back to printing the usual update notice.
For a systemd service, add the flag to ExecStart:
ExecStart=/usr/local/bin/twitch-miner-go -config /etc/twitch-miner-go/configs -auto-updateFor a Windows NSSM service, add -auto-update to the service arguments (re-run _install-service.bat or edit via NSSM GUI).
Not useful for Docker or Fly.io — those update by pulling a new image.
- Add more streamers or enable category/team watchers
- Configure notifications
- Set up a prediction strategy
- Deploy as a persistent service — see Docker/Fly.io/systemd/Windows service in the README