All articles
TutorialsJan 27, 2026 · 6 min read

How to Run Moltbot on a VPS

How to Run Moltbot on a VPS

If you've been running Moltbot on your laptop, you know the problem: close the lid, bot goes offline. Your Discord members wake up to a dead bot because Windows Update decided 3am was the perfect time to restart.

A VPS fixes this. Your bot runs on a server that stays on, in a datacenter with actual redundant power and network connections. No more "sorry guys, my PC crashed" messages in your server.

This guide covers the full setup: picking a VPS, running the installer, and verifying everything works.

Why bother with a VPS?

Running locally works fine for testing, but production Discord bots need something more stable:

  • Your bot stays online when your computer is off (obvious, but worth stating)
  • Datacenter connections have lower latency to Discord's servers
  • You can upgrade RAM or CPU without buying new hardware
  • Built-in DDoS protection keeps your bot safe from attacks

The real benefit? Peace of mind. Set it up once, and stop worrying about uptime.

Choosing a VPS

Moltbot doesn't need much. Here's what works:

Resource Minimum Recommended
CPU 1 vCore 2 vCores
RAM 1 GB 2 GB
Storage 10 GB SSD 20 GB SSD
Bandwidth 500 GB/month 1 TB/month

If you want something pre-configured, our Moltbot VPS plans come with clean IPs and are already set up for Discord bot hosting.

What you'll need

  1. A VPS running Ubuntu 22.04 or newer (our Linux VPS works well)
  2. SSH access to your server
  3. Your Discord bot token
  4. Basic comfort with the command line

Step 1: Connect to your VPS

Open your terminal and SSH in:

ssh root@your-server-ip

Replace your-server-ip with the IP from your VPS welcome email. On Windows? Check our guide on connecting from any device.

Step 2: Install Moltbot

The installer handles everything—Node.js, dependencies, and configuration:

curl -fsSL https://molt.bot/install.sh | bash

Follow the prompts to enter your Discord bot token and configure your preferences. Moltbot runs automatically in the background and starts on boot.

Step 3: Verify it's running

Head over to Discord and confirm your bot appears online in your server. That's it.

Updating Moltbot

Run the installer again to update:

curl -fsSL https://molt.bot/install.sh | bash

It detects existing installations and updates them in place.

Troubleshooting

Bot goes offline randomly

Usually a RAM issue. Check if your system is running low:

free -h

If RAM is consistently above 80%, you need a bigger VPS.

Connection timeouts

Discord has occasional blips. Moltbot reconnects automatically, but you can check your server's network:

ping -c 5 discord.com

Packet loss? See our guide on fixing slow connections.

Permission errors

Make sure the moltbot user owns everything:

sudo chown -R moltbot:moltbot /home/moltbot/moltbot

Security basics

A few things worth doing:

Update your system regularly with apt update && apt upgrade.

Set up a firewall. UFW makes this easy:

sudo ufw allow ssh sudo ufw enable

Switch to SSH key authentication instead of passwords. It's more secure and honestly more convenient.

Keep a backup of your .env file somewhere safe—not on the server, in case you need to rebuild.

What now?

Your bot should be running. A few ideas from here:

Your VPS can run multiple bots—just repeat the process for each one. Set up UptimeRobot or a similar service to alert you if something goes down. Poke around Moltbot's settings to configure moderation and DM pairing.

Stuck on something? Hit up our support team. And if you want a VPS that's already configured for Discord bots, check out our Moltbot VPS plans.