InvokaraDISCORD BOT HOSTING
HomeWeb panelFeaturesPricingTemplatesDocs Support
Sign in
Home › Guides

discord.js bot hosting on Node.js 22 or 24

Your discord.js bot stays online 24/7: upload your project, Invokara installs your modules and runs your start script.

What is supported

  • Node.js 22 or 24, chosen in the bot settings: discord.js, Sapphire and any npm module.
  • npm, pnpm or yarn depending on your lockfile; native modules like SQLite (better-sqlite3) are built at install time.
  • TypeScript: npm run build before starting, or the .ts file run directly.
  • ffmpeg and libopus for @discordjs/voice.

package.json and entry file

package.json
{
  "name": "my-bot",
  "main": "index.js",
  "scripts": { "start": "node index.js" },
  "dependencies": {
    "discord.js": "^14.19.3",
    "dotenv": "^16.5.0"
  }
}
index.js
require('dotenv').config();
const { Client, GatewayIntentBits } = require('discord.js');

const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.once('ready', (c) => console.log(`Logged in as ${c.user.tag}`));
client.login(process.env.TOKEN);

Invokara uses the start script if there is one, otherwise the main field, otherwise index.js, main.js, bot.js, src/index.js, index.ts…

pm2, several programs, subfolders

No need for pm2: the bot already restarts on its own. A "start": "pm2 start index.js" script is understood, and an ecosystem.config.js with several apps (the bot and its website, for example) starts them all together, with logs prefixed by their name.

A project inside a subfolder of the zip is detected: modules are installed and the bot starts from that folder.

An Express dashboard over HTTPS

Your bot can serve its own website: enable the web panel in Settings, set the port and listen on process.env.PORT. The mybot.invokara.cloud address (or your own domain) gets its HTTPS certificate, created and renewed automatically.

JavaScript (express)
const express = require('express');
const app = express();
app.get('/', (req, res) => res.send('My bot is online!'));
app.listen(process.env.PORT || 3000, '0.0.0.0');
💡
Listen on 0.0.0.0, not on localhost: otherwise the "This bot is offline" page shows up.

The most common errors

Cannot find module 'xxx'Add the module to the dependencies in package.json, then restart. If it is already there, your project is probably in a subfolder.
Cannot use import statement outside a moduleAdd "type": "module" to package.json, or use require.
Used disallowed intentsEnable the requested intents in the Bot tab of the Discord developer portal.
JavaScript heap out of memoryReduce caches (messages, members) or move to a bigger plan.

Frequently asked questions

Which Node.js version is available?

Node.js 22 or 24, chosen in the bot settings.

Do I need pm2 to keep the bot online?

No: the bot restarts on its own after a crash. pm2 scripts and ecosystem.config.js files are understood.

How much RAM for a discord.js bot?

A small bot usually uses 60 to 150 MB: the Starter plan (256 MB) is enough to begin.

Can I deploy from GitHub?

Yes: link your repository and every push redeploys the bot. A version is kept before each deploy so you can roll back.

Want to host it here?

Sign in with Discord, then upload your project as is.

Put my bot onlineSee pricing

Read next

  • How to Host a Discord Bot 24/7: Step-by-Step Guide
  • Python Discord Bot Hosting (discord.py, Pycord)
  • Free Discord Bot Hosting: the Real Options
  • All the documentation
InvokaraDISCORD BOT HOSTING Join the support Discord
ProductWeb panelFeaturesPricing
HelpDocsFAQTemplatesContactReport abuseService status
GuidesHost a bot 24/7Python Discord botdiscord.js botFree hosting?
LegalLegal noticeTerms of useTerms of salePrivacy

© 2026 Invokara · Net prices, VAT not applicable (art. 293 B CGI)