Getting Started
RootBot runs a normal Root user account headlessly as a bot. Setup has four parts, in order: an account and a token, configuration, the Lavalink sidecar that fetches YouTube audio, and deployment to a Linux VPS.
Prerequisites
| You need | Why |
|---|---|
| A Root alt account | The bot is this account. Throwaway, nothing paid attached, Root's Terms of Use do not permit automated use (Section 2.5), so ban risk is real. Never your main. See Limits. |
| A Windows PC with the Root client | Only for the one-time token capture, signed in as the alt. |
| A Linux VPS (Ubuntu) | Runs the bot and Lavalink. Python 3.11+, ffmpeg, Java 17+, curl (the deploy script installs what is missing). Direct internet egress, LiveKit media does not survive a proxied-only sandbox. |
| A burner Google account | For the Lavalink YouTube OAuth step. Never your main Google account; Google may terminate accounts used this way. |
The setup flow
1. Capture the Bearer token
The bot logs in with the alt's session Bearer token, lifted from the real client's own traffic, the same trick as Discord token login. Root's API traffic ignores the Windows system proxy, so the capture uses Proxifier + mitmproxy.
The result is one value, ROOT_TOKEN, which you treat like a password.
2. Configure
From the repository root:
cp .env.example .env
cp config.example.json examples/musicbot/config.jsonSet ROOT_TOKEN in .env. The ids in config.json are only a fallback seed, at startup the bot discovers the alt's communities automatically via the API, so the example's all-zero ids work until discovery runs.
→ Configuration for every setting.
3. Set up Lavalink
The bot never talks to YouTube directly: datacenter IPs get bot-checked and cookie sessions get SABR-flagged. A local Lavalink 4.2.2 with the youtube-source plugin does all fetching. The plugin must be built from a specific source commit, and its TV client needs a one-time OAuth device-code approval with the burner Google account.
→ Lavalink
4. Deploy
bash deploy/deploy.sh root@your-vpsThis ships the code, builds a venv, downloads Lavalink, installs systemd units for both services, and starts them (the bot only starts once .env contains a token). If plain ssh cannot reach the box, override the SSH command:
ROOTBOT_SSH="ssh -i ~/.ssh/mykey -p 2222" bash deploy/deploy.sh root@your-vpsOr run it manually
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
bash examples/musicbot/serve.sh # loads .env, runs the bot in foregroundFirst run checklist
serve.logshows a line likeserve: self=<account-id> discovery=api watching N containers in M communities, primed K messages.discovery=apimeans ListMine found the alt's communities;configmeans it fell back toconfig.json.- The alt must be a member of a community for the bot to see it. If a community is missing, invite/add the alt there, the bot rescans every 60 seconds and picks it up without a restart.
- In chat,
!pinganswerspong. Sit in a voice channel and!play <song name>, the bot joins your channel and plays.
Stability promise
Patch releases never break the public API, config keys, or the rootbot CLI's flags; a break may land only at a minor bump, and only after a deprecation warning one release ahead. rootbot.testing is provisional and may change in any release. The full policy is in the README.
Tests
The repo ships a stubbed test suite (no network, no LiveKit):
python3 tests/contracts/test_framework.py # ALL 82 checks
python3 tests/contracts/test_serve.py # ALL 150 checksIt covers wire parsing of ListMine responses, watcher routing, follow-me, smart shuffle, autoplay, text cards, and the playback loop.