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.
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.
An aiogram bot using dp.start_polling runs as a background worker: a permanent process, no public address needed or issued.
If you use setup_application with aiohttp, the app gets an address with a valid certificate - hand that one to set_webhook.
Having aiogram in your dependencies is enough. No Dockerfile to write, no command line to learn.
MemoryStorage loses conversations on every deploy. Attach managed PostgreSQL or Redis and users continue from the same step.
An unhandled exception in a handler or a dropped connection to Telegram - the process restarts automatically.
Your bot users' data is stored on servers inside Russia - what the personal-data law requires.
Six steps from a local script to a bot that runs around the clock.
aiogram must be in requirements.txt - that file is how the platform knows the project is Python and installs dependencies at build time.
Replace the hardcoded token with os.environ["BOT_TOKEN"]. A local .env is handy for development but must not reach the repo.
For long polling turn on background-worker mode. For a webhook create a regular app - it gets an HTTPS address.
Connect GitHub and every push to the main branch builds and ships a new version. Without git, a zip archive works.
BOT_TOKEN, admin ids and third-party API keys are set in the console and injected at start.
Create PostgreSQL next door and move state storage off MemoryStorage - then a deploy stops dropping users mid-scenario.
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. |
Three places an aiogram deploy usually trips.
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.
FSM state in process memory is wiped on every build and users get stuck mid-scenario. A production bot needs persistent storage.
Photos and documents downloaded to the local disk disappear on the next deploy. Keep them in object storage and the links in a database.
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.
Connect a repo where aiogram is in requirements.txt, turn on background-worker mode, set BOT_TOKEN in the environment - the platform builds and runs the bot. It usually takes a couple of minutes.
In the app's environment variables, set in the console. Never commit it: Telegram revokes leaked tokens.
Most likely MemoryStorage: FSM state lives in process memory and is wiped on restart. Attach PostgreSQL or Redis as storage and the scenario continues from the same step.
No, not if the bot builds from requirements.txt. A Dockerfile helps when you need an unusual system dependency - ffmpeg for voice messages, for example.
Yes, that is two apps with two different tokens. The free plan fits one; the second needs Startup. The same token cannot run in two processes: Telegram would hand updates to one or the other at random.
Process logs are in the panel. Common causes: it died on startup from a bad token, a getUpdates conflict with a copy still running locally, or an unhandled exception in a handler.
Your first bot runs on the Free tier with no card. After that it is Startup at 990 ₽/mo or Business at 2,900 ₽/mo, paid by ruble card.
Create an account and deploy your first app. The Free plan costs $0.