What is RSS

Really Simple Syndication (RSS) is a way to get information. To put it simply but loosely, it is like a newsboy for you, while content creation sites like Zhihu, Weibo, Douban, The Economist, The New York Times and BBC are like newspapers. Every morning, the newsboy would run through the newspapers, get fresh papers from them, and stuff them all into your mailbox so that when you woke up, you could open your mailbox and read all the news of the day instead of having to go to the newspapers yourself.

In this analogy, newspapers are RSS, mailboxes are RSS readers, each newspaper’s address is an RSS feed, and the newsboy is a timed RSS pull program running on your computer or phone.

RSS has the following advantages:

  • Convenience: you can see all the new things on the whole Internet without having to open those sites one by one.
  • Transparency and autonomy: The information you see will be in strict chronological order. No longer will the endless male-female squabbling, money-grabbing marketing campaigns, and sensationalist clickbait monopolize your home page just because the author spent money, or because there were too many onlookers. At the same time, you’ll be able to see more opinions outside your comfort zone, and get out of the information cocoon. This means more power and freedom, but it also means you need to spend more time customizing your sorting and filtering strategies.

Good article on trade-off between RSS and recommendation algorithms: On the “Renaissance” of RSS

My personal experience is that RSS is great for established news outlets with stable quality control and output by professional writers (NYT/BBC/FT, etc.) and some independent blogs, because even if you don’t sort it yourself, you won’t get too bad content; However, for social network platforms such as Zhihu and Douban, the content quality variance is huge, and the experience of directly subscribing to timeline RSS is very bad. I subscribe to a small number of high-quality users and expand my circle of followers regularly through BFS. As for a topic-centric rather than user-centric forum site, it’s almost impossible to navigate effectively through RSS.

What is a RSSHub

If the benefits of RSS appeal to you, you may have found a serious problem: many sites don’t publish their RSS feeds. To go back to the analogy at the beginning, it’s the equivalent of newspapers refusing to disclose their addresses to newsboys (computer programs), leaving you (human users) to come to the door.

Of course, it’s not a problem for some intelligent human beings. They developed software, RSSHub, to convert human-accessible entries (pages) into a format (RSS) that computer programs can read. RSSHub is a bit of an information hub. It downloads web pages from various websites, converts them into RSS, and provides its address to RSS subscribers.

Most sites don’t want users to do this. That way, their ads can’t be seen by humans, and they can’t collect data about their users’ browsing preferences. Therefore, many open RSSHub services (for example, RSSHub official rsshub.app) have been blocked by some websites due to the high number of users. I’ll describe in detail how to set up an RSSHub service for your own use on your own server.

Install and deploy RSSHub

Let’s assume that you 1) have your own server and 2) have a domain name bound to it (represented as example.com).

Straightforward, use docker-compose for installation and startup (if you are killed during installation due to lack of memory, consider expanding server swap) :

mkdir rsshub && cd rsshub
wget https://raw.githubusercontent.com/DIYgod/RSSHub/master/docker-compose.yml
docker volume create redis-data
docker-compose up -d
Copy the code

At the end of this step, the RSSHub service is deployed on port 1200 of your server. Enter example.com:1200 in a browser and see the same interface as rsshub.app. The installation is successful.

Secondary domain names and HTTPS are supported

This step will convert example.com:1200 to rss.example.com. Skip this step if you don’t care about the difference (port number vs secondary domain, HTTP vs HTTPS).

The secondary domain name

First, log on to your VPS provider website (Hostwinds is mine) and add A record to the DNS section to map rss.example.com to your VPS IP address.

Then, log in to your VPS and add a reverse proxy from rss.example.com:80 to localhost:1200:

cd /etc/nginx/sites-available/
sudo vim rsshub.conf
Copy the code

Content of rsshub.conf (please change example.com to your own domain name) :

server { listen 80; listen [::]:80; return 301 https://$host$request_uri; root /var/www/rss.example.com; index index.html index.htm index.nginx-debian.html; server_name rss.example.com; Location / {proxy_pass http://127.0.0.1:1200; Proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; }}Copy the code

Then refresh the nginx service:

sudo systemctl reload nginx
Copy the code

At the end of this step, type rss.example.com in your browser and you should see the same interface as before.

SSL

Install SSL for wordpress in the same way:

sudo certbot --nginx -d rss.example.com
Copy the code

Then modify the nginx configuration file and add HTTPS:

cd /etc/nginx/sites-available/
sudo vim rsshub.conf
Copy the code

Final content of rsshub.conf (please change example.com to your own domain name) :

server {
    listen      80; 
    listen [::]:80;
    server_name rss.example.com;
        
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name rss.example.com;


    ssl_certificate /etc/letsencrypt/live/rss.example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/rss.example.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by CertbotLocation / {proxy_pass http://127.0.0.1:1200; proxy_set_header Host$host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme; }}Copy the code

Refresh the nginx service again:

sudo systemctl reload nginx
Copy the code

Now you can use rss.example.com to access your RSSHub service. Congratulations on completing the RSSHub installation 🚀!