Skip to main content
Discord bots are long-running Node processes that don’t accept HTTP traffic. They’re a perfect fit for Nubo: push your code, the bot runs, redeploy from a git push.

What you’ll need

  • A Discord application + bot token from the Discord Developer Portal.
  • A repo with a package.json and a start script that boots your bot.
If you’d rather start from a working example, withnubo/discordjs-starter is a ready-made repo you can fork and deploy as-is.

Minimal bot

index.js:
index.js
package.json should have a start script:
package.json
Test locally with your token:
If you see “Logged in as <bot-name>”, you’re ready.

Deploy

1

Push to GitHub

Initialize git, commit, push to a private repo. Don’t commit your token.
2

New Frame on Nubo

Open your Project and Space, hit + Frame, connect the repo.
3

Set DISCORD_TOKEN

In the Frame’s Settings tab, add DISCORD_TOKEN with your bot token. See Environment variables for details.
4

Port doesn't matter (almost)

Discord bots don’t accept HTTP, but Nubo expects a port. Set it to any valid port (3000 is fine); ports below 1024 and a few reserved infra ports aren’t allowed. The Frame’s URL won’t serve anything useful, which is correct.
5

Deploy

Hit deploy. Check the Logs tab for “Logged in as …”.

Keeping the bot alive

Nubo restarts your bot if it crashes. If client.login(...) returns a rejected promise (bad token, network), the Node process exits, and Nubo brings it back up. Avoid this anti-pattern:
Swallowing crashes hides bugs. Let the process die and let Nubo restart it.

Sharding and gateway intents

Sharding works the same way on Nubo as anywhere else. For bots in fewer than 2,500 guilds you can ignore shards entirely. Privileged intents (MessageContent, GuildMembers, GuildPresences) must be enabled in the Discord Developer Portal before your code requests them.

Slash command registration

Register commands once at startup or via a separate script. Avoid registering on every deploy: it counts against Discord’s API limits.

How the build works

Uses the Node.js pack of Raypacks. Standard Node flow: install dependencies, run your start script.