Home / Servers / Discord Bot VPS

Host Discord bots 24/7 on a no-KYC VPS

Run discord.js, discord.py, JDA or DSharpPlus bots on a Linux server that keeps going when your PC is off. A bot needs a few hundred MB of RAM, so the smallest plan runs one, and Blackbox Core has room for several bots and a database. Sign up with a generated credential and pay with crypto, card or cash.

Deploy a bot server from $4.99 a monthenough for a bot
  • Any language that runs on Linux
  • systemd or Docker
  • Routed IPv6 /64 on Blackbox

A discord.js bot under systemd

On Ubuntu 24.04 or Debian 12 or 13, as root. The bot runs as its own user, restarts after a crash, and stops retrying if it keeps failing.

# Node 26 LTS (the distro packages are older)
curl -fsSL https://deb.nodesource.com/setup_26.x | bash -
apt install -y nodejs git

git clone https://github.com/you/your-bot.git /opt/bot
cd /opt/bot && npm ci --omit=dev

# A system user with no shell; the token file only it can read
useradd --system --home-dir /opt/bot --shell /usr/sbin/nologin bot
printf 'DISCORD_TOKEN=%s\n' 'paste-your-token' > /opt/bot/.env
chown -R bot:bot /opt/bot && chmod 600 /opt/bot/.env

cat > /etc/systemd/system/discord-bot.service <<'EOF'
[Unit]
Description=Discord bot
After=network-online.target
Wants=network-online.target
StartLimitIntervalSec=300
StartLimitBurst=10

[Service]
User=bot
WorkingDirectory=/opt/bot
EnvironmentFile=/opt/bot/.env
ExecStart=/usr/bin/node index.js
# discord.py: ExecStart=/opt/bot/.venv/bin/python bot.py
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable --now discord-bot
journalctl -fu discord-bot

What a bot uses

Most bots fit the smallest plan with room to spare. The rows below show what each kind uses and when one needs more.

Slash-command or moderation bot
A few hundred MB of RAM at most and almost no CPU. Nano runs one, and Core runs several side by side.
Music bot
Lavalink needs Java 17 or newer. Give it a fixed heap with -⁠Xmx. Encoding audio takes CPU only while tracks play.
Large bot
Discord requires sharding from 2,500 servers, and member and message caches grow with every guild. Turn off the caches you never read before buying more RAM.
AI bot
Calling a hosted model API costs no RAM. Running the model on the server does: a 7B or 8B model needs Blackbox Plus with 8 GB.
Database
SQLite covers most bots and lives on the NVMe disk with the code. Postgres or Redis fit on the same server.
Traffic
Gateway and API traffic is tiny. A 96 kbps voice stream playing nonstop moves about 32 GB in 31 days, so the 4 TB on Core covers more than a hundred of them.

What takes bots down on a server

Common reasons a hosted bot goes quiet, and the fix for each.

Run the bot on Blackbox

Your bot token sits in the server's memory and on its disk. On a Blackbox Linux image the CPU encrypts that memory (AMD SEV-SNP) and the disk can be encrypted with a passphrase only you hold. With both on, the host cannot read the token.

MontrealAmsterdamNew York City (launch pre-order)
Deploy Blackbox from $4.99 a month
  • Nano has 2 GB of RAM and 25 GB of NVMe, enough for a bot. Core has 2 vCPU, 4 GB and 50 GB, enough for several bots and their database.
  • A routed IPv6 /64 next to the IPv4 address, which the Lavalink route planner can rotate through.
  • 4 TB of transfer per 31 days on Core. Past it the port drops to 10 Mbps until the period rolls over, with nothing extra billed.
  • No guest agent, so the host has no channel to run commands inside.
  • Any term from 7 to 365 days, prorated by the day; Nano is sold for 31 days or more.

How Blackbox works

Questions

How much RAM does a Discord bot need?

Less than the smallest plan has. A slash-command or moderation bot usually uses a few hundred MB at most, so Blackbox Nano runs one. Blackbox Core has 4 GB, enough for several bots and a database side by side. Bots that cache members across thousands of servers, music bots running Lavalink and bots that run a local AI model need more.

Can I run a music bot?

Yes. Lavalink, ffmpeg and your Discord library all run on Linux. Lavalink is a Java server, so give it a fixed heap with -Xmx and leave the rest of the RAM for the bot. YouTube flags many automated requests with an error that asks you to sign in to confirm you're not a bot, so a bot that plays from YouTube may need the youtube-source plugin's OAuth or poToken setup.

Will my bot survive a reboot?

Yes, once a service manager starts it. A systemd unit with WantedBy=multi-user.target starts the bot at boot and restarts it after a crash. With Docker, run the container with --restart unless-stopped.

Can I host multiple bots on the same VPS?

Yes. Give each bot its own directory and unit, or write one template unit (bot@.service with WorkingDirectory=/opt/bots/%i) and start bot@music, bot@mod and so on. Docker Compose works as well.

How do I deploy updates?

Run git pull, install dependencies, then systemctl restart. To deploy on every push, let your CI connect over SSH with a deploy key that may only run your deploy script (a command= entry in authorized_keys).

What about Discord rate limits?

Maintained libraries such as discord.js, discord.py, JDA and DSharpPlus read Discord's rate-limit headers and wait for you. The limit to watch is the invalid-request one: 10,000 requests answered with 401, 403 or 429 within 10 minutes gets the server's IP blocked for a while, and every bot on that IP loses the API together.

Can I host on a US/EU/SG location for latency?

Blackbox runs in Montreal and Amsterdam, with New York City on pre-order. The standard VPS and VDS plans are in Singapore and Hong Kong. The latency that matters is between your bot and Discord's API, not your members, so check client.ws.ping (discord.js) or bot.latency (discord.py) after you deploy.

Why not a free bot host?

Free tiers commonly put idle apps to sleep, cap monthly hours or reset local files on redeploy. A server runs until you stop it, keeps its disk, and lets you install ffmpeg, Java or a database next to the bot.

Does Servury log my bot traffic?

No. We keep no traffic logs for customer servers. Blackbox counts bytes for the transfer allowance and shows the total on the server's Overview. Your account is a generated credential with no email or name attached.

Guides on this topic

Related pages

Support

Questions before you buy? Ask here. You do not need an account: your first message creates one, and you get its credential to come back for our reply.