Forward posts from Telegram channels to WhatsApp (group or channel). Supports text, photos, videos, documents, and audio. Automatically skips reposts/forwards from other channels.
-
Install dependencies
npm install
-
Configure environment
cp .env.example .env
-
Get Telegram Bot Token
- Message @BotFather →
/newbot - Add bot as admin to your Telegram channel
- Copy token to
.env
- Message @BotFather →
-
Run the bridge
npm start
-
Connect WhatsApp
- Scan QR code with WhatsApp
- Copy desired chat ID from console to
.env - Restart
# Build and run
docker compose up -d
# View logs
docker compose logs -f
# First run - get QR code
docker compose logs -f bridgeSession and logs persist in ./data/ directory.
Pushing to main triggers automatic deployment to EC2 via GitHub Actions.
Required GitHub Secrets:
| Secret | Description |
|---|---|
EC2_HOST |
EC2 instance IP or hostname |
EC2_SSH_KEY |
Private SSH key for ec2-user access |
| Variable | Description |
|---|---|
TELEGRAM_BOT_TOKEN |
Bot token from @BotFather |
TELEGRAM_CHANNEL_ID |
Channel ID to monitor (optional, monitors all if empty) |
WHATSAPP_CHAT_ID |
Target WhatsApp chat (123@g.us for groups, 123@newsletter for channels) |
LOG_DIR |
Log directory (default: ./logs) |
DATA_DIR |
Data directory for WhatsApp session (default: .) |
DEBUG |
Enable debug logging (set to 1) |
- For WhatsApp Channels, your account must be an admin
- Session persists in
.wwebjs_auth/folder - Large files may fail due to Telegram API limits (20MB for bots)