Telegram bot for managing a self-hosted Windrose dedicated server (indifferentbroccoli/windrose-server-docker) running under Docker Compose.
- Server lifecycle: start / stop / restart / pull / pull-and-restart
- Live status with uptime and online player count
- Player join / leave notifications to admin
/players— detailed list with name, account ID and time-in-game (admin)👥 Onlinebutton — quick online check for any trusted user/logs— last N lines ofdocker compose logs(admin)- Tiered access: admin (full control) and trusted users (start + view)
- Self-test on startup — parser regexes are validated against fixtures and the bot refuses to start if any fail
- Optional verbose
LOG_WATCHER_DEBUGmode for diagnosing parser issues live injournalctl
| File | Purpose |
|---|---|
bot.py |
The bot itself |
requirements.txt |
Python dependencies |
install.sh |
Installer (creates venv, copies files, registers systemd unit) |
.env.example |
Template for configuration |
- Drop all four files into a directory on the server.
- Run:
sudo ./install.sh - Edit
/opt/windrose-bot/.env— at minimum setBOT_TOKENandADMIN_ID. - Start:
sudo systemctl enable --now windrose-bot - Watch:
sudo journalctl -u windrose-bot -f
See .env.example. Required: BOT_TOKEN, ADMIN_ID. Other variables are optional with sensible defaults.
The bot tails docker compose logs -f and matches three log signatures:
| Event | Source line |
|---|---|
| Join (account ID) | R5LogDataKeeper: ... Account connected. AccountId <ID> |
| Join (player name) | LogNet: Join succeeded: <Name> |
| Leave | R5LogCoopProxy: ... OnAccountDisconnected ... AccountId <ID> |
The two join signals arrive ~1 second apart in either order. The bot keeps a 5-second pairing window with a half-buffer (whichever arrives first waits for its complement). Every event also has a 5-second dedup window because the server logs each one twice through different code paths. On startup, the bot seeds its active-player state from the most recent Connected Accounts table dump, so a bot restart while players are online does not produce phantom join notifications.
If notifications are not coming, set LOG_WATCHER_DEBUG=true in .env, restart the service, and watch journalctl -u windrose-bot -f. You will see:
WATCHER_RAW: ...for the first 20 lines after watcher start (so you can see exactly whatdocker compose logsis delivering)Account connected: <ID>,Join succeeded: <Name>,Player JOIN/LEAVE: ...for every detected event
Turn it back off afterwards — it is verbose.
- Bot does not start,
Self-test failedin logs: the log format on your server differs from the fixtures. Capture the relevant line withdocker logs windrose | grep <pattern>and adjust the regex; do not disable the self-test. - Bot does not respond to commands:
sudo systemctl status windrose-bot, thensudo journalctl -u windrose-bot --since '5 min ago'. - Permission errors on
/var/log/windrose-bot.log:install.shcreates the file with mode 644; the bot also logs to journald, so file logging is optional.

