Best VPS for Discord Bot Hosting 2026: Keep Your Bot Online 24/7
Need to host your Discord bot on a VPS? We tested the top providers to find the best options for reliable, affordable bot hosting.
Best VPS for Discord Bot Hosting 2026
Running a Discord bot on your own machine means it goes offline when you close your laptop. A VPS keeps your bot running 24/7 for as little as $2/month.
Whether you’re hosting a music bot, moderation bot, or a custom AI-powered bot, here’s what actually matters and which providers deliver.
Quick Picks
Quick Picks
| Category | Provider | Price | Best For |
|---|---|---|---|
| 🏆 Best Overall | Hostinger | $4.99/mo | Most bot developers |
| 💰 Cheapest | Contabo | €4.99/mo | Multiple bots on one server |
| 🌍 Best EU | Hetzner | €3.79/mo | European communities |
| 🚀 Best for Scaling | DigitalOcean | $6/mo | Growing bots with API needs |
Discord Bot Server Requirements
Discord bots are lightweight. Most run fine on minimal specs:
| Bot Type | RAM | CPU | Storage |
|---|---|---|---|
| Simple command bot | 512MB | 1 vCPU | 5GB SSD |
| Moderation bot | 1GB | 1 vCPU | 10GB SSD |
| Music bot (Lavalink) | 2GB | 1-2 vCPU | 15GB SSD |
| AI bot (LLM calls) | 1-2GB | 1-2 vCPU | 10GB SSD |
| Multi-purpose / large servers | 4GB+ | 2+ vCPU | 20GB+ SSD |
Key insight: Most bots need very little power. Don’t overspend — a $5/month VPS handles the vast majority of Discord bots.
Top VPS Providers for Discord Bots
1. Hostinger — Best Overall
$4.99/mo | 4GB RAM, 1 vCPU, 50GB NVMe
Hostinger is our top pick for Discord bot hosting:
- 4GB RAM is overkill for most bots — room to grow
- NVMe storage means fast database reads
- 24/7 live chat support when you get stuck
- Simple control panel for beginners
- 99.9% uptime guarantee
Best for: First-time bot hosters who want reliability without complexity.
2. Contabo — Best Value for Multiple Bots
€4.99/mo | 8GB RAM, 4 vCPU, 50GB SSD
Contabo gives you absurd specs for the price:
- 8GB RAM at €4.99 — host 10+ bots easily
- 4 vCPU handles concurrent workloads
- Unlimited bandwidth
- Great for running bot + database + dashboard
Trade-off: Support is slow. Setup is a bit more manual.
Best for: Experienced developers running multiple bots or resource-heavy bots.
3. Hetzner — Best for Europe
€3.79/mo | 4GB RAM, 2 vCPU, 40GB NVMe
Hetzner is the EU powerhouse:
- German data centers with excellent uptime
- Low latency for European Discord servers
- Unmetered traffic — no bandwidth surprises
- Great API for automated deployments
Best for: Bot developers targeting European communities.
4. DigitalOcean — Best for Scaling
$6/mo | 1GB RAM, 1 vCPU, 25GB SSD
DigitalOcean shines when your bot grows:
- Best-in-class documentation and tutorials
- Easy snapshots for backup before updates
- Managed databases available (PostgreSQL, Redis)
- App Platform for containerized deployments
- Strong CLI and API
Best for: Developers who plan to scale or need managed infrastructure.
How to Host a Discord Bot on VPS
Step 1: Get Your VPS
Sign up with Hostinger (or your preferred provider) and select Ubuntu 22.04 or 24.04.
Step 2: Connect via SSH
ssh root@your-server-ip
Step 3: Install Node.js (for JavaScript bots)
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
For Python bots:
apt update && apt install -y python3 python3-pip python3-venv
Step 4: Upload Your Bot
# Clone from Git (recommended)
git clone https://github.com/yourusername/your-bot.git
cd your-bot
# Install dependencies
npm install # Node.js
# or
pip install -r requirements.txt # Python
Step 5: Set Up Environment Variables
nano .env
Add your bot token:
DISCORD_TOKEN=your-bot-token-here
PREFIX=!
Step 6: Run with PM2 (Node.js) or systemd
PM2 (recommended for Node.js):
npm install -g pm2
pm2 start index.js --name my-bot
pm2 startup # Auto-start on reboot
pm2 save
systemd (works for any language):
cat > /etc/systemd/system/discord-bot.service << 'EOF'
[Unit]
Description=Discord Bot
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/root/your-bot
ExecStart=/usr/bin/node index.js
Restart=always
RestartSec=10
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target
EOF
systemctl enable discord-bot
systemctl start discord-bot
Step 7: Verify It’s Running
pm2 status # PM2
systemctl status discord-bot # systemd
Your bot should now be online in Discord!
Keep Your Bot Running: Process Management
The biggest concern with VPS hosting is keeping your bot alive. Here’s how:
PM2 (Node.js)
pm2 start index.js --name bot
pm2 startup # Survive reboots
pm2 save # Save process list
pm2 logs bot # View logs
pm2 restart bot # Restart after changes
systemd (Any Language)
Already shown above — Restart=always ensures your bot restarts after crashes.
Docker (Advanced)
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
CMD ["node", "index.js"]
docker compose up -d
Docker adds isolation and makes deployments reproducible.
Music Bot Setup (Lavalink)
Hosting a music bot? You’ll need Lavalink:
# Install Java (Lavalink requirement)
apt install openjdk-17-jre-headless -y
# Download Lavalink
mkdir lavalink && cd lavalink
wget https://github.com/lavalink-devs/Lavalink/releases/latest/download/Lavalink.jar
# Configure
cat > application.yml << 'EOF'
server:
port: 2333
lavalink:
server:
password: "youshallnotpass"
sources:
youtube: true
soundcloud: true
EOF
# Run with systemd or screen
java -jar Lavalink.jar
RAM requirement: Lavalink needs ~512MB on top of your bot. A 2GB VPS minimum.
VPS vs Free Hosting (Replit, Railway, Render)
| Feature | VPS | Free Tier Hosts |
|---|---|---|
| Uptime | 24/7 | Sleeps after inactivity |
| Price | $3-5/mo | Free (with limits) |
| Control | Full root access | Restricted |
| Performance | Consistent | Shared, variable |
| Database | Any | Limited |
| Custom domain | Yes | Sometimes |
| Scaling | Flexible | Hit limits fast |
Bottom line: Free hosts work for testing. For a real bot serving actual users, spend $5/month on a VPS. The reliability difference is massive.
Security Tips
1. Never Hardcode Your Token
Always use environment variables or .env files:
# BAD
const token = "MTI3NDU2Nzg5...";
# GOOD
const token = process.env.DISCORD_TOKEN;
2. Set Up a Firewall
ufw allow ssh
ufw enable
Your bot only makes outbound connections — no ports need to be open (unless running a dashboard).
3. Create a Non-Root User
adduser botuser
su - botuser
Run your bot as this user, not root.
4. Keep Your Server Updated
apt update && apt upgrade -y
Set up automatic security updates:
apt install unattended-upgrades -y
dpkg-reconfigure unattended-upgrades
Monitoring Your Bot
PM2 Monitoring
pm2 monit # Real-time metrics
pm2 logs bot --lines 50 # Recent logs
Simple Health Check Script
#!/bin/bash
if ! pm2 pid my-bot > /dev/null 2>&1; then
pm2 restart my-bot
echo "Bot restarted at $(date)" >> /var/log/bot-health.log
fi
Add to cron for automated recovery:
*/5 * * * * /root/health-check.sh
Auto-Deploy from GitHub
Set up automatic deployments when you push code:
# On your VPS, create a deploy script
cat > /root/deploy.sh << 'EOF'
#!/bin/bash
cd /root/your-bot
git pull origin main
npm install
pm2 restart my-bot
EOF
chmod +x /root/deploy.sh
Use GitHub Actions or a webhook to trigger it.
FAQ
How much does it cost to host a Discord bot?
As little as $3-5/month. Most bots need minimal resources. Hostinger at $4.99/mo with 4GB RAM handles almost any bot.
Can I host multiple bots on one VPS?
Yes! A single VPS can run dozens of lightweight bots. Each typically uses 50-200MB RAM. With 4GB RAM, you could run 10-15 bots easily.
Do I need a domain name?
No. Discord bots connect outbound to Discord’s API — they don’t need a domain or public IP for basic functionality. You only need a domain if you’re running a web dashboard.
My bot keeps going offline. Why?
Common causes:
- No process manager — Use PM2 or systemd with
Restart=always - Server reboots — Run
pm2 startupor enable your systemd service - Memory leaks — Monitor with
pm2 monitand restart periodically - Rate limiting — Check your bot code for API abuse
VPS or dedicated bot hosting (like bot-hosting.net)?
VPS gives you more control and better value. Dedicated bot hosts charge more for less power. If you’re comfortable with basic Linux commands, VPS is the way to go.
Conclusion
For most Discord bots, Hostinger at $4.99/mo is the sweet spot — plenty of resources, great uptime, and beginner-friendly support.
Running multiple bots or something heavy like Lavalink? Contabo at €4.99/mo gives you 8GB RAM — enough for a small fleet.
| Bot Type | Recommendation | Monthly Cost |
|---|---|---|
| Single simple bot | Hostinger KVM 1 | $4.99 |
| Music bot (Lavalink) | Hostinger KVM 1 | $4.99 |
| Multiple bots | Contabo VPS S | €4.99 |
| EU-focused bot | Hetzner CX22 | €3.79 |
| Scaling / managed DB | DigitalOcean | $6 |
Stop running your bot on your laptop. Get a VPS, set up PM2, and your bot stays online while you sleep. 🤖
Ready to get started?
Get the best VPS hosting deal today. Hostinger offers 4GB RAM VPS starting at just $4.99/mo.
Get Hostinger VPS — $4.99/mo// up to 75% off + free domain included
// related topics
// related guides
How to Host a Discord Bot on VPS: Complete Setup Guide 2026
Deploy your Discord bot to a VPS and keep it online 24/7. Step-by-step guide covering Node.js, Python, PM2, systemd, and Docker deployment.
reviewAWS EC2 Alternatives 2026: Cheaper, Simpler VPS Hosting
Best AWS EC2 alternatives for cheaper VPS hosting. Compare Hetzner, Vultr, DigitalOcean, and more — save 70%+ with simpler billing.
reviewCheapest VPS Hosting 2026 — Best Budget Servers From $2.50
We compared 10 budget VPS providers on price, specs, and support. Here are the cheapest worth using — from $2.50/mo with real performance data.
reviewBest GPU VPS in 2026 — Cheapest NVIDIA Servers Compared
Rent GPU servers from $0.50/hr. We compare 8 GPU VPS providers for AI training, inference, and rendering — NVIDIA A100, H100, and RTX options.
Andrius Putna
I am Andrius Putna. Geek. Since early 2000 in love tinkering with web technologies. Now AI. Bridging business and technology to drive meaningful impact. Combining expertise in customer experience, technology, and business strategy to deliver valuable insights. Father, open-source contributor, investor, 2xIronman, MBA graduate.
// last updated: March 12, 2026. Disclosure: This article may contain affiliate links.