Multi-Server Discord CTF Bot Platform with Web-Managed Dashboard & Supabase Integration. Manage multiple CTF discord servers from a single bot instance. Connect directly to read-only NXCTF Supabase databases. Configure channels and features via a premium glassmorphic Web UI.
- First-Time Setup Wizard: Securely configure admin credentials on first boot.
- Server Tenant Management: Add, update, or remove Discord servers (
guilds) dynamically. - Supabase Credentials Validation: Auto-tests connectivity to the server's Supabase instance.
- Dynamic Event Picker: Fetches events directly from the target Supabase instance so you can select which active CTF event to track.
- Discord Channel Routing: Configure separate channels for First Blood alerts, Live Scoreboards, Announcements, and Ticket logs.
- Ticket Viewer: Browse support tickets opened by participants across all servers.
- System Console Log: Live terminal viewer showing bot activity, connection statuses, and errors.
- 🩸 Realtime First Bloods: Subscribes to Supabase
solvestable insert events. Sends rich embeds to designated first-blood channels, using a local SQLite cache to prevent duplicates. - 🏆 Live Scoreboard (
/scoreboard): Displays top rankings and points calculated from user solve data. - 📋 Challenges Listing (
/challenges): Displays challenges grouped by category with custom difficulty indicator badges. - 🎫 Ticketing System (
/ticket): Creates private, temporary text channels in a specified category for participant help. Tracks assignees and status (open,in_progress,closed) in SQLite.
nxbot/
├── nxbot # Bash CLI wrapper (start/stop/status/logs/setup)
├── docker-compose.yml # Container orchestration
├── db/
│ └── schema.sql # Local SQLite database structure
├── web-dashboard/ # Next.js 16 management dashboard
└── discord-bot/ # discord.js bot engine
- Docker and Docker Compose
- sqlite3 CLI (for initialization setup)
- A Discord Bot Token (obtain from Discord Developer Portal)
Run the interactive CLI setup to configure the SQLite database and create .env template:
./nxbot setupEdit the generated .env file in the root directory:
DISCORD_BOT_TOKEN=your_bot_token_here
JWT_SECRET=your_glowing_dashboard_session_secretBuild and start the dashboard and discord bot in background containers:
docker compose build --no-cache web-dashboard
./nxbot build
./nxbot start- Open your browser and navigate to
http://localhost:3000. - The dashboard will detect a fresh installation and prompt the Setup Wizard.
- Create your administrator credentials.
- Log in to access the panel, register your first Discord Server and map its Supabase credentials.
The ./nxbot control script acts as an easy command dispatcher:
./nxbot start: Boot up all services../nxbot stop: Shut down and remove containers../nxbot restart: Gracefully restarts all services../nxbot status: Shows health checks and running ports../nxbot web: Starts dashboard ONLY (maintenance/safe mode)../nxbot logs [bot/web]: Tails logs for a specific service.
- Read-Only Supabase Anon Access: Bot uses the client's public anon key to read
solves,challenges,users, andeventstables. - Zero Configuration in .env: All Supabase keys, URLs, and channel IDs are stored in the local SQLite database (
data/nxbot.db), ensuring no sensitive CTF credentials leaks in environment variables. - Isolated SQLite Storage: Next.js and the Bot share database state via a Docker volume mount. System configuration, logs, ticketing metadata, and first blood caches are fully self-hosted.
Built with ❤️ by the NXCTF Community.