BotHosterJoin early access

Node.js runtime

Host a discord.js bot
without babysitting a VPS.

A GitHub-first home for Node.js Discord bots, with the deployment details made visible. BotHoster is currently accepting early-access signups.

Production shape

The same project structure you use locally.

Good hosting should remove server chores without hiding the files and signals that make a Node deployment understandable.

01 / 03

Standard Node projects

Keep the package.json, lockfile, and start script you already use. A hosting workflow should understand the project instead of forcing a custom bot format.

package.json + lockfile + start command

02 / 03

Secrets outside Git

Pass the Discord token through an environment variable. The token should never live in a public repository, source file, screenshot, or support message.

process.env.DISCORD_TOKEN

03 / 03

Useful process output

Startup errors, missing packages, rejected promises, and Gateway failures need to be visible in one place when a deployment does not stay online.

stdout + stderr + exit status

Deploy checklist

Four checks before the bot goes live.

These steps prevent most first-deployment failures and make later updates much less dramatic.

  1. Give the project a reliable start command

    Add a production script such as "start": "node src/index.js" to package.json and verify it works locally with npm start.

  2. Read the token from the environment

    Use process.env.DISCORD_TOKEN (or a clearly named equivalent), add local .env files to .gitignore, and rotate any token that has ever been committed.

  3. Push a complete, reproducible repository

    Commit package.json and the matching lockfile. Do not commit node_modules; the host should install the declared dependencies during deployment.

  4. Deploy, inspect, then test a real command

    Watch the first startup, confirm the Ready event, and test the bot in a private server before announcing the deployment.

Discord-specific

Hosting cannot fix an incorrect Gateway configuration.

A discord.js process stays connected to Discord's Gateway and subscribes to the events selected by its intents. Enable only the intents the bot uses, and remember that privileged intents must also be enabled in the Discord Developer Portal.

Discord's official guidance says a bot token is highly sensitive and should never be shared or checked into version control. The Discord getting-started guide explains credential handling, while the discord.js project setup guide covers environment variables for Node.js projects.

If a token has entered Git history, deleting the visible line is not enough. Reset the token in the Developer Portal, update the deployment secret, and then clean the history separately if needed.

Questions

Discord.js hosting FAQ

Which Node.js version should a discord.js bot use?

Use a Node.js release supported by the discord.js version in your package.json. Declare the expected version with the package.json engines field when possible instead of relying on a host default.

Should I commit my Discord bot token?

No. Discord treats the bot token as a highly sensitive credential. Store it as a secret or environment variable, and reset it immediately if it enters Git history.

Why does my bot start locally but fail on a host?

Common causes include a missing start script, an undeclared package, the wrong Node version, case-sensitive import paths, a missing environment variable, or an intent enabled in code but not in the Discord Developer Portal.

Next step

Bring the repository. Leave the server chores.

Join early access for BotHoster and help shape the GitHub-to-discord.js deployment workflow.