Getting started

Choosing a VPS for bots and automation scripts

Size a server for Discord or Telegram bots, scrapers and scheduled scripts, and see why a VPS that runs 24/7 is a good home for automation.

Beginner4 min read

Bots and scheduled scripts need to run all the time, or at exact times, without your laptop staying on. A VPS is a good home for them: it runs around the clock, has a stable IP address and lets you install whatever language and libraries your code needs. This guide helps you size a server for bots, scrapers and automation, and keep them running reliably.

Before you start

List what you will run:

  • Chat bots for Discord, Telegram, Slack or similar, and how many servers or chats they serve.
  • Scheduled jobs: reports, data syncs, backups, price checks.
  • Scrapers or browser automation, and whether they use a headless browser such as Chromium.
  • The language and runtime: Python, Node.js, PHP,.NET or others.

Why a VPS suits automation

  • Always on: no sleep mode, no home internet outages, no restart because a family member closed the lid.
  • Stable IP and network: webhooks and APIs can reach your bot reliably.
  • Full control: install any runtime version and system packages.
  • Supervision: tools such as systemd, PM2, Docker or Windows Task Scheduler restart your code if it crashes or the server reboots.

Linux or Windows

Most bots and scripts run best on a Linux VPS. Python and Node.js are first-class there, memory use is low and supervision with systemd is simple.

Choose Windows when your automation drives Windows desktop software, uses tools that only exist on Windows, or you prefer to work through a desktop. A Windows Admin RDP suits desktop automation; a Windows VPS suits services.

How to size it

RAM

  • Lightweight bots in Python or Node.js often use well under a few hundred megabytes each when idle.
  • Large bots in thousands of Discord servers keep big caches in memory and need much more.
  • Headless browsers are the heavyweights: each Chromium instance can use hundreds of megabytes or more.
  • Databases for bot data add their own needs.

A small Linux plan often runs several light bots and cron jobs together. Plan more RAM for headless browsers, music bots or large caches, and more again on Windows.

CPU

Most bots wait for messages and use almost no CPU. Spikes come from image processing, audio encoding for music bots, parsing large pages or many jobs starting at the same minute. One or two vCPUs suit most setups; add more for heavy parallel scraping or media processing.

Storage

Code is small. Logs, downloaded files, databases and browser caches grow. Rotate logs and clean temporary files on a schedule.

Keep things running

  • Run each bot as a service that restarts on failure and starts at boot.
  • Log to files or the system journal so you can see why something stopped.
  • Keep tokens and API keys in environment files with tight permissions, never in public code.
  • Stagger scheduled jobs so they do not all start at once.
  • Respect the terms of the platforms and websites you automate, and rate limits. See the MdmHost terms of service for what the service allows.

Check it works

On Linux, check memory and the busiest processes:

Bash
free -h
ps aux --sort=-%mem | head -n 10

If your bot runs as a systemd service named mybot, check its status and recent logs:

Bash
systemctl status mybot
journalctl -u mybot -n 50

On Windows, check Task Manager and the Task Scheduler history for each task.

Troubleshooting

  • Bot goes offline after a reboot: it was started by hand. Set it up as a service or scheduled task that starts at boot. See auto-restart bots after a crash.
  • Bot stops when you close SSH: the process was tied to your session. Use a service, or see keep a process running after SSH disconnects.
  • Memory climbs until the bot is killed: the code may be leaking memory or caching too much. Restart on a schedule while you fix it.
  • Cron job never runs: the script may rely on a PATH or working folder that cron does not set. Use full paths. See schedule cron jobs on Linux.

Next steps

  • Build one: run a Discord bot with Python on a VPS.
Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.