Skip to content

Control your Linux server from Telegram

One tap runs a command on your server and sends the output back to your chat.

Telegram Commander turns a simple YAML config file into a Telegram bot with a menu of buttons. Put any terminal command behind a button and run it from your phone. You do not write any code.

Installation · Concepts · Functions · Configuration · CLI

Screenshots

Your menu, a command running, the output that comes back, and typing a command by hand. Click any picture to see it full size.

Command output with the System menu open Resource and process buttons Storage and package buttons Network tools and typing a command by hand Command output sent back to the chat

Quick and easy

  • Write your menu


    List the buttons and their commands.

  • Start the bot


    Run it now, or keep it up as a service.

  • Tap and read


    Tap a button and read the output in the chat.

Use cases

  • Restart or stop a service
  • Start and stop containers
  • Update system packages
  • Read logs and journals
  • Check disk space
  • Watch CPU and memory
  • Ping hosts and test URLs
  • Take and restore backups
  • Run your own scripts
  • Reboot or shut down the host
  • Type any command by hand
  • And almost anything else

Why use it

  • No coding


    Describe the menu and commands in one YAML file.

    Config file

  • From anywhere


    Open Telegram on your phone and run the server. No VPN into the host.

    How the bot connects

  • No open ports


    The bot connects out to Telegram. Nothing is exposed to the internet.

    How the bot connects

  • Output in the chat


    The result comes back as a message. You do not need an SSH session.

    How much output you see

  • Controlled and recorded


    Choose who gets the menu, confirm risky actions, and record each run.

    Access and confirmation

  • Nested menus


    Group buttons into categories. Home stays at the top; Back takes you up.

    Menu

  • Reusable functions


    Write a command once, then fill in different values on each button.

    Functions

  • Stays running


    Install it as a service and the bot starts with the host.

    Run as a service

A tiny example

This config makes a bot with one button called "Uptime". Tapping it runs the uptime command on the server.

This complete config adds one button

config.yaml
telegram:
  bot_token: "YOUR_BOT_TOKEN" # (1)!
  allowed_users:
    - "YOUR_USER_ID" # (2)!

menu:
  - name: Uptime
    type: button
    function: command
    command: "uptime" # (3)!
  1. Ask BotFather in Telegram for a token when you create the bot.
  2. Only the accounts listed here can open the menu. You can use a numeric id or an @username.
  3. Anything you could type in a terminal goes here.

That is a complete, working configuration. Everything else is optional.

Built for a small, trusted group

Nothing listens for incoming connections, and only the accounts in allowed_users get a menu. Everyone who can use the bot can run the buttons you defined, so keep that list short.

Ready to try it?

Telegram Commander is free and open source. If it saves you time, consider supporting its development — it helps keep the project alive and maintained.