Synchronize your Telegram channels with Miniflux RSS reader through automated RSS feed creation.
Teleflux monitors your Telegram channel folders and automatically creates corresponding RSS feeds in Miniflux, keeping your RSS reader organized exactly like your Telegram folders.
- Automatically creates RSS feeds for all channels in your Telegram folders
- Maps each Telegram folder to a category in Miniflux
- Keeps feed titles updated with current channel names
- Removes feeds for channels you've unfollowed
- Sends you notifications about synchronization results
This project integrates with the following services:
- Miniflux - A minimalist and opinionated RSS reader
- RSSHub - Everything is RSSible - generates RSS feeds for various platforms including Telegram
- Telegram - Cloud-based instant messaging service
Before installing Teleflux, you need:
- Python 3.9 or higher - with updated pip/setuptools
- Miniflux RSS reader - running somewhere accessible
- RSSHub instance - for generating RSS feeds from Telegram channels
- Telegram API credentials - obtained from Telegram
Teleflux requires modern build tools for installation. If you're using Python 3.9, you'll need to upgrade pip and setuptools first, as the default versions don't support editable installs with pyproject.toml.
Clone and install the application:
git clone https://github.com/petrouv/teleflux.git
cd teleflux
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# For Python 3.9 users: upgrade pip and setuptools first
pip install --upgrade pip setuptools wheel
# Install Teleflux
pip install -e .
# Alternative: if you encounter issues with editable install
# pip install .
# Create config directory
mkdir -p config- Go to https://my.telegram.org/apps
- Log in with your Telegram account
- Create a new application (any name works)
- Copy the
api_id(number) andapi_hash(long string) - Save these values - you'll need them for configuration
Before using Teleflux, you must create a Telegram session file:
# This will prompt you to enter your phone number and verification code
teleflux --dry-runFollow the prompts:
- Enter your phone number (with country code, e.g., +1234567890)
- Enter the verification code sent to your Telegram app
- If you have two-factor authentication, enter your password
This creates a session file that allows Teleflux to access your Telegram account without asking for codes again.
Create a configuration file at config/config.yml:
telegram:
api_id: 12345678 # Your API ID from my.telegram.org
api_hash: "your_api_hash_here" # Your API hash from my.telegram.org
session_file: "data/teleflux.session" # Where to store the session
notify_chat_id: "me" # "me" for Saved Messages, "@username" for bots, or numeric ID
miniflux:
url: "https://your-miniflux.com" # Your Miniflux URL
token: "your_miniflux_token" # Your Miniflux API token
rsshub:
base_url: "https://rsshub.app" # RSSHub instance URL
sync:
folders:
- "News" # List of Telegram folders to sync
- "Technology"
- "Entertainment"
remove_absent_feeds: true # Remove feeds for unfollowed channels
private_feed_mode: "skip" # How to handle private channels (skip or secret)
validate_feeds: true # Check if RSS feeds work before adding
keep_emojis_in_titles: false # Remove emojis from feed titles
disable_title_updates: false # Keep feed titles updated
notify_no_changes: false # Send notifications even when no changes made
logging:
level: "INFO" # How much detail in logs (DEBUG, INFO, WARNING, ERROR)
quiet: false # Only show ERROR and CRITICAL messages (for automated runs)
notifications:
enabled: true # Enable/disable Telegram notifications
chat_id: "me" # Chat to send notifications to (optional)- Open your Miniflux web interface
- Go to Settings β API Keys
- Create a new API key
- Copy the token and paste it in your config file
Organize your Telegram channels into folders:
- In Telegram, go to Settings β Folders
- Create folders like "News", "Technology", "Entertainment"
- Add relevant channels to each folder
See which folders Teleflux can find:
teleflux --list-foldersThis shows all your Telegram folders and how many channels are in each.
See which channels aren't in any folder:
teleflux --list-unfoldered-channelsConsider organizing these channels into folders for better management.
Run a dry-run to see what Teleflux would do without making changes:
teleflux --dry-runThis shows exactly what feeds would be created, updated, or removed.
# Run synchronization
teleflux
# Use a different config file
teleflux --config /path/to/config.yml
# Run without making changes (preview only)
teleflux --dry-run
# Run quietly (for automated scripts)
teleflux --quietThe --quiet flag suppresses all output except errors. You can also configure quiet mode in your config file using logging.quiet: true, which is useful for Docker deployments and automated runs. The CLI flag takes precedence over the config setting.
# List all your Telegram folders
teleflux --list-folders
# Show channels not in any folder
teleflux --list-unfoldered-channels
# Use a custom session file location
teleflux --session-file /path/to/session.sessionYou can configure folder mapping in two ways:
Simple format (folder name becomes category name):
sync:
folders:
- "News"
- "Technology"
- "Entertainment"Advanced format (map folder names to different category names):
sync:
folders:
"My News": "News"
"Tech Stuff": "Technology"
"Fun Things": "Entertainment"To run Teleflux automatically every hour, add this to your crontab:
# Edit your crontab
crontab -e
# Add this line (adjust paths as needed)
0 * * * * cd /path/to/teleflux && /path/to/teleflux/.venv/bin/teleflux --quietFor daily synchronization at 6 AM:
0 6 * * * cd /path/to/teleflux && /path/to/teleflux/.venv/bin/teleflux --quietTeleflux includes ready-to-use Docker configuration:
- Docker Compose: Use the included
docker-compose.ymlfile in the repository - Dockerfile: Build your own image using the provided
Dockerfile - Pre-built Image: Use the image from GitHub Container Registry:
ghcr.io/petrouv/teleflux:latest
Before running the Docker container, you need to prepare the required directories and configuration:
# Create necessary directories
mkdir -p config data
# Copy configuration template and customize it
cp config/config.yml.example config/config.yml
# Edit config/config.yml with your settings (see Configuration section above)
# Get your user ID and update docker-compose.yml
id -u
# Replace "1000" in docker-compose.yml with your actual user IDEdit the user field in docker-compose.yml to match your user ID (obtained from id -u command). This ensures proper file permissions for the mounted volumes.
# Using the included docker-compose.yml
docker-compose up -d
# Or using the pre-built image directly
docker run -v ./config:/app/config -v ./data:/app/data ghcr.io/petrouv/teleflux:latest"Configuration file not found"
- Make sure
config/config.ymlexists in the project directory - Use
--configto specify a different location
"Failed to connect to Telegram"
- Check your internet connection
- Verify your
api_idandapi_hashare correct - Recreate the session file if needed
"Miniflux API error"
- Verify your Miniflux URL is correct and accessible
- Check that your API token is valid
- Ensure Miniflux is running and reachable
"RSSHub connection failed"
- Verify your RSSHub URL is correct
- Check if RSSHub is running and accessible
- Try using a public RSSHub instance like https://rsshub.app
If you need to recreate your Telegram session:
- Delete the existing session file:
rm data/teleflux.session - Run Teleflux again:
teleflux --dry-run - Enter your phone number and verification code when prompted
For private Telegram channels, Teleflux can either:
skip- ignore private channels (default)secret- create RSS feeds using channel hashes (advanced)
Set private_feed_mode in your config file accordingly.
Teleflux automatically removes emojis from channel titles when creating RSS feeds, making your RSS reader cleaner and more readable.
Default behavior (recommended):
sync:
keep_emojis_in_titles: false # Removes emojis from feed titlesExamples:
- "π Tech News π±" becomes "Tech News"
- "AI & ML π€π‘ Updates" becomes "AI & ML Updates"
- "π° Daily News π₯" becomes "Daily News"
To preserve emojis:
sync:
keep_emojis_in_titles: true # Keeps emojis in feed titlesThis setting affects both new feeds and title updates for existing feeds.
Teleflux sends you Telegram notifications after each synchronization, showing:
- Number of feeds added, updated, or removed
- Any errors that occurred
- Summary of changes made
You can configure where notifications are sent using the notify_chat_id setting:
telegram:
notify_chat_id: "me" # Send to your Saved Messages (default)
# notify_chat_id: "@your_bot" # Send to a specific bot
# notify_chat_id: 123456789 # Send to a specific chat IDOptions:
"me"- Sends notifications to your Saved Messages"@username"- Sends notifications to a specific bot or user- Numeric ID - Sends notifications to a specific chat
By default, notifications are only sent when there are actual changes or errors. If you want to receive notifications even when no changes were made (useful for monitoring that synchronization is running), you can enable this behavior:
sync:
notify_no_changes: true # Send notifications even when no changes madeYou can also completely disable notifications by adding a notifications section to your config:
notifications:
enabled: falseTeleflux uses different exit codes to indicate what happened:
0- Success2- Configuration file not found3- Configuration error4- Application error5- External service unavailable (Telegram/Miniflux/RSSHub)130- Interrupted by user (Ctrl+C)
This helps with automated scripts and monitoring.