Documentation
Learn how to self-host, configure, and run the full-stack Discord bot with your FiveM QBCore server.
Quick Start (Docker)
- Clone the monorepo
- Set required environment variables (see below)
- Build and start services
# Windows PowerShell $env:NODE_ENV = "production" $env:DISCORD_CLIENT_ID = "your-id" $env:DISCORD_CLIENT_SECRET = "your-secret" $env:DISCORD_BOT_TOKEN = "your-bot-token" $env:JWT_SECRET = "change-me" # Build & run each service in Docker (see service Dockerfiles) # backend-api npm --prefix backend-api ci && docker build -t qbmanager-api ./backend-api && docker run --rm -p 3001:3001 --env-file .env qbmanager-api # discord-bot npm --prefix discord-bot ci && docker build -t qbmanager-bot ./discord-bot && docker run --rm --env-file .env qbmanager-bot # web-dashboard npm --prefix web-dashboard ci && docker build -t qbmanager-web ./web-dashboard && docker run --rm -p 3000:3000 --env-file .env qbmanager-web
Requirements
- • Discord application with Bot + OAuth2 enabled
- • FiveM server running QBCore
- • PostgreSQL or MySQL (configure in backend)
- • Public URL for OAuth callback
Env vars (common)
- • DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET
- • DISCORD_BOT_TOKEN
- • BACKEND_URL, WEB_URL
- • DATABASE_URL
- • JWT_SECRET
Discord setup
- Create an application on the Discord Developer Portal
- Add a Bot and copy the token
- Set OAuth redirect: /api/auth/callback
- Invite the bot with required intents
QBCore integration
- • Install the FiveM resource from fivem-scripts/
- • Configure server.cfg to start the resource
- • Ensure the API endpoint is reachable from the server