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://radekomsa.site/
Make sure Node.js is installed.
cd nextjs-app
npm install
npm run dev
Make 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 dev
docker-compose up --build
Create environment files:
nano .env.python
nano .env.nextjs
Paste the contents, then:
Ctrl+O
โ SaveEnter
โ Confirm filenameCtrl+X
โ Exit nano
List files to verify:
ls -la
cat .env.nextjs
After generating the SSL cert on the server:
chmod 600 ./letsencrypt/acme.json
Run from the project root.
Delete all containers and volumes:
docker-compose down -v
Free 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
bot
under 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://radekomsa.site/api/auth/callback/discord/callback/discord
https://radekomsa.site/api/auth/callback/discord
npx auth secret
Add to .env.local
:
AUTH_SECRET=your_generated_secret
From 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
rolename
inleague_settings.yaml
mkdir -p letsencrypt
touch letsencrypt/acme.json
chmod 600 letsencrypt/acme.json
Paste 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> .exit
docker-compose logs -f python