Before you start creating a new bot, you need to decide whether to use the self-hosted version or the Cloud version available at chatbotcloud.org. This documentation provides instructions for both versions.
To run a self hosted version you can download a binary or run Docker image.
You can download the binary release from github.com/g4s8/openbots/releases:
# example for Linux x86_64
wget https://github.com/g4s8/openbots/releases/download/<version>/openbots_<version>_Linux_x86_64.tar.gz
tar -xvzf openbots_0.0.4_Linux_x86_64.tar.gz
rm openbots_0.0.4_Linux_x86_64.tar.gz
Thenn you need to specify Telegram bot token (you can get it from @BotFather), see Telegram docs, and spec path:
BOT_TOKEN="110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw" ./openbots -config bot.yml
docker run --rm --name openbots \
--env BOT_TOKEN="110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw" \
-v $PWD/bot.yml:/w/config.yml \
g4s8/openbots:latest
Don’t forget to provide your actual bot token via --env BOT_TOKEN
argument instead of placeholder,
and actual bot spec file path.
For the cloud version follow this steps:
Now your bot should be deployed to one of the cloud servers and running to serve your Telegram bot requests. Just open your new created bot from “BotFather” and click “Start” button in Telegram app.