TetOS is a CLI utility for managing a local Minecraft server. It allows you to get the server status (RAM usage, world weight, count of players, etc.). If desired, send notifications to Telegram via a bot about events on the server, such as players logging in and out or server readiness. The official core of the Minecraft Java server is used for work.
Libraries used for tetOS:
psutil- to control the use of server resources (RAM).python-telebot- for sending notifications to Telegram about events on the server.python-dotenv- configuration of the secure storage component (.env file).
How it is worked? The Telegram bot in tetOS is used only for notifications and basic interaction with the server. TetOS controls the Minecraft server (logs, status, events). When an event occurs (server start/stop, player joining/leaving), tetOS sends a message to the Telegram bot. Telegram bot delivers notifications to all registered users.
Scheme Telegram-bot workflow
User (Telegram)
│
▼
Telegram Bot
│
▼
tetOS (CLI utility)
├── .env (bot token)
├── tg_users.txt (subscribed users)
│
▼
Minecraft Java Server
| OS | Build | Notes |
|---|---|---|
| MacOS | ✅ Full | Tested on OSX Tahoe |
| Linux | ✅ Full | Tested on Linux Arch |
| Windows | ❌ WIP | Support coming soon |
An important point for the utility is the commands, the main commands will look like this
info - Show server status (RAM, players, version, etc.)
start - Start the server (optional: --hard for hard start)
stop - Stop the server
help - Show help menu
restart - Restart the server
clear/cls - Clear the terminal
tps - Show server TPS
mspt - Show MSPT servers
set - Set server properties (max-ram, gamemode, telegram notify, etc.)
exit - Exit the utility
The file system structure of the utility will look like this
tetOS/ # Repository root
├── README.md # Project documentation
├── requirements.txt # Python dependencies
├── run.sh # TetOS utility launcher (main script)
├── src/ # Python scripts, run_server.sh, and configs
│ ├── python_scripts/ # Main TetOS code
│ │ ├── main.py
│ │ ├── config.py
│ │ ├── server_commands.py
│ │ └── telegram_bot.py
│ ├── .env # Environment variables (Telegram bot token)
│ ├── run_server.sh # Minecraft server launch script
│ └── telegram_cache/ # Telegram user cache
│ └── tg_users.txt
└── server/ # Minecraft server folder
├── server.jar # Downloaded server file
├── eula.txt # License file (generated by the server)
├── world/ # Minecraft world files
└── server.properties # Server settings (port, max players, etc.)
Download the TetOS installer from the official GitHub repository, and start script.
chmode +x ./installer.sh
./installer.shClone the repository:
git clone https://github.com/AndriiBash/tetOS.git
cd tetOSInstall dependencies using pip:
pip install -r requirements.txtDownload the official Minecraft Java server from the official site. Download Server.
- Move the downloaded server file (e.g.,
server.jar) into theserver/folder (example:tetOS/server/server.jar).
⚠️ Important: If theserver/folder does not exist, you need to create it manually.
- Execute
server.jar:
cd server
java -jar server.jar- After this, you need to accept the license agreement to start the server. Go to the
eula.txtfile and changeeula=falsetoeula=true. Use this command to do so:
MacOS/Linux:
sed -i.bak 's/eula=false/eula=true/' eula.txt && rm eula.txt.bakWindows:
NullThe .env file stores your environment variables, such as your Telegram bot token, so that TetOS can securely access them.
Create a .env file in src/ with the following content:
cd ../src
touch .env
echo 'TELEGRAM_TOKEN="YOUR_TOKEN"' > src/.envStart the utility using.
MacOS/Linux:
cd ../
./run.shWindows:
Null
⚠️ Make surerun.shis executable:
chmod +x run.sh