Telegram bot not starting after deploy: find the real cause
Read the logs and distinguish an invalid BOT_TOKEN, webhook conflict, out-of-memory kill, and build failure before you redeploy.
A running container does not always mean the bot receives messages. Open the project in your Deployka dashboard and check its latest error and logs first. Never paste a full BOT_TOKEN or other ENV secrets into a ticket or public chat.
1. Build failure or startup crash?
Build failed means the image could not be built: check requirements.txt or package.json, package names, and your Python/Node version. If the worker cannot resolve a package registry, it may be an infrastructure network failure. Retry later and contact support if it persists; buying Nano will not fix a registry outage.
Container restarted after start means the app crashed after building. Find the first traceback line in the logs; it often points to a missing ENV value, import, or file path.
2. Telegram says Unauthorized or InvalidToken
Check BOT_TOKEN in project ENV. Paste a valid token from @BotFather without extra spaces or quotes, save ENV, and redeploy. Do not publish it in screenshots. If the token leaked, rotate it with @BotFather.
3. Webhook is active or another getUpdates client
The same bot should not be polled by multiple running copies. Stop your local process and other instances you own that use the token. If you previously configured a webhook for this bot, inspect it and remove it only after confirming it is no longer needed. Then restart the project. Do not change a working or someone else's webhook blindly.
4. Container was OOM-killed
The process exceeded its container memory limit. Check whether startup loads a large model or file all at once, and whether it is stuck in a restart loop. Reduce memory use, or choose a plan with enough RAM if the workload truly needs it. A small limit increase does not guarantee a heavy app will run.
5. After the fix
- Save the code or ENV change.
- Redeploy and inspect the new logs, not just the previous error.
- Send the bot a test message and confirm it responds.
If the project is already paid for, a startup failure does not require another payment. Open the project in your dashboard and finish activation after fixing the cause.
No project yet? Create one on Deployka. Run Deploy Doctor to check your code, or contact support for infrastructure failures or unclear logs.