RSSHub
4 min read
"Everything is RSSible" — the world's largest RSS network with 5,000+ routes for generating RSS feeds from sites that don't natively support it (Telegram, YouTube, Spotify, Instagram, Twitter/X, Bilibili, Pixiv, GitHub, etc.).
Supports RSS 2.0, Atom, JSON Feed, and RSS3 output formats. Self-hostable, or use public instances like https://rsshub.app.
Routes
Every feed comes from a route — a URL path that maps to a site and its parameters. The path segments after the host are the route's arguments:
https://rsshub.app/youtube/user/@LinusTechTips
https://rsshub.app/github/issue/DIYgod/RSSHub
https://rsshub.app/telegram/channel/awesomeRSSHub
https://rsshub.app/bilibili/user/video/2267573
https://rsshub.app/twitter/user/_RSSHub
Some routes require credentials (cookies, API tokens) set as environment variables on the instance — e.g. Twitter, Bilibili, and Pixiv routes that read private or rate-limited endpoints. The docs page for each route lists its parameters and any required config.
Self-Hosting
Docker Compose
The official compose file bundles RSSHub with a Redis cache and a Puppeteer browserless instance (for routes that need a headless browser to render JavaScript):
bash
wget https://raw.githubusercontent.com/DIYgod/RSSHub/master/docker-compose.yml
docker compose up -d
Minimal compose without browser rendering:
yaml
services:
rsshub:
image: diygod/rsshub
restart: unless-stopped
ports:
- 1200:1200
environment:
NODE_ENV: production
CACHE_TYPE: redis
REDIS_URL: redis://redis:6379/
depends_on:
- redis
redis:
image: redis:alpine
restart: unless-stopped
volumes:
- redis-data:/data
volumes:
redis-data:
Reachable at http://{host}:1200. Update with docker compose pull && docker compose up -d.
Docker Run
bash
# Without Puppeteer
docker run -d --name rsshub -p 1200:1200 diygod/rsshub
# With bundled Chromium (routes needing a headless browser)
docker run -d --name rsshub -p 1200:1200 diygod/rsshub:chromium-bundled
# With config
docker run -d --name rsshub -p 1200:1200 \
-e CACHE_EXPIRE=3600 -e GITHUB_ACCESS_TOKEN=ghp_xxx diygod/rsshub
Configuration
Set via environment variables (Docker -e, compose environment:, or a .env file for manual installs).
Network & proxy
| Variable | Purpose | Default |
|---|---|---|
PORT | Listening port | 1200 |
REQUEST_TIMEOUT | Upstream request timeout (ms) | 3000 |
REQUEST_RETRY | Retry attempts for failed requests | 2 |
PROXY_URI | Proxy address {protocol}://{host}:{port} | — |
PROXY_AUTH | Basic auth credentials for the proxy | — |
PROXY_URL_REGEX | Only proxy URLs matching this regex | .* |
UA | User agent string (randomized by default) | random |
NO_RANDOM_UA | Disable user-agent randomization | false |
Cache
A Redis cache is strongly recommended for any real deployment — it avoids hammering upstream sites and getting rate-limited.
| Variable | Purpose | Default |
|---|---|---|
CACHE_TYPE | memory or redis | memory |
CACHE_EXPIRE | Route (feed) cache duration, seconds | 300 |
CACHE_CONTENT_EXPIRE | Fetched content cache duration, seconds | 3600 |
REDIS_URL | Redis connection string | redis://localhost:6379/ |
MEMORY_MAX | Max cached items in memory mode | 256 |
Feed defaults
| Variable | Purpose | Default |
|---|---|---|
TITLE_LENGTH_LIMIT | Max feed title length (bytes) | 150 |
Route credentials
Many routes need site-specific tokens, e.g. GITHUB_ACCESS_TOKEN, TWITTER_USERNAME / TWITTER_PASSWORD, BILIBILI_COOKIE_*, PIXIV_REFRESHTOKEN. The relevant variables are listed on each route's documentation page.
Access Control
Public instances are open to anyone; lock yours down before exposing it.
| Variable | Purpose |
|---|---|
ACCESS_KEY | Require a key/code on every request (see below) |
ALLOW_USER_HOTLINK_TEMPLATE | Allow user-supplied image_hotlink_template (beta) |
ALLOW_USER_SUPPLY_UNSAFE_DOMAIN | Allow user-supplied domains — SSRF risk, avoid on public hosts |
WHITELIST / BLACKLIST | Allow/deny lists for IPs, UAs, or paths |
With ACCESS_KEY set, append either the key itself or a per-route MD5 access code:
https://host:1200/some/route?key=ACCESS_KEY
https://host:1200/some/route?code=<md5(route + ACCESS_KEY)>
Feed Customization (query parameters)
Append query parameters to any route URL to filter and reshape the output.
Filtering
| Parameter | Effect |
|---|---|
filter | Keep items whose title or description match the regex |
filter_title | Filter on title only |
filter_description | Filter on description only |
filter_author | Filter on author |
filter_category | Filter on category |
filter_time | Keep items within the last N seconds |
filterout | Drop items matching the regex (title + description) |
filterout_title / filterout_description / filterout_author | Field-specific exclusion |
filter_case_sensitive | Case sensitivity (default true) |
# Only keep posts mentioning Rust or Zig, case-insensitive
?filter=Rust|Zig&filter_case_sensitive=false
# Drop anything that looks like an ad
?filterout=sponsored|ad|promo
Content & format
| Parameter | Effect |
|---|---|
limit | Cap the number of items returned |
sorted | Sort by publish date (default true) |
mode=fulltext | Fetch and inline the full article text |
brief | Replace content with a plain-text summary of N chars (≥100) |
format | Output format: rss, atom, json, rss3 |
opencc | Convert Chinese variants (s2t, t2s) |
scihub | Add Sci-Hub links to scientific articles |
chatgpt | AI-generated summaries (needs OpenAI key on the instance) |
Format can also be set via a path suffix:
https://rsshub.app/some/route.atom
https://rsshub.app/some/route.json
https://rsshub.app/some/route?limit=10&mode=fulltext&format=atom
Media rewriting
| Parameter | Effect |
|---|---|
image_hotlink_template | Rewrite image URLs (proxy/anti-hotlink) |
multimedia_hotlink_template | Rewrite audio/video URLs |
wrap_multimedia_in_iframe | Wrap media in <iframe> for reader compatibility |
image_hotlink_template is useful when a site blocks hotlinking — route images through a proxy. Requires ALLOW_USER_HOTLINK_TEMPLATE on the instance:
?image_hotlink_template=https://proxy.example.com/?url=${href}