Node.js & Python hosting or a VPS: which one for your bot
A Discord bot asks very little of its machine: stay powered on, keep an outgoing connection to Discord and restart the program if it stops. It has no port to open and, most of the time, what it uses is memory. So the real question is not power, but how much you are willing to administer yourself.
Node.js & Python hosting is the simplest choice when:
- you have a single program to run, in discord.js or discord.py;
- its data fits in a SQLite file, or in the database included from the Advanced plan up;
- you want no system to update, no firewall and no SSH access to secure: you follow the bot from its console, in the customer area.
A VPS becomes the right choice when:
- you run several bots, or a bot and what goes with it (web dashboard, scheduled jobs, internal tools);
- you need your own database server (PostgreSQL, MariaDB, Redis), with its own settings and backups;
- the bot depends on other software installed on the system: Lavalink for a music bot, or Docker to keep each bot in its own container;
- it is written in another language than JavaScript or Python: Java (JDA), C# (Discord.Net), Go, Rust.
The VPS gives you root access, a dedicated IPv4 address and a 1 Gb/s network. In return, updates, the firewall and backups become your job. If you are still unsure, start with Node.js & Python hosting: everything is monthly, with no commitment, and moving to a VPS later comes down to copying your project and your data.
Intel VPS or Ryzen VPS for a Discord bot
A bot spends most of its time waiting for events. That is a light, steady load, exactly what the Intel VPS is built for. The Ryzen VPS earns its place when something next to the bot really computes or writes.
- Intel VPS: our cheapest VPS, on a Xeon E5-2687W v4 with DDR4 ECC memory. Its first tier (2 vCPU, 4 GB) is enough for a few bots with a small database. ECC memory corrects bit errors on the fly, which matters for a program that runs for months without a restart. At the Plus and Pro tiers it gives more vCPU than the Ryzen for the same memory, useful for a bot split across several processes.
- Ryzen VPS: a Ryzen 9 9950X, DDR5 and NVMe storage, whatever the tier. Take it for a busy database, images generated on the fly, a dashboard that has to respond quickly or Docker image builds.
In both ranges, pick the tier by memory. A bot's memory mostly depends on what it keeps in cache: servers, members, messages. The more servers it joins, the higher it climbs, and a heavy library (image processing, data analysis) soon weighs more than the bot itself. Add the database and, if you have them, Lavalink or the dashboard, then leave some headroom for the system.
Tiers range from 2 to 16 vCPU and from 4 to 64 GB, and you change tier without reinstalling. Both ranges are Linux containers with nesting enabled: Docker works on them if you prefer one container per bot (see installing Docker on a VPS). For the other criteria, see the guide on choosing a VPS.
Getting started: from the order to a bot that is online
On Node.js & Python hosting
- Prepare the project: a single entry file (
index.js or main.py), dependencies listed in package.json or requirements.txt, and the token in an environment variable, never in the code.
- Choose the plan among the offers on this page. Their buttons order a Node.js server; for Python the plans are the same, and the order links are in the frequently asked questions of the offer page.
- Upload your project and start it: the service is ready about 30 seconds after you order.
- Read the console in the customer area. An error on first start is spelled out there: missing dependency, mistyped token, intent not enabled in the Discord developer portal.
On a VPS
- Order an Intel or Ryzen VPS with a recent Debian or Ubuntu. It is ready a few minutes after payment.
- Secure access before anything else: SSH key, firewall, updates. The guide on securing a Linux VPS takes these settings one at a time. A bot needs no incoming port: only SSH stays open, plus ports 80 and 443 if you add a dashboard.
- Create an unprivileged user (here
bot), install Node.js or Python, then copy the project into its folder.
- Declare one systemd service per bot, in the file
/etc/systemd/system/bot.service: it restarts the program after a crash and when the VPS reboots.
[Unit]
Description=Bot Discord
After=network-online.target
Wants=network-online.target
[Service]
User=bot
WorkingDirectory=/home/bot/app
EnvironmentFile=/home/bot/app/.env
ExecStart=/usr/bin/node index.js
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
In Python, replace the ExecStart line with the full path to your virtual environment's interpreter, followed by main.py. Then enable the service and follow its logs:
systemctl daemon-reload
systemctl enable --now bot
journalctl -u bot -f
For a second bot, copy the file under another name, with its own folder and its own token. Before a major update, take a snapshot from the customer area. The token, intents and choice of database are explained in the guide on hosting a Discord bot 24/7.
When these plans are not the right choice
- You are learning or testing: as long as the bot does not have to stay online, your own computer is enough. Hosting becomes worth it the day members start relying on it.
- The Developer plan for a bot that stores a lot: it includes neither a database nor a backup, and its network speed is limited. That is enough for a simple bot; beyond that, take Advanced or Expert. Only Expert comes with a backup: on the other plans, keep your code in a private Git repository, without the
.env file, and export your data regularly.
- A VPS, if you do not want to administer anything: system updates, the firewall and backups are your responsibility. For a single bot in Node.js or Python, Node.js & Python hosting does the same job without that upkeep. The guide on web hosting or a VPS helps you see where the line is.
- Software that only exists for Windows: the Intel and Ryzen VPS run Linux, which suits discord.js, discord.py and the other common libraries. If your bot depends on a Windows program, look at the Windows VPS, a virtual machine running Windows Server, licence included. The guide on Linux or Windows VPS compares the two.
- A kernel module or your own kernel: the Intel and Ryzen VPS are Linux containers, whose kernel is shared with the host machine. A bot almost never needs one; if yours does, a dedicated server gives you the whole machine (see KVM VPS or container).
Not sure what your bot needs? Ask support before you order, by ticket, on Discord or by phone, in French, 7 days a week.