A lightweight Telegram client-based bot that automatically forwards all incoming private messages from your account to a specified private group.
Built using Telethon and designed for simplicity, reliability, and 24/7 operation.
- 📩 Automatically forwards private chat messages to a private group
- 👤 Shows original sender ("Forwarded from [username]" format)
- 🔒 Uses
.envfile for secure API configuration - 🔄 Ready for 24/7 server deployment with systemd
- 🖥️ Easy and fast setup on any Linux server (Ubuntu recommended)
- Python 3.9 or higher
- A Telegram account
api_idandapi_hashfrom Telegram API
- Clone or download this repository manually.
git clone https://github.com/Arianrv/telegram-forwarder-bot.git cd telegram-forwarder-bot - Create a virtual environment (optional but recommended):
python3 -m venv venv source venv/bin/activate - Install required libraries from requirements.txt:
pip install -r requirements.txt
- Create a apiprivate.env file in the root folder with this format:
api_id=YOUR_API_ID api_hash=YOUR_API_HASH target_group_id=YOUR_TARGET_GROUP_ID # (e.g. -100123456789) - Run the bot:
python forward.py