How to Install and Use FreshRSS on Your Raspberry Pi

2022-09-03 11:08:58 By : Ms. Eva Gu

Why pay for an RSS reader when you can set up FreshRSS to fetch full articles from your favorite sites for free? All you need is a Raspberry Pi.

Keeping up to date with the news and your favorite creators is essential in the modern world, but you don't need to create a FaceBook, Google, or Apple account for that.

With FreshRSS, you can pull the latest news, blogs, and other feeds straight from the ether to your Raspberry Pi and view it all in one place through your browser or a dedicated app on your mobile device.

Sounds too good to be true? Read on below as we'll guide you through the steps to set up, but before that, we'll briefly discuss why you should use FreshRSS.

Really Simple Syndication (RSS) is an almost omnipresent feature of the internet. Almost every site you visit today will have an RSS feed hidden away somewhere.

An RSS feed is an XML file that can be fetched and read by a specialized piece of software to give you the latest headlines from a given site, the URL of the whole story, and ancillary information, such as author, publication date, and a snippet of text. The MakeUseOf RSS feed is available here if you want to look at the raw XML.

Usually, you will have a separate RSS reader for different devices or even subscribe to a service that provides your own curated RSS feed.

FreshRSS is different, however. It's a self-hosted piece of software that runs perfectly on a Raspberry Pi, and you access it through a browser or a dedicated client on another device. It also fetches full articles from websites, meaning you never need to visit those sites.

The main advantage of using FreshRSS is that you can easily slice past soft paywalls and avoid advertising and tracking code—this makes it much harder for predatory tech giants to build a profile on you.

You will first need to prepare your Raspberry Pi as a home-based server, then visit your domain registrar's Advanced DNS section and create a new record. For the type, select A, then set @ for the host, and in the value field, type your public IP address.

Now, log into your Raspberry Pi using Secure Shell (SSH):

Update and upgrade any packages using the following commands:

Now change the directory and download the FreshRSS installation archive by entering the following:

You will see that a new directory called "FreshRSS-master" has been created. Give ownership of it to the Apache user:

FreshRSS is in the correct location and can be accessed and written to by Apache, but Apache does not know where it is. So, change the directory:

And create a new Apache conf file:

In the new file, paste the following:

Save the file and exit nano with Ctrl + O followed by Ctrl + X.

Enable the conf file by typing the following:

Now, restart Apache using the command below:

FreshRSS requires a database; you should already have MariaBD installed on your system. Open MariaDB with:

Enter the following commands to create a new user and a database for it to use:

Now, launch a web browser and visit your domain. You will be asked to choose a language, and the installer will carry out checks to ensure your server is up to scratch.

Click next, and you will be asked to fill in the details of the database FreshRSS will use. The type of database is MySQL, the host is localhost, and the user and database are both fresh.

When you're done, click Next. You'll be asked for the username of the default user (maximum 16 alphanumeric characters), the authentication method, and to set the password.

Once you click Complete Installation, you have to log in to your FreshRSS instance using the name and password you just set.

The only feed you will have is the default FreshRSS one which keeps you updated with news from the FreshRSS team. This is great, but you want news from various sources to make it perfect. So, click on the + sign next to subscription management, and you will have the option to create a new category or feed. Pasting the feed address from makeuseof.com will soon see your screen populated by the latest news from the best tech site on the internet.

You can usually find feeds on other sites by adding /feed, /rss, or /rss.xml after the base URL. If that doesn't work, right-click on the website's homepage, then click View Page Source. Use Ctrl + F to search for the terms: feed, RSS, atom, or XML.

Like many other sites, MakeUseOf offers only stubs of articles, but FreshRSS can fetch full articles straight to your Raspberry Pi.

Most articles across various sites have a standard layout with elements in common and consistent across the site. You want to find the CSS selector which contains the text you want to read.

Open any article on your target site, and right-click on the part of the article body which contains the text. Then, select inspect from the menu, and the browser window will split, with one half showing the source and the top part will show the original site.

You'll see that some parts of the page are highlighted. Move your mouse up the hierarchy until the entire article body is blue, then right-click again and choose Copy > Copy selector. For makeuseof.com, the most useful selector is #article-body.

Go back to FreshRSS and click the cog icon next to the MUO feed, scroll down to Advanced, and in the field marked Article CSS selector on original website, paste in the selector #article-body. Click on Submit and then Reload articles.

To your eternal joy and delight, every MUO article on your FreshRSS instance will be full text, and every future article fetched by FreshRSS will be full text, too. This works on every site, although the exact selector will vary.

Accessing a website over an unencrypted HTTP connection is not secure and leaves you vulnerable to attacks—even if you're hosting the site on a Raspberry Pi. Certbot will secure your site by fetching and deploying security certificates and encryption keys from Let's Encrypt. So, type in the following:

Enter your email address, and select which site you want to secure from a list. The next time you visit your FreshRSS site, the connection will be automatically upgraded to HTTPS.

As your installation currently stands, FreshRSS can only update its feeds with manual input—you need to click on the Refresh button to prompt the software to check its sources and pull fresh news from the web.

Fortunately for your fingers, FreshRSS is running on Linux on your Raspberry Pi—and Linux has a built-in tool called cron, which can trigger a refresh according to a schedule you set. Familiarize yourself with how to use cron and crontab, and then enter the command below:

Add a new entry according to how often you would like FreshRSS to pull fresh feeds from the ether:

The above line of code will set FreshRSS to refresh its feeds every 15 minutes. So, change the value according to your needs.

With FreshRSS, you can read news from various sources without ever triggering tracking scripts or enduring annoying adverts. Cookies will never be deposited on your Raspberry Pi, meaning that you don't trigger soft paywalls.

In the rare event that a site administrator spots FreshRSS at all, they will assume it's a bot—entirely divorced from the rest of your digital identity.

David is a freelance writer with a background in print journalism. He has written for newspapers in the United Kingdom and the Middle East. He is a terrible guitar player, and he spends his free time touring the British Isles, off-grid, with his caravan and dog. Occasionally, he writes books. No-one likes them.

Join our newsletter for tech tips, reviews, free ebooks, and exclusive deals!