# Self-host NoCap Bots

Source: https://www.nocapbots.com/docs/self-hosting
Last updated: 2026-11-06

> NoCap Bots is two processes: a Next.js dashboard and a relay engine that holds the Discord gateway and voice. Create one Discord application for the Callout bot and one per speaker slot, fill in .env.local, and run npm run bot and npm run dev. Whop billing is optional.

## Discord applications

One bot account can hold one voice channel per server, so you need one application for the Callout bot plus one per speaker slot. In the Discord Developer Portal, create the main application, copy its client id, secret and bot token, and add `<your app>/api/auth/callback` as an OAuth2 redirect. Then create one more application per speaker slot and copy each bot token.

## Environment

```
DISCORD_CLIENT_ID=your_application_id
DISCORD_CLIENT_SECRET=your_oauth_secret
DISCORD_BOT_TOKEN=shotcaller_bot_token
RELAY_BOT_TOKENS=speaker_token_1,speaker_token_2

AUTH_SECRET=run_openssl_rand_hex_32
CONTROL_SECRET=run_openssl_rand_hex_32
NEXT_PUBLIC_APP_URL=http://localhost:3000
```

## Run it

```
npm run bot   # relay engine + control API on :8787
npm run dev   # dashboard on :3000
```

## Billing with Whop

Optional. Without Whop keys a plan is simply a setting. To charge, create four monthly plans with a 7-day trial in Whop, put their ids and your API key in the environment, point a webhook at `/api/billing/webhook`, and set `BILLING_REQUIRED=1`. How plans behave for your users is in [billing](https://www.nocapbots.com/docs/billing.md).

## Related guides

- [How Voice Relay carries Discord voice](https://www.nocapbots.com/docs/voice-relay/how-it-works.md): Why Discord voice needs bots to reach several channels, how the speaker bots relay audio with no transcoding, and what latency to expect.
- [Set up Voice Relay from an empty Discord server](https://www.nocapbots.com/docs/voice-relay/getting-started.md): Set up a Discord voice relay in about ten minutes: make the channels and a caller role, invite the bot, pick roles and speaker channels, then type /start.
- [Plans, billing and transfers](https://www.nocapbots.com/docs/billing.md): NoCap Bots plans and billing: free trial, upgrading, cancelling, payment details, moving a subscription to a new server and server transfer requests.
- [Voice Relay slash commands](https://www.nocapbots.com/docs/voice-relay/commands.md): Every Callout slash command: /start, /stop, /status, /ping, /start-cross-server and /stop-cross-server, and who can use them.
