Deploy an aiogram bot: connect the repo and it runs
Your aiogram 3 bot works on your laptop but dies when you close the lid? Connect the repo to Dada Cloud and the platform builds it and runs it as a permanent process. Long polling needs no domain; webhook mode gets an HTTPS address. Free tier, servers in Russia.
Why aiogram bots are deployed here
Long polling without a domain
An aiogram bot using dp.start_polling runs as a background worker: a permanent process, no public address needed or issued.
Webhook with HTTPS included
If you use setup_application with aiohttp, the app gets an address with a valid certificate - hand that one to set_webhook.
Builds from requirements.txt
Having aiogram in your dependencies is enough. No Dockerfile to write, no command line to learn.
FSM state survives restarts
MemoryStorage loses conversations on every deploy. Attach managed PostgreSQL or Redis and users continue from the same step.
Crashes restart themselves
An unhandled exception in a handler or a dropped connection to Telegram - the process restarts automatically.
Data in Russia (152-FZ)
Your bot users' data is stored on servers inside Russia - what the personal-data law requires.
How to deploy an aiogram bot
Six steps from a local script to a bot that runs around the clock.
Pin your dependencies
aiogram must be in requirements.txt - that file is how the platform knows the project is Python and installs dependencies at build time.
Take the token out of the code
Replace the hardcoded token with os.environ["BOT_TOKEN"]. A local .env is handy for development but must not reach the repo.
Create the app in worker mode
For long polling turn on background-worker mode. For a webhook create a regular app - it gets an HTTPS address.
Connect the repo
Connect GitHub and every push to the main branch builds and ships a new version. Without git, a zip archive works.
Set environment variables
BOT_TOKEN, admin ids and third-party API keys are set in the console and injected at start.
Attach a database for FSM
Create PostgreSQL next door and move state storage off MemoryStorage - then a deploy stops dropping users mid-scenario.
What aiogram bot hosting costs
Real platform tiers, and an honest comparison with renting your own VPS.
| Tier | Price | What you get |
|---|---|---|
| Free | 0 ₽/mo | One bot with a database, no card required. The limit is resources, not a trial clock. |
| Startup | 990 ₽/mo | 5 apps, 2 databases, 7-day backups - a bot, an admin panel and a broadcast worker. |
| Business | 2,900 ₽/mo | 20 apps, 10 databases, 30-day backups, priority support. |
| Your own VPS | comparable on hardware | A VPS is cheaper per unit of hardware. But systemd, database backups and restarts after a crash cost your time. |
Worth knowing up front
Three places an aiogram deploy usually trips.
Two copies with one token conflict
If a local copy keeps polling Telegram, updates go to it or to production at random. Stop the local process after deploying, or create a separate test bot.
MemoryStorage loses conversations on deploy
FSM state in process memory is wiped on every build and users get stuck mid-scenario. A production bot needs persistent storage.
Files on disk do not survive a build
Photos and documents downloaded to the local disk disappear on the next deploy. Keep them in object storage and the links in a database.
Deploying an aiogram bot - FAQ
Long polling is simpler: dp.start_polling, no public address, run it as a background worker. A webhook reacts faster and is cheaper at scale, but needs an HTTPS address and an aiohttp server in your code. Start with polling and switch when you hit the ceiling.
Get your backend live from GitHub today
Connecting a repo takes a minute. You only pay for what you actually use.
Create account