Linux VPS

Host a Discord bot (Node.js)

Run a 24/7 Discord bot on a HolyCloud Linux VPS with Node.js and PM2.

~7 min read Beginner #discord#bot#nodejs#vps

A VPS keeps your Discord bot online 24/7. Landing: Discord server. Hub: VPS.

Prerequisites

  • Linux VPS 1–2 GB RAM
  • Discord Developer token

Minimal stack

sudo apt update && sudo apt install -y nodejs npm
mkdir -p ~/discord-bot && cd ~/discord-bot
npm init -y
npm install discord.js dotenv
npm install -g pm2
pm2 start index.js --name discord-bot
pm2 save && pm2 startup

Next