<!-- canonical: https://hostdc.xyz/host/node · last updated 2026-09-06 · HostDC, Keep your Discord bot online 24/7. -->

# Node.js Discord bot hosting

HostDC runs Node.js 20 and 22 bots online 24/7, on a free plan with a 256 MB RAM pool, 0.5 CPU and 512 MB storage. We install from your lockfile, start your entry file and keep the process supervised.

## Three steps

**1. Bring your project.** A `package.json` and a lockfile are all we need to work out what to install:

```
package.json
package-lock.json
index.js
```

```js
console.log('Logged in as your bot');
```

**2. Add your token** on the Secrets tab. It arrives in your process as `process.env.DISCORD_TOKEN`.

**3. Press Deploy.** We run `npm ci` when a lockfile is present, then `node` on your entry file. Change the entry on the Settings tab if it is not `index.js`.

## Limits you should know

The free plan gives a 256 MB RAM pool, 0.5 CPU and 512 MB storage, and needs reactivating weekly from your dashboard. Mini, Lite, Pro and Max are the paid plans: Lite is $1.69 a month with a 1 GB pool. Pro is $2.49 a month with a 2 GB pool and an HTTPS port per bot. Compare them on the [pricing page](/pricing).

Any npm package installs through our proxy, which checks each version against the known-malicious list and its checksum, with install scripts off. Nothing installs while your bot runs, and installed packages count toward your storage.

## Related

- [Host a discord.js bot](/host/discord-js)
- [Deploy from GitHub](/guides/deploy-from-github)
- [Cron jobs for Discord bots](/guides/cron-jobs-for-discord-bots)

## FAQ

### Which Node version do new bots get?
Node 22, unless the `engines.node` field in your `package.json` asks for 20. Each deploy reads that field again, so the version only changes when you change it.

### Can I use TypeScript?
Yes. Pick "TypeScript (Node.js 22)" or "Bun 1.4" when you create the bot and point it at your `.ts` entry file. On Node the deploy compiles it for you; Bun runs it as it is.

### Does `npm install` work at runtime?
No. The sandbox has no registry access while your bot runs. We install everything at deploy time.

### Can I run a web server too?
On Pro, yes: each bot can get one HTTPS port. On Free and Lite the bot is outbound-only.
