Free hosting for a Telegram bot
Free hosting for a bot is usually a compromise. On overseas platforms like Heroku or Railway a project sleeps when idle, and there is no one to wake the bot back up: Telegram does not reach out to the bot, the bot itself polls Telegram, so a sleeping bot simply goes quiet. That leaves renting a VPS, installing Python or Node.js on it, setting up the process to start automatically, and paying every month even for a single small bot.
With Netrun it is simpler. Websites on the Free plan really do sleep when idle and wake on request, but there is nothing to wake a bot over the network — so Netrun keeps it running all the time. The result is honest free hosting: you upload your code and enter the token, and we take care of the build, the launch, and keeping it running without a server of your own. A single bot can stay online around the clock and cost nothing.
Get a token from BotFather
Open @BotFather in Telegram, send the /newbot command, and follow the prompts. In reply you will get a token — a long string like 123456:ABC. It is the access key to your bot, issued by Telegram itself. You will need it during setup, so keep it handy and never show it to anyone.
Prepare the bot code
A bot written in Python (the aiogram or python-telegram-bot libraries) or in Node.js (telegraf or grammY) will work. One important point: read the token not from a line in the code, but from an environment variable — a value that is set separately and does not live inside the files. In Python that is os.environ["BOT_TOKEN"], in Node.js it is process.env.BOT_TOKEN. That way the token does not leak along with the code.
Upload the project to Netrun
Upload the code as a ZIP archive or import it from a GitHub repository — a private one works too. You do not need to include the dependencies folder (venv in Python or node_modules in Node.js); Netrun detects the language and builds the project on its own. There is no need to specify a port: a bot is not a website and does not listen for incoming requests.
Enter the token during setup
Netrun asks which secrets the project needs. Add a variable with the same name you used in the code — for example, BOT_TOKEN — and paste the value of the token from BotFather. It is stored separately from the code, and the bot reads it at startup.
Launch and check
Hit launch and watch the logs and build status right in your dashboard in real time. Once the project reaches a running state, message the bot in Telegram — it should reply. If the bot crashes later, Netrun restarts it automatically, so you will not have to wake it by hand.
When you have more bots
The Free plan is one project — that is, one bot online at all times. If you want to keep a second bot or other projects, buy an extra slot or move to a paid plan. Payment comes from your balance in rubles, and current prices are shown in your dashboard.
The result is real free hosting for a Telegram bot: the project lives on the internet without a server of your own and runs around the clock. Websites on the Free plan sleep when idle, but a bot does not: there is nothing to wake it over the network, so Netrun simply keeps it running. You only start paying when you want to add a second project or move to a paid plan for downtime-free web apps. Try Netrun.