X
X
Select Your Currency
₺ Turkish lira $ US Dollar
Skip to content
New Affiliate program: refer customers, earn 20%

ViHyper

Discord Bot VDS: Host Your Bot 24/7 on a Virtual Server

  • Secure checkout
  • Company invoice
  • Technical support
3 min read ViHyper Team
Table of contents
  1. How Many Resources Does a Discord Bot Need?
  2. Do I Need to Open a Port?
  3. Step-by-Step Setup (Ubuntu, Node.js)
  4. Security and Maintenance Tips
  5. Windows or Linux?
  6. Running a Discord Bot on a ViHyper VDS
  7. Frequently Asked Questions
  8. Why a VDS instead of free bot hosting?
  9. How many bots can run on one VDS?
  10. Why does my bot keep shutting down?

A VDS for a Discord bot is a virtual server that keeps your bot online 24/7, even when your computer is off. Free hosting services often come with sleep modes, resource limits or outages; on your own VDS you get dedicated CPU and RAM for your bot and full administrative control.

In this guide we explain how many resources a Discord bot needs, how to run a Node.js or Python bot on a Linux VDS and what to do to keep it running without interruption.

How Many Resources Does a Discord Bot Need?

Bot typeTypical needs
Moderation, welcome or command bot (a few servers)1–2 cores, 1–2 GB RAM
Bot using a database across many servers2 cores, 2–4 GB RAM
Music bot, image processing, AI integration3–4 cores, 4 GB RAM or more

Most bots are lightweight; what really determines resource needs is what the bot does and how many servers it is in. You can also run several bots or a web dashboard on the same VDS.

Affiliate ProgramFound this useful? Share it and earn.Get 20% commission on orders from customers you refer. Joining is free.Details

Do I Need to Open a Port?

No. Discord bots make an outgoing connection (WebSocket) to Discord's servers; nothing connects to the bot from outside. So you don't need to open a port in the firewall for the bot. You only need to open a port if you publish a web dashboard or webhook for the bot.

Step-by-Step Setup (Ubuntu, Node.js)

  1. Connect to the server: ssh root@server-ip
  2. Create a separate user: don't run the bot as root.
    adduser botuser
    su - botuser
  3. Install the current LTS version of Node.js (use the official Node.js install instructions or nvm).
  4. Upload your bot files: pull them with Git or upload them over SFTP, then run npm install.
  5. Don't hard-code the token: put the bot token in a .env file instead of the code, and don't add that file to your Git repository.
  6. Run the bot with a process manager:
    npm install -g pm2
    pm2 start index.js --name mybot
    pm2 save
    pm2 startup
    PM2 restarts the bot if it crashes; with pm2 startup the bot also starts automatically when the server reboots.

The logic is the same for Python bots: create a virtual environment (python3 -m venv), install the dependencies and run the bot as a systemd service.

Security and Maintenance Tips

  • If your token leaks, regenerate it immediately in the Discord Developer Portal.
  • Request only the permissions the bot needs (intents and role permissions).
  • Use key-based SSH login instead of a password and close unnecessary ports.
  • Check the logs (pm2 logs) regularly and keep dependencies up to date.
  • If you use a database, back it up regularly.

Windows or Linux?

Linux uses fewer resources and is the usual choice for bots. A Windows VDS makes management easy through a graphical interface over Remote Desktop; for connecting, see our article What is RDP.

Running a Discord Bot on a ViHyper VDS

ViHyper VDS plans are located in Turkey; you choose the operating system when ordering and can upgrade to a bigger plan as your resource needs grow. For the basics of VDS, read our article What is a VDS.

Frequently Asked Questions

Why a VDS instead of free bot hosting?

Sleep modes, resource limits and outages are common on free services. On a VDS the resources are reserved for you and you can configure the bot however you like.

How many bots can run on one VDS?

For lightweight bots, a single small VDS can comfortably run several. Decide by monitoring total RAM and CPU usage.

Why does my bot keep shutting down?

The most common causes are uncaught errors, insufficient RAM and an invalid token. Run the bot with PM2 or systemd and check the logs to find the cause.

Pick the right infrastructureCompare Turkey-based virtual servers with SSD. Plans from $2.56.
VDS / VPS plans

Top