Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] MOSBot - Marbles on Stream Auto-Play Twitch Bot with Web Dashboard

Featured Replies

Hi everyone,

this is the official Unraid community support thread for MOSBot.

MOSBot is a Docker-based Twitch bot for Marbles on Stream. It automatically discovers live Marbles on Stream channels, passively watches chat activity, and sends !play once a lobby looks active. It includes a web dashboard for monitoring, account login, logs, stats, and basic control.

The project is designed to run cleanly on Unraid as a single Docker container.


What MOSBot does

MOSBot:

  • discovers live Twitch streams in the Marbles on Stream category

  • joins and parts Twitch IRC channels dynamically

  • watches for active lobbies based on real chat activity

  • sends exactly one !play when the configured lobby threshold is met

  • applies per-channel cooldowns to avoid spam

  • provides a web dashboard on port 8787

  • stores data in SQLite

  • supports Prometheus metrics

  • is designed to coexist with Twitch-Channel-Points-Miner-v2

MOSBot does not blindly spam !play. It waits until enough real users have typed !play within the configured time window, then sends one message and respects cooldowns.


Important notice

This tool automates !play in Marbles on Stream lobbies.

Please use it responsibly. Some streamers may not want bot participation in their chat. MOSBot includes blacklist and whitelist options so you can respect streamer rules.

You are responsible for the Twitch account you use with this container.


Project links

GitHub project:

https://github.com/patriqcs/mosbot

Unraid template repository:

https://github.com/patriqcs/unraid-templates

Unraid XML template:

https://raw.githubusercontent.com/patriqcs/unraid-templates/main/mosbot.xml

Docker image:

ghcr.io/patriqcs/mosbot


Required setup

Before starting the container, you need a Twitch Developer App.

Twitch Developer App

Create a new Twitch application here:

https://dev.twitch.tv/console/apps

Recommended settings:

Name: MOSBot Personal
OAuth Redirect URL: http://localhost
Category: Chat Bot
Client Type: Confidential

Copy the Client ID. You do not need a Client Secret for MOSBot’s Device Code Flow.


Required environment values

The template expects these important values:

TWITCH_CLIENT_ID

Your Twitch Developer App Client ID.

ENCRYPTION_KEY

Used to encrypt stored Twitch tokens.

Generate one with:

docker run --rm node:20-alpine node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"

DASHBOARD_PASSWORD_HASH

MOSBot expects an Argon2 password hash for the dashboard login.

Generate one with:

docker run --rm -it node:20-alpine sh -c "npm i -g argon2-cli >/dev/null && argon2-cli hash -p 'your-password'"

Replace your-password with your real dashboard password before running the command.


Appdata paths

Recommended Unraid appdata path:

/mnt/user/appdata/mosbot/

Configuration file:

/mnt/user/appdata/mosbot/config/config.yaml

Database:

/mnt/user/appdata/mosbot/data/mosbot.db

Logs:

/mnt/user/appdata/mosbot/logs/

Web UI

Uploading Attachment...grafik.png

After the container starts, open:

http://YOUR-UNRAID-IP:8787

Then:

  1. Log into the dashboard

  2. Go to Accounts

  3. Start the Twitch login flow

  4. Enter the shown device code at:

https://twitch.tv/activate
  1. Approve the login

The bot should come online shortly after that.


Basic configuration example

Create or edit:

/mnt/user/appdata/mosbot/config/config.yaml

Example:

discovery:
  intervalMinutes: 3
  maxStreams: 10
  minViewers: 30
  language: null
  sortBy: most-viewers

lobby:
  windowSeconds: 30
  minPlayers: 4
  cooldownSeconds: 180

ratelimit:
  userChatBudgetPer30s: 16
  verifiedBot: false

channels:
  whitelist: []
  blacklist: []

accounts:
  - name: primary
    enabled: true
    clientId: ${TWITCH_CLIENT_ID}

server:
  port: 8787

logging:
  level: info
  rotateDays: 14

database:
  path: /data/mosbot.db

Dashboard features

The dashboard includes:

  • overview tiles

  • live event feed

  • discovered stream list

  • joined channel state

  • sent !play counters

  • stats for 24h / 7d / 30d

  • live logs with filtering

  • runtime log-level changes

  • Twitch account login using Device Code Flow

  • health/status information


Metrics and health checks

MOSBot exposes:

/api/health

and:

/metrics

The /metrics endpoint can be used with Prometheus-compatible monitoring.

Example metrics include:

mosbot_plays_sent_total
mosbot_lobbies_detected_total
mosbot_rate_limited_total
mosbot_channels_joined
mosbot_discovery_duration_seconds

Running together with Twitch-Channel-Points-Miner-v2

MOSBot is designed to run alongside Twitch-Channel-Points-Miner-v2.

It uses:

  • a separate Twitch OAuth grant

  • a separate Twitch Developer App Client ID

  • separate appdata

  • separate token storage

  • separate SQLite database

Recommended separate appdata paths:

/mnt/user/appdata/twitch-miner/
/mnt/user/appdata/mosbot/

Do not mount the Twitch-Channel-Points-Miner appdata folder into MOSBot.


Troubleshooting

Dashboard does not open

Check that the container is running and that port 8787 is not already used by another container.

Open:

http://YOUR-UNRAID-IP:8787

Twitch login fails

Check:

  • TWITCH_CLIENT_ID is correct

  • the Twitch Developer App exists

  • the account completed the device login at https://twitch.tv/activate

  • the ENCRYPTION_KEY was not changed after login

If you changed the ENCRYPTION_KEY, log in again through the dashboard.

Bot joins channels but does not send !play

Check your config:

lobby:
  windowSeconds: 30
  minPlayers: 4
  cooldownSeconds: 180

If minPlayers is too high, MOSBot may never consider a lobby active.

A streamer does not allow bots

Add the channel to the blacklist:

channels:
  blacklist:
    - channelname

Container starts but config is ignored

Make sure your config file is located here:

/mnt/user/appdata/mosbot/config/config.yaml

Also check container logs for YAML formatting errors.


Support information to include when asking for help

If you need help, please include:

Unraid version:
MOSBot image tag:
Install method: Community Apps / manual template / docker compose
Container log excerpt:
config.yaml with tokens/secrets removed:
Browser URL used for dashboard:
Relevant error message:

Please remove all secrets before posting logs or config files.

Do not post:

  • Twitch access tokens

  • refresh tokens

  • dashboard password hash if you reuse it elsewhere

  • private cookies

  • full database files


Source code and issues

Source code:

https://github.com/patriqcs/mosbot

Template repository:

https://github.com/patriqcs/unraid-templates

Bug reports and feature requests can be posted here in this thread or opened as GitHub issues.

Thanks for testing MOSBot.

Edited by patriQ

  • patriQ changed the title to [Support] MOSBot - Marbles on Stream Auto-Play Twitch Bot with Web Dashboard
  • Author

Reserved

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.