This guide will walk you through setting up your Telegram bot on Koyeb.
- Python installed on your local machine.
- Telegram Bot Token: You can create a bot and get the token from BotFather on Telegram.
- GitHub Account: You will need a GitHub account to push your code.
- Go to your GitHub account and create a new repository for your bot code.
- Clone the repository to your local machine.
- Add your bot code (the Python script) to your repository.
- Create a
.envfile in the root directory of your repository and add your bot token:TELEGRAM_BOT_TOKEN=your_bot_token_here
- Commit and push the changes to your GitHub repository.
- Log in to your Koyeb account or create a new account if you don't have one.
- Click on the
Create Appbutton. - Select
GitHubas your deployment source and connect your GitHub account. - Choose the repository where you pushed your bot code.
- Configure the build settings:
- Runtime: Select
Python - Build Command:
pip install -r requirements.txt - Start Command:
python your_bot_script.py
- Runtime: Select
- Add environment variables:
- Key:
TELEGRAM_BOT_TOKEN - Value:
your_bot_token_here
- Key:
- Click on
Create Appto deploy your bot.
- After deployment, you can monitor your bot's logs and performance from the Koyeb dashboard.
- Make sure to update your code and redeploy if you make any changes.
This project is licensed under the MIT License. See the LICENSE file for details.