---
title: "Free Ruby Telegram Bot Hosting"
description: "Host a telegram-bot-ruby bot free on Ruby 3.2 to 4.0. Long polling needs no domain. 25% CPU, 256 MB RAM, 512 MB disk and 24/7 uptime, and no card."
url: "https://sillydev.co.uk/ruby-telegram-bot-hosting"
updated: "2026-11-10"
---

Ruby

# Free Ruby Telegram bot hosting.

telegram-bot-ruby, or Net::HTTP and nothing else. Long polling means there is no webhook, domain or certificate to set up.

Libraries

## Libraries that run here

telegram-bot-ruby

The usual Ruby client for the Bot API. Telegram::Bot::Client.run starts a long-polling loop and yields each update to a block, which is the whole shape of a small bot.

Plain Net::HTTP

The Bot API is HTTPS and JSON, and Ruby's standard library can call it. For a bot with three commands, a getUpdates loop in the standard library is less to maintain than a gem.

SQLite

The sqlite3 gem keeps chat state on your 512 MB of disk, which is where it belongs for anything that has to survive a restart.

Deploying

## Getting it running

1. 1
### Upload your project
Drag the folder into the file manager or push it over SFTP. Gems install into a folder inside your server, so there is no need to upload a vendor directory. The BotFather token is the only secret a Telegram bot needs.
2. 2
### bundle install runs for you
When a Gemfile is present, Bundler installs it before the bot starts and skips the install on later restarts until the Gemfile changes. A Telegram bot's dependency list is short, so the install is over quickly.
3. 3
### Point us at your entry file
bot.rb or main.rb. The token goes into an environment variable and is read with ENV.fetch.

Memory

## What actually fits in 256 MB

More than a bot needs. telegram-bot-ruby caches nothing for you, long polling holds a single request open, and a busy bot sits in a modest amount of memory.

When one does grow, it is state the bot keeps for itself: a hash of every chat it has met, or a whole file read into memory before it is forwarded. Keep chat state in SQLite, and write media to disk and send it from there instead of holding it as a string.

FAQ

## Questions

**Do I need a webhook?**

No. Long polling makes the bot ask Telegram for updates, so nothing has to reach it from outside. That is why it needs no domain or certificate.

**Where should chat state live?**

In a SQLite file in your project directory. It survives restarts, crashes and redeploys, and costs one gem.

**Do gems with native extensions work?**

Yes for the common ones. The image has a compiler and the headers for SQLite, PostgreSQL, MariaDB, libxml and OpenSSL, so gems such as nokogiri, pg, mysql2 and sqlite3 build when bundle install runs. The first start after you change your Gemfile takes longer while they compile; later starts skip the install.

**Where should the secrets live?**

In environment variables set on the server, read with ENV.fetch. A .env file uploaded with your code sits in your file manager like any other file, and Ruby does not read one by itself unless you add a gem such as dotenv for it.

More on Telegram bots

- [Node.js→](https://sillydev.co.uk/nodejs-telegram-bot-hosting)
- [Python→](https://sillydev.co.uk/python-telegram-bot-hosting)
- [Bun→](https://sillydev.co.uk/bun-telegram-bot-hosting)
- [Telegram bots→](https://sillydev.co.uk/telegram-bot-hosting)

Hosting something else?

- [Discord bots→](https://sillydev.co.uk/discord-bot-hosting)
- [Minecraft bots→](https://sillydev.co.uk/minecraft-bot-hosting)
- [Twitch bots→](https://sillydev.co.uk/twitch-bot-hosting)
- [Reddit bots→](https://sillydev.co.uk/reddit-bot-hosting)
- [Bluesky bots→](https://sillydev.co.uk/bluesky-bot-hosting)
- [Twitter (X) bots→](https://sillydev.co.uk/twitter-bot-hosting)
- [WhatsApp bots→](https://sillydev.co.uk/whatsapp-bot-hosting)

Control it from code

- [Bot hosting with an API→](https://sillydev.co.uk/guides/bot-hosting-with-an-api)
- [API docs→](https://sillydev.co.uk/docs/panel)
