VPS Tutorials
RSSHub on VPS: Docker, Browser Routes, Cache and Private Feeds (2026)
Deploy standard or browser-enabled RSSHub, size concurrency, configure cache and private feeds, maintain authorized regional cookies and monitor valid RSS content.

RSSHub generates feeds for supported sites and routes, which you then subscribe to in a reader. It is useful when a native feed is unavailable, but it is not the only feed-generation option and cannot turn every website into a reliable feed.
The original examples include Bilibili, Xiaohongshu, Weibo and Zhihu, services with China-market account, access and route conditions. Keep those examples conditional; an international reader can use other supported routes without needing these accounts.
The public endpoint rsshub.app may be convenient, but:
- Shared instance rate limits can reject frequent requests.
- The original notes access problems from mainland China; availability must be tested from your actual reader/server network.
- Routes can break after a source changes HTML, APIs or authentication.
Self-hosting controls configuration and shared-instance load, but does not remove source-platform limits, blocks or maintenance.
| Product | Purpose | Interface |
|---|---|---|
| RSSHub | Fetch supported source data and emit RSS | Route URLs/API; not a full reading application |
| FreshRSS | Subscribe, organize and mark items read | Browser/mobile-reader integration |
See FreshRSS deployment. You can start with that reader and native feeds, then add RSSHub. Both remain dependent on upstream sites and infrastructure even when self-hosted.
Node.js-only requests can be relatively light; Chromium sessions can consume hundreds of MB each and substantial CPU. Original image sizes of about 500 MB for diygod/rsshub and 1.2 GB for diygod/rsshub:chromium-bundled vary by tag/architecture. A standard image can use an external browser; the Chromium variant bundles one.
| Initial VPS budget | Assessment |
|---|---|
| 1 vCPU/512 MB | Small non-browser routes only; monitor |
| 1 vCPU/1 GB | Browser work is tight and may time out |
| 1 vCPU/2 GB | Useful starting point for limited browser concurrency |
| 2 vCPU/4 GB | More headroom for shared use/routes |
chromium-bundled under memory pressure can stall. Swap/Zram may reduce abrupt failures but is not a substitute for enough RAM. Allow about 20 GB or more for images, layers and data, and review Docker disk cleanup before removing rollback images.
Use a supported non-browser route first:
docker run -d \
--name rsshub \
--restart unless-stopped \
-p 127.0.0.1:1200:1200 \
-e NODE_ENV=production \
-e CACHE_EXPIRE=600 \
diygod/rsshub
Reach http://你的IP:1200 through a private tunnel if configuring remotely. Keep 127.0.0.1 binding; add access control before exposing it. A public unprotected instance lets strangers consume your resources and source-request quota.
Create the Compose project directory/configuration before running this example:
services:
rsshub:
image: diygod/rsshub
container_name: rsshub
restart: unless-stopped
ports:
- "127.0.0.1:1200:1200"
environment:
NODE_ENV: production
CACHE_TYPE: redis
REDIS_URL: "redis://redis:6379/"
PUPPETEER_WS_ENDPOINT: "ws://browserless:3000"
CACHE_EXPIRE: 600
CACHE_CONTENT_EXPIRE: 3600
REQUEST_TIMEOUT: 10000
REQUEST_RETRY: 2
ACCESS_KEY: 换成一串长随机字符
depends_on:
- redis
- browserless
redis:
image: redis:alpine
restart: unless-stopped
volumes:
- redis-data:/data
browserless:
image: browserless/chrome
restart: unless-stopped
environment:
- MAX_CONCURRENT_SESSIONS=2
volumes:
redis-data:
This keeps Redis and browser services inside Docker's network, without publishing their ports. Review and pin maintained compatible images. The shown browserless/chrome and MAX_CONCURRENT_SESSIONS belong to a particular image generation; newer browserless images use different options/endpoints, so consult their matching documentation rather than changing only the tag. Ensure the Puppeteer client/server versions work together.
MAX_CONCURRENT_SESSIONS=2 caps browser sessions. The original suggests 2 on a 2 GB VPS and 3–4 on 4 GB, as trial values, not guaranteed safe capacity. Include Redis, RSSHub and the OS in memory budgeting. A browser crash can still fail its routes even if RSSHub stays running.
Alternatively chromium-bundled can bundle Chromium; remove the external endpoint/service when using the documented bundled setup. Simpler service count does not guarantee lower memory use. Start the chosen project with Docker Compose up in detached mode, inspect its logs and test one real feed.
| Option | Original default/example | Meaning |
|---|---|---|
CACHE_TYPE | memory | Choose supported memory/redis; check how the installed version disables caching |
CACHE_EXPIRE | 300 seconds | Route response lifetime |
CACHE_CONTENT_EXPIRE | 3600 seconds | Fetched-content lifetime |
MEMORY_MAX | 256 | In-memory capacity setting |
A 300-second TTL does not automatically fetch every five minutes. Refresh depends on actual reader requests and cache misses; one route may perform multiple upstream requests. Twenty subscriptions do not imply exactly twenty fixed-period source requests.
Try CACHE_EXPIRE at 600–1800 seconds where delayed updates are acceptable, adjusting for actual news freshness and source policies. Redis can share cache across instances; persistence requires appropriate Redis configuration, and a volume alone does not guarantee every cached item survives restart.
Set a strong private ACCESS_KEY:
environment:
ACCESS_KEY: 你的长随机密钥
https://rss.example.com/bilibili/user/dynamic/123456?key=你的密钥
/ and /robots.txt may remain public exceptions in the demonstrated version; check the actual allowlist before deployment. Feed URLs containing ?key=... are bearer credentials: protect reader exports, proxy logs and shared links.
For route-scoped sharing, the documented ?code= derives a value using the route path and master secret:
https://rss.example.com/some/route?code=md5哈希值
Verify path/query behavior in your version. The MD5-derived code is a bearer link, not modern cryptographic identity authentication; keep the master key strong and do not imply the code grants safer privileges beyond the implemented route scope.
You can add proxy authentication:
rss.example.com {
basicauth {
rss $2a$14$你的密码哈希
}
reverse_proxy 127.0.0.1:1200
}
Use the directive supported by your Caddy version (current releases use basic_auth), replace the hash and validate before reload. The reader must support HTTP authentication; credentials in URLs can leak through history/logs. Prefer protected authentication fields where the reader provides them:
https://用户名:密码@rss.example.com/路由?key=xxx
If the reader cannot handle the extra layer, use supported private access/key controls instead of exposing a broken or unprotected endpoint. See Caddy.
These platform examples apply only to eligible users and routes that currently support them. Self-hosting avoids some shared-instance limits, not upstream access restrictions.
Bilibili routes can return {"code":-401,"message":"非法访问"} when authentication is required. For your own authorized account, use the documented UID-specific variable:
BILIBILI_COOKIE_你的UID=你的Cookie
Replace the UID marker with your numeric account ID, use environment syntax without spaces around the equals sign and retain cookie data privately. Xiaohongshu's demonstrated variable is:
XIAOHONGSHU_COOKIE="abRequestId=xxx;web_session=xxx"
Use only your authorized session. Cookie validity can be days, weeks or months depending on platform policy; do not promise a fixed lifetime. Rotate expired credentials and recreate the service so changed Compose environment is applied.
An approved network proxy can be configured where appropriate:
PROXY_URI=socks5h://用户名:密码@代理地址:端口
Check route support and protect proxy credentials. It adds delay/cost and does not restore authorization or guarantee recovery of a blocked route. Prefer supported/native alternatives when a source is unavailable; never send private cookies to an untrusted public instance.
A mixed approach can use your own instance for working routes and a trusted public/third-party instance for suitable public feeds, keeping each service's restrictions and privacy requirements.
Replace the instance domain while retaining a route supported by your deployed version:
# 公共实例的写法
https://rsshub.app/bilibili/user/dynamic/2267573
# 换成你自己的
https://rss.example.com/bilibili/user/dynamic/2267573?key=你的密钥
Add that private feed URL to FreshRSS. Locate routes in docs.rsshub.app, or inspect https://rss.example.com/api/namespace?key=你的密钥 if provided by your installed version. Route paths can change across versions, so switching instances does not guarantee support for every path.
Use Uptime Kuma to monitor key feeds. Check valid RSS content and freshness as well as HTTP status; a 200 welcome/error page is not a healthy updating feed. Avoid monitors that bypass cache and overload sources.
cd ~/rsshub
docker compose pull
docker compose up -d
Pin an available reviewed tag/digest; 2026-10-01 is an example to verify, not a universal tag format. Review breaking route changes and client/browser dependencies. Retain previous artifacts and private settings/cookies, and test the feeds you actually use after update. Cache can be rebuilt; lost credentials still need recovery.
Long wait then 503: inspect docker stats, browser logs, source latency and MAX_CONCURRENT_SESSIONS. Lower concurrency and verify runtime compatibility before increasing resources.
Empty feed: verify source structure, authentication and route maintenance. Inspect current release notes; if reporting an issue, remove private cookies and keys.
Bilibili 401: verify required authorized cookie, expiry and route support; authentication is not the only possible cause.
Memory grows/OOM: set measured memory limits, concurrency and Redis policy. docker compose restart may temporarily restart processes; restarts alone do not fix a leak or undersized VPS.
Old images fill disk: inspect usage before docker image prune -a; preserve artifacts needed for rollback and avoid deleting volumes/data.
Regional sources are slow: test the actual server-to-source and reader-to-server paths. Mainland-China/overseas examples do not predict every user's latency; select a reachable supported instance or native feed.
The useful benefit is a consolidated feed under your control. Browser resources, changing routes and authorized-cookie maintenance remain operational costs. A few ordinary blogs may need only native RSS and a reader; use RSSHub where it adds a supported source you actually need.