Welcome to the Dota 2 League Hosting Platform, a side project with 100+ active users and ~400 discord members
- Players join a queue on Discord.
- Once 10 players are in queue, a Steam bot:
- Creates a lobby
- Invites all players
- The Discord bot notifies players.
- When all players join:
- The lobby starts automatically
- The match is tracked and scored
- MMR is updated live.
- In Season 2, enjoy:
- 🧠 Full match history
- 📊 Detailed stats per game
- 🏆 Dota League Hosting Platform:
https://www.dota-league-hosting.xyz/ - 🥇 Season 1:
https://dota-league.vercel.app/ - 🥈 Season 2:
https://dota2.rs/
Make sure Node.js is installed.
cd nextjs-app
npm install
npm run devMake sure Python is installed.
cd python-scripts
pip install -r requirements.txt # Install dependencies
pip list # Check installed packages
# First time setup
python3 discord_db.py
# Run the scripts
python3 run_all.py dev
# Or if using 'python' directly
python run_all.py devdocker-compose up --buildCreate environment files:
nano .env.python
nano .env.nextjsPaste the contents, then:
Ctrl+O→ SaveEnter→ Confirm filenameCtrl+X→ Exit nano
List files to verify:
ls -la
cat .env.nextjsAfter generating the SSL cert on the server:
chmod 600 ./letsencrypt/acme.jsonRun from the project root.
Delete all containers and volumes:
docker-compose down -vFree up memory:
docker system prune -a --volumesℹ️ Note: DB is copied from local if it exists.
DiscordBot for hosting a Dota 2 League.
- Go to the Discord Developer Portal
- Click New Application → Give it a name → Create
- Go to the Bot tab → Click Add Bot → Confirm
- Click Reset Token → Copy the token
✅ Enable in Bot Tab:
- Presence Intent
- Server Members Intent
- Message Content Intent
- Go to OAuth2 > URL Generator
- Select
botunder Scopes - Add permissions (e.g., Administrator, Send/Manage Messages)
- Copy the generated URL → Open in browser → Select server → Authorize
If using a frontend:
Update OAuth2 Redirect URLs in the Discord Developer Portal:
https://dota2.rs/api/auth/callback/discord/callback/discord
https://dota2.rs/api/auth/callback/discord
npx auth secretAdd to .env.local:
AUTH_SECRET=your_generated_secretFrom the Discord Developer Portal:
AUTH_DISCORD_ID=your_discord_client_id
AUTH_DISCORD_SECRET=your_discord_client_secret- Enable Developer Mode in Discord:
- User Settings → Advanced → Enable Developer Mode
- Right-click a channel → Copy ID → Paste into
.env
Initialize:
python3 discord_db.py- Create a role on Discord
- Assign it to yourself
- Set
rolenameinleague_settings.yaml
mkdir -p letsencrypt
touch letsencrypt/acme.json
chmod 600 letsencrypt/acme.jsonPaste full Steam profile URL into:
https://www.dota2.com/league/17791/admins
sqlite3 league.db
sqlite> .tables
sqlite> .headers on
sqlite> .mode column
sqlite> SELECT * FROM MatchHistory;
sqlite> .exitdocker-compose logs -f python