Start, stop, shut down and reset: the bot lists the guests as buttons, grouped by node, and you tap the one you want.
Up and running in 4 steps
- Install cv4pve-botgram
- Create a Telegram bot
- Create an API token
- Run
cv4pve-botgram
Manage your Proxmox VE cluster from Telegram
By sysadmins, for sysadmins.
Built by Corsinvest, official Proxmox partner.
arch=$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/;s/armv7l/arm/')wget https://github.com/Corsinvest/cv4pve-botgram/releases/latest/download/cv4pve-botgram-linux-$arch.zipunzip cv4pve-botgram-linux-$arch.zipchmod +x cv4pve-botgram./cv4pve-botgram --host=pve01 --api-token='bot@pve!bot=…' --token='<telegram-bot-token>' --chatsId=<chat-id>curl -s https://api.github.com/repos/Corsinvest/cv4pve-botgram/releases/latest | grep -o "https://[^\"]*-$(dpkg --print-architecture)\.deb" | xargs curl -LOsudo dpkg -i cv4pve-botgram-*-$(dpkg --print-architecture).debcv4pve-botgram --host=pve01 --api-token='bot@pve!bot=…' --token='<telegram-bot-token>' --chatsId=<chat-id>curl -s https://api.github.com/repos/Corsinvest/cv4pve-botgram/releases/latest | grep -o "https://[^\"]*-$(rpm --eval %_target_cpu)\.rpm" | xargs curl -LOsudo rpm -i cv4pve-botgram-*-$(rpm --eval %_target_cpu).rpmcv4pve-botgram --host=pve01 --api-token='bot@pve!bot=…' --token='<telegram-bot-token>' --chatsId=<chat-id>yay -S cv4pve-botgramcv4pve-botgram --host=pve01 --api-token='bot@pve!bot=…' --token='<telegram-bot-token>' --chatsId=<chat-id>brew install corsinvest/tap/cv4pve-botgramcv4pve-botgram --host=pve01 --api-token='bot@pve!bot=…' --token='<telegram-bot-token>' --chatsId=<chat-id>curl -s https://api.github.com/repos/Corsinvest/cv4pve-botgram/releases/latest | grep -o "https://[^\"]*-$(uname -m)\.pkg" | xargs curl -LOsudo installer -target / -pkg cv4pve-botgram-*-$(uname -m).pkgcv4pve-botgram --host=pve01 --api-token='bot@pve!bot=…' --token='<telegram-bot-token>' --chatsId=<chat-id>arch=$(uname -m | sed 's/x86_64/x64/')curl -LO https://github.com/Corsinvest/cv4pve-botgram/releases/latest/download/cv4pve-botgram-osx-$arch.zipunzip cv4pve-botgram-osx-$arch.zipchmod +x cv4pve-botgram./cv4pve-botgram --host=pve01 --api-token='bot@pve!bot=…' --token='<telegram-bot-token>' --chatsId=<chat-id>winget install Corsinvest.cv4pve.botgramcv4pve-botgram --host=pve01 --api-token='bot@pve!bot=…' --token='<telegram-bot-token>' --chatsId=<chat-id>$arch = @{ AMD64 = 'x64'; x86 = 'x86'; ARM64 = 'arm64' }[$env:PROCESSOR_ARCHITECTURE]Invoke-WebRequest https://github.com/Corsinvest/cv4pve-botgram/releases/latest/download/cv4pve-botgram.exe-win-$arch.zip -OutFile cv4pve-botgram.zipExpand-Archive cv4pve-botgram.zip -DestinationPath . -Force.\cv4pve-botgram --host=pve01 --api-token='bot@pve!bot=…' --token='<telegram-bot-token>' --chatsId=<chat-id>Then, in the chat with your bot:
You /vmstartBot Choose Vm [ qemu/100 web01 ] [ lxc/105 dns ]You (tap "qemu/100 web01")Bot VM/CT qemu/100 on node pve01 Start!A VM hangs at night, or a node needs a reboot while you are away from your desk. The Proxmox VE web interface is behind the company network: reaching it means a VPN and a laptop.
cv4pve-botgram puts the actions you need in those moments in a Telegram chat. The bot runs inside your network, next to the cluster, and you talk to it from the phone you already carry. It connects out to Telegram and waits for your messages: no port has to be opened towards your network.
Outside the nodes, API only
Section titled “Outside the nodes, API only”cv4pve-botgram runs outside the cluster (on a management VM, a small server, a container) and talks only to the Proxmox VE REST API. Nothing is installed on the nodes and no SSH or root shell is needed: an API token with the privileges listed in Permissions is enough. Give it more than one node and it connects to the first one that answers, so it still works while a node is down.
What a chat can do is exactly what the token is allowed to do: a token that can only start and stop guests makes a bot that can only start and stop guests.
Prefer a web interface? cv4pve-admin runs the same bot as its Bots module, configured from the browser.
What it does for you
Section titled “What it does for you”Reboot or shut down a node, chosen from the nodes that are online.
get, set, create and delete on any path of the Proxmox VE API. Leave a placeholder in the path and the bot asks for it with buttons.
Short names for the calls you repeat, such as /qsts for the status of a VM. Many are built in, and you add your own from the chat.
The bot answers only the chat IDs you list. Any other chat is refused and written to the log.
For Linux, Windows and macOS: a native systemd and Windows service, with no wrapper.
Start your bot
Create the bot in Telegram, download the binary, point it at any node.
official Proxmox partner