selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

TelegramRSS logo

Self-host TelegramRSS

v4.5.0

Telegram channel to RSS/JSON feed generator

ReleaseOpen SourceMIT
Updated4 months ago
LanguagePHP
Setup difficultyAdvanced
Stars
300
Port
9504 (HTTP server for RSS/JSON/media endpoints)
Requires
TelegramApiServer
Install with Docker Compose

What is TelegramRSS?

TelegramRSS is a self-hosted PHP microservice that fetches posts from public Telegram channels via a companion TelegramApiServer and serves them as RSS or JSON feeds. It runs on an async amphp HTTP server with built-in rate limiting, IP blacklisting, and fail2ban-style temporary bans. The service supports full media access via direct links, shared feed and history caching across clients, and per-client quota overrides via Basic Auth. It requires PHP 8.4.1+ and is deployed via Docker Compose alongside the TelegramApiServer. The project is MIT-licensed and actively maintained with recent releases.

Should you self-host TelegramRSS?

TelegramRSS scores 47/100 on selfhost.directory (how scoring works) and ranks #41 of 85 in Feed Reader. It has 300 GitHub stars.

It shipped 2 stable releases in the past year. The latest, v4.5.0, came out on 6 June 2026. New versions land roughly every 4 months.

Setup is advanced: plan for several services and some ongoing maintenance. It is MIT-licensed and written mostly in PHP.

Its closest alternative on selfhost.directory is RSSHub (85/100, 46 704 stars). It scores higher overall, so compare the two before you pick. See TelegramRSS vs RSSHub side by side.

Features

  • Async PHP server
  • Basic Auth support
  • Channel Filtering
  • IP blacklist
  • JSON Feed Generation
  • Media proxy
  • Rate Limiting
  • Referer blocking
  • RSS Feed Generation
  • Shared caching

TelegramRSS README

How to install TelegramRSS

Install TelegramRSS with Docker Compose

Docker, Docker Compose, TelegramApiServer
Environment variables
SERVER_ADDRESS, SERVER_PORT, REAL_IP_HEADER, TELEGRAM_CLIENT_ADDRESS, TELEGRAM_CLIENT_PORT, TELEGRAM_CLIENT_USERNAME, TELEGRAM_CLIENT_PASSWORD, SELF_URL, TIMEZONE, MEMORY_LIMIT, RPM, MEDIA_RPM, ERRORS_LIMIT, MEDIA_ERRORS_LIMIT, CLIENTS_SETTINGS, ONLY_PUBLIC_CHANNELS, FORBIDDEN_PEER_REGEX, CACHE_PEER_ERRORS_REGEX, FORBIDDEN_REFERERS_REGEX, IP_BLACKLIST, CACHE_ENABLED, CACHE_MAX_ENTRIES, CACHE_HISTORY_WINDOW_SIZE, CACHE_TTL_SECONDS, CACHE_STALE_TTL_SECONDS, LOGS_LEVEL

git clone https://github.com/xtrime-ru/TelegramRSS.git TelegramRSS cd TelegramRSS cp .env.docker.example .env.docker

edit .env.docker as needed

docker compose pull docker compose up -d

Requires TelegramApiServer running separately

How to configure TelegramRSS

  • CACHE_ENABLED1Shared RSS/JSON and media-message cache (memory only). Set to 0 to disable caching. FLOOD_WAIT cooldowns remain active.

    Shared RSS/JSON and media-message cache (memory only). Set to 0 to disable caching. FLOOD_WAIT cooldowns remain active.

  • CACHE_HISTORY_WINDOW_SIZE100Shared latest-history window, in messages (1-100). Older/anchored ranges bypass caching.

    Shared latest-history window, in messages (1-100). Older/anchored ranges bypass caching.

  • CACHE_MAX_ENTRIES2000Maximum cached records; least recently used records are evicted.

    Maximum cached records; least recently used records are evicted.

  • CACHE_PEER_ERRORS_REGEXCHANNEL_PRIVATE|USERNAME_INVALID|This is not a public channel|This peer is not present in the internal peer databaseIf peer resolutions fails with following errors - cache it and dont check this peer again. Leave blanc to disable cache

    If peer resolutions fails with following errors - cache it and dont check this peer again. Leave blanc to disable cache

  • CACHE_STALE_TTL_SECONDS900Maximum age of RSS/JSON and indexed-message fallback on FLOOD_WAIT; 0 disables fallback.

    Maximum age of RSS/JSON and indexed-message fallback on FLOOD_WAIT; 0 disables fallback.

  • CACHE_TTL_SECONDS60Freshness of history, messages, metadata and complete feeds; 0 disables fresh reuse.

    Freshness of history, messages, metadata and complete feeds; 0 disables fresh reuse.

  • CLIENTS_SETTINGSJson list of IP addresses and Basic Auth usernames with custom RPM and errors limits. Its a WHITELIST and a BLACKLIST at same time. Override rpm, media_rpm, errors_limit and media_errors_limit per client. Basic Auth usernames require a "password" value and use the same limits format. Example: { \"127.0.0.1\": {\"rpm\":-1, \"errors_limit\":-1}, \"1.1.1.1\": {\"rpm\":0, \"media_rpm\":1, \"errors_lim

    Json list of IP addresses and Basic Auth usernames with custom RPM and errors limits. Its a WHITELIST and a BLACKLIST at same time. Override rpm, media_rpm, errors_limit and media_errors_limit per client. Basic Auth usernames require a "password" value and use the same limits format. Example: { \"127.0.0.1\": {\"rpm\":-1, \"errors_limit\":-1}, \"1.1.1.1\": {\"rpm\":0, \"media_rpm\":1, \"errors_lim

  • ERRORS_LIMIT0;Allowed number of errors per minute Examples: -1 - allow any number of errors 0 - ban after first error 2 - allow 2 errors per minute: ban on 3rd error.

    Allowed number of errors per minute Examples: -1 - allow any number of errors 0 - ban after first error 2 - allow 2 errors per minute: ban on 3rd error.

  • FORBIDDEN_PEER_REGEXRegex to disable some channels/users. Example: "(username1|username2|user.*name)" Leave blanc to disable

    Regex to disable some channels/users. Example: "(username1|username2|user.*name)" Leave blanc to disable

  • FORBIDDEN_REFERERS_REGEXForbid to view images from webpages

    Forbid to view images from webpages

  • IP_BLACKLISTip_blacklist.csv
  • LOGS_LEVEL2LOGS LogLevel::DEBUG => 0, LogLevel::INFO => 1, LogLevel::NOTICE => 2, LogLevel::WARNING => 3, LogLevel::ERROR => 4, LogLevel::CRITICAL => 5, LogLevel::ALERT => 6, LogLevel::EMERGENCY => 7,

    LOGS LogLevel::DEBUG => 0, LogLevel::INFO => 1, LogLevel::NOTICE => 2, LogLevel::WARNING => 3, LogLevel::ERROR => 4, LogLevel::CRITICAL => 5, LogLevel::ALERT => 6, LogLevel::EMERGENCY => 7,

  • MEDIA_ERRORS_LIMIT2;
  • MEDIA_RPM50
  • MEMORY_LIMIT128M
  • ONLY_PUBLIC_CHANNELS1Set to 0 if you need to output any channels, chats, etc. Warnign! All client chats will be vissible to users. Make sure to protect this server from internet requests, if you disable this option.

    Set to 0 if you need to output any channels, chats, etc. Warnign! All client chats will be vissible to users. Make sure to protect this server from internet requests, if you disable this option.

  • REAL_IP_HEADERIf you use nginx, then provide here name of client header. for example x-real-ip or x-forwarded-for

    If you use nginx, then provide here name of client header. for example x-real-ip or x-forwarded-for

  • RPMSymfony sliding window per IP or authenticated username, over 60 seconds. Feed and media quotas are separate. Changes take effect after restart. -1 disables the quota, 0 denies access, a positive value limits requests/minute.

    Symfony sliding window per IP or authenticated username, over 60 seconds. Feed and media quotas are separate. Changes take effect after restart. -1 disables the quota, 0 denies access, a positive value limits requests/minute.

  • SELF_URLhttp://127.0.0.1:9504
  • SERVER_ADDRESS0.0.0.0HTTP SERVER

    HTTP SERVER

  • SERVER_PORT9504
  • TELEGRAM_CLIENT_ADDRESSapi
  • TELEGRAM_CLIENT_PASSWORD
  • TELEGRAM_CLIENT_PORT9503
  • TELEGRAM_CLIENT_USERNAME
  • TIMEZONEUTCSYSTEM

    SYSTEM

TelegramRSS releases & version history

More in RSS

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…