24/7 Telegram bot hosting
Telegram bot hosting: Python (aiogram), Node.js (telegraf), Java (Spring Boot), Go. Runs 24/7, webhook or polling, SSL certificates, billing in rubles.
Auto-deploy from Git
The platform pulls the code from your repository, builds the project and runs it.
Ready-made environment
No Nginx or Linux setup required. Reliable RelaxNet servers under the hood.
Custom domains and SSL
Connect your domain in one click, and the platform issues a Let's Encrypt SSL certificate automatically.
A Telegram bot needs a process that runs all the time — keeping a separate VPS for that is expensive and requires Linux know-how. RelaxNet runs your bot in an isolated Docker container: it's deployed from your repository, survives restarts and starts again automatically on failure. Bots on Python, Node.js, Java and Go are supported out of the box.
Your project automatically gets a dedicated network (tg-net) with native IPv6 support for a stable connection to the Telegram API. Use either mode: long polling (works right away) or a webhook (the platform issues an HTTPS certificate for the Telegram API automatically).
How to deploy Telegram bots
1. Get a token from BotFather
Create a bot with the /newbot command in BotFather and save the token. Never put it in your code — it'll end up in the git history and you'll have to revoke it.
2. Connect your repository
Pick the repository with your bot. The platform finds requirements.txt (Python), package.json (Node.js) or pom.xml/build.gradle (Java) and builds the project.
3. Add BOT_TOKEN and WEB_PORT to environment variables
Set BOT_TOKEN in the dashboard. If your bot uses a webhook, listen on the port from the WEB_PORT variable — the platform then exposes it at the project's HTTPS address. Without WEB_PORT, the bot runs on long polling and isn't reachable from outside.
# Webhook: the app must listen on WEB_PORT
import os
PORT = int(os.environ.get('WEB_PORT', os.environ.get('PORT', 8080)))
# Node.js (telegraf webhook)
bot.launch({
webhook: {
domain: 'https://your-domain.com',
port: Number(process.env['WEB_PORT'] || 8080)
}
});4. Deploy and monitor
The bot starts automatically. For a webhook, use the HTTPS address provided by the platform. If the process crashes, built-in monitoring restarts it immediately.
Platform comparison
| Platform | Status | Payment |
|---|---|---|
| Plain VPS | Works | Manual setup and maintenance |
| RelaxNet | Auto-deploy from Git | RUB, $6 free balance |
A separate VPS for a bot means setting up systemd, autostart and certificates. RelaxNet replaces all of that with a simple deploy from your repository.
Common errors and fixes
The bot replies twice to every message
Two instances are running — the old process on a VPS and the new one on the platform, both in polling mode. Telegram sends updates to both. Stop the extra instance.
Conflict: terminated by other getUpdates request
The same token is used by two processes at once. Make sure the old deployment is stopped. If you're switching to a webhook, delete the webhook via the Telegram API or turn off polling.
ConnectTimeout (host='api.telegram.org')
This is usually a network access problem with the Telegram API. The platform handles it automatically by routing bots through the tg-net network with correct IPv6 resolution.
The webhook doesn't work / no response
Telegram requires HTTPS. Use the project address provided by the platform and make sure the app listens on 0.0.0.0 and the port from the WEB_PORT variable. If webhooks arrive unreliably, enable the webhook receiver under Variables → Webhook / Proxy: for Telegram it's a single button.
FAQ
What are WEB_PORT and TG_OPTION?
WEB_PORT is the port your bot listens on if it needs HTTP: a Telegram webhook or a mini app. With it, the platform exposes the bot at the project's HTTPS address; without it, the bot runs on long polling and isn't reachable from outside. Bots don't need TG_OPTION=1: projects of the Telegram Bot type always have the network with Telegram access attached. That variable is for web projects that call the Telegram API themselves.
How do I store the user database?
The file system is ephemeral (it's reset on deploy), so a local SQLite file won't work. PostgreSQL or Redis databases can be created in one click in the dashboard — use them to store state.
Will the bot run around the clock?
Yes, the container runs 24/7. If the bot process crashes because of a bug in the code, Docker restarts it automatically.
Can I host Discord bots (JDA, discord4j)?
Yes, Java Discord bots (using JDA, discord4j or javacord) as well as Python/Node.js bots build just as easily and run in long polling mode on the platform's network.