A simple telegram bot for managing machines using IPMI
992
This is a basic python based telegram bot which is designed to allow you to remotely manage a device using IPMI.
IPMI-Bot GitHub: https://github.com/realdeadbeef/ipmi-bot
Obtaining your telegram bot token and chat ID:
/newbot and follow the prompts./start to @RawDataBot and look for:"chat": {
"id": xxxxxxxxxx,
This is your chat ID.
Running the bot:
docker run -d --network=bridge --name=ipmibot -e IPMI_IP=0.0.0.0 -e IPMI_USER=username -e IPMI_PASSWORD=password -e TOKEN=token -e CHAT_ID=chatid realdeadbeef/ipmi-bot:latest
Make sure to change the environment variables and then run the command.
But Wait! What does this command do?
-d: This tells docker to run the container in the background.--network=bridge: Ensures that the script can talk to devices on your home network, in this case the IPMI server.--name=ipmibot: Gives the container a name, in this case: ipmibot.-e IPMI_IP=0.0.0.0: Sets the IP of the IPMI server.-e IPMI_USER=username: Sets the username of the user for interfacing with IPMI.-e IPMI_PASSWORD=password: Sets the password for the user used to interface with IPMI.-e TOKEN=token: Sets the token of your telegram bot.-e CHAT_ID=chatid: Sets the chat ID that the bot should respond to messages from, so only you can manage the server.-d flag and replace it with -it to see the bot's output in an interactive console.Managing the docker container:
docker ps - This command shows all running containers and their names, as well as other information (add -a to see stopped containers as well).
docker start [container name] - Used to start a docker container.
docker restart [container name] - Used to restart a docker container
docker stop [container name] - Used to stop a docker container.
docker kill [container name] - Used to kill a running/crashed container.
Content type
Image
Digest
Size
62.2 MB
Last updated
over 4 years ago
docker pull realdeadbeef/ipmi-bot