1. Create a bot and get a token
- Open Telegram and message @BotFather.
- Send
/newbotand follow the prompts. - Save the token BotFather gives you. You will need it below.
2. Install your language
- Python
- Node.js
3. Get your bot code onto the VPS
Clone from Git or upload via the File Manager:4. A minimal example bot
- Python
- Node.js
bot.py:/start. If it responds, you are ready to run it as a service.
5. Keep it running with systemd
Create/etc/systemd/system/mybot.service:
ExecStart=/usr/bin/node /root/mybot/index.js.
Enable and start:
