Back to Blog
Hosting 7 min readJune 1, 2026

Where to Host Your Telegram Bot for Free (or Close to It)

Railway, Render, Fly.io, and a $5 VPS - a practical comparison of free and cheap hosting options for a self-hosted grammY bot.


Your bot runs as a long-lived Node.js process. That means it needs somewhere to live that is not your laptop. Here is a practical look at your options, from completely free to $5/month.

Option 1 - Railway (recommended for beginners)

Railway has a free hobby plan that gives you $5 of compute credits per month. A grammY bot with no heavy workload uses around $0.50-$1.00/month, so the free credits usually cover it.

Setup:

  • Push your bot code to GitHub
  • Go to railway.app → New Project → Deploy from GitHub
  • Set your `.env` variables in the Railway dashboard
  • Railway detects Node.js automatically and runs `npm start`

Railway gives you persistent storage (required for sql.js to save your database between restarts), automatic redeploys on push, and a clean dashboard for logs.

Option 2 - Render

Render's free tier spins down after 15 minutes of inactivity, which breaks long-polling bots. You need the paid tier ($7/month) for always-on processes.

For a grammY bot using long polling, Render free does not work. For webhooks it can, but the setup is more complex. Skip Render free for bots.

Option 3 - Fly.io

Fly.io has a generous free allowance: 3 shared-CPU VMs with 256MB RAM each. That is more than enough for a grammY bot.

Setup:

  • Install the Fly CLI: `curl -L https://fly.io/install.sh | sh`
  • Run `fly launch` in your bot folder
  • Set secrets: `fly secrets set BOT_TOKEN=your_token`
  • Deploy: `fly deploy`

Fly.io requires a credit card on file even for free usage, but will not charge unless you exceed the free allowance.

Option 4 - A $5 VPS

A basic VPS from DigitalOcean, Hetzner, or Vultr gives you full control. Hetzner's cheapest server (CAX11) is €3.29/month and runs dozens of bots simultaneously.

Run your bot with pm2 for automatic restarts:

npm install -g pm2
pm2 start "npx ts-node index.ts" --name my-bot
pm2 startup
pm2 save

This is the most reliable option for production groups. No cold starts, no credit limits, full SSH access.

Option 5 - Your own PC (free, limited)

Running the bot on your own computer works fine for testing. The included `Step 2 - Start Your Bot.bat` does exactly this. The limitation: your bot goes offline when your computer sleeps or loses internet.

For a small group where occasional downtime is acceptable, this is zero-cost.

Summary

OptionCostReliabilitySetup difficulty
Railway hobbyFree ($5 credit/mo)GoodEasy
Fly.ioFree tierGoodMedium
$5 VPS~$4-5/monthExcellentMedium
Render freeFreePoor (spins down)Easy
Own PCFreeLowTrivial

The included `Advanced - Hosting Guide.md` in your BotForge download covers Railway and the VPS option step by step.


Get your bot code at tgbotforge.com - the hosting guide is included in every download.

Ready to build your bot?

Fill the wizard, download the code, run it - no coding required.

Build My Bot