Hosting Node.js Discord Bots
This guide covers basic requirements and troubleshooting for running Node.js bots on your panel.
1. Node.js Version Selection
Modern Discord bots require updated Node.js runtimes.
- To change your Node version, open the Startup tab in your panel.
- Under Docker Image, select Node.js 18 or Node.js 20.
2. Dependencies and package.json
Ensure your repository includes a valid package configuration file.
Set Auto Package Install to 1 in the Startup tab so the panel automatically runs installation commands on server start.
3. Environment Variables
To keep tokens secure, store secret keys inside a dedicated environment file:
- Open File Manager and create a file named
.env. - Add your bot token: DISCORD_TOKEN=your_bot_token_here
4. Common Troubleshooting Steps
- Disallowed Gateway Intents: Enable Privileged Gateway Intents under the Bot tab in the Discord Developer Portal.
- Invalid Token: Verify that your token in
.envis exact and does not contain extra spaces or quotes.