Start hereOverviewPrerequisitesInstallationBootstrapAdministrationUsage & commands

Prerequisites

Everything you need before installing, with where to get it. Budget ~30 minutes the first time, most of it in the Discord developer portal.

1. Discord server (guild)

Use your org's existing Discord or create one. You need Manage Server on it. Enable Developer Mode (User Settings → Advanced), then right-click the server icon → Copy Server ID — that's your DISCORD_GUILD_ID.

2. Discord application + bot

At discord.com/developers/applications → New Application. Then:

Invite the bot with the right permissions. On OAuth2 → URL Generator pick scopes bot + applications.commands, and permissions Manage Roles + Manage Channels. Then, crucially, in Server Settings → Roles drag the bot's own role above every role it will manage — Discord forbids a bot from editing roles above its own.

3. PostgreSQL 13+

Pick one:

4. Runtime: Docker or Rust

5. Session secret

The web server signs session cookies with SESSION_SECRET — 32+ random bytes, base64 (use ≥ 64 so sessions survive restarts):

openssl rand -base64 48

6. (Production) Domain + TLS

OAuth redirects must be https:// in production. Put the server behind a TLS-terminating reverse proxy (Caddy is the least effort) and point DISCORD_OAUTH_REDIRECT_URI + the reachable host at your domain, then register that exact redirect in the Discord app.

Next: Installation.