How to install and use FreshRSS on your Raspberry Pi
Keeping up with the news and your favorite designers 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 display them in one place through your browser or a dedicated app on your mobile device.
Sounds too good to be true? Read below as we’ll walk you through the setup steps, but before that we’ll briefly explain why you should use FreshRSS.
Really Simple Syndication (RSS) is an almost ubiquitous feature on the Internet. Almost every site you visit today will have an RSS feed hidden somewhere.
An RSS feed is an XML file that can be retrieved and read by specialized software to give you the latest headlines for a given site, the URL of the entire story, and supporting information, such as author, date of publication and a text extract. The MakeUseOf RSS feed is available here if you want to view the raw XML.
Usually you’ll have a separate RSS reader for different devices or even subscribe to a service that provides your own organized RSS feed.
FreshRSS is different, however. It’s self-hosted software that works great 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 which means you never need to visit those sites.
The main benefit of using FreshRSS is that you can easily cut through soft paywalls and avoid advertising and tracking code, making 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 server, then visit your domain registrar. Advanced DNS section and create a new record. For type, select Athen adjust @ for the host, and in the value field, enter your public IP address.
Now login to your Raspberry Pi using Secure Shell (SSH):
Update and upgrade all packages using the following commands:
sudo apt update
sudo apt upgrade
Now change directory and download the FreshRSS installation archive by typing the following:
sudo wget https:
Unzip the archive with:
sudo unzip master.zip
You will see that a new directory called “FreshRSS-master” has been created. Give ownership to the Apache user:
sudo chown -R www-data:www-data FreshRSS-master
FreshRSS is in the right place and can be accessed and written to by Apache, but Apache doesn’t know where it is. So, change directory:
And create a new Apache configuration file:
sudo nano freshrss.conf
In the new file, paste the following:
Save the file and exit nano with CTRL+O followed by CTRL+X.
Activate the configuration file by entering the following:
sudo a2ensite freshrss.conf
Now restart Apache using the command below:
sudo service apache2 restart
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 database to use:
CREATE DATABASE fresh;
CREATE USER fresh IDENTIFIED BY 'password';
GRANT USAGE ON . TO fresh@localhost IDENTIFIED BY 'password';
GRANT ALL privileges ON fresh.* TO fresh@localhost;
Now launch a web browser and visit your domain. You will be asked to choose a language and the installer will run checks to make sure your server is up to date.
Click next, and you will be asked to fill in the details of the database that FreshRSS will use. The database type is mysqlthe host is localhostand both user and database are Costs.
When you’re done, click Next. You will be asked for the username of the default user (maximum 16 alphanumeric characters), the authentication method and to set the password.
Once you have clicked Complete installationyou need to login to your FreshRSS instance using the name and password you just set.
The only feed you will have is the default FreshRSS feed which keeps you up to date with news from the FreshRSS team. It’s 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 a new feed. If you paste the feed address of makeuseof.com, your screen will soon be filled with the latest news from the best tech site on the internet.
You can usually find feeds on other sites by adding /to feed, /rssWhere /rss.xml after the base URL. If that doesn’t work, right click on the home page of the website, then click Show page source. Use CTRL+F to search for terms: to feed, RSS, atomWhere XML.
Fetching full articles with FreshRSS
Like many other sites, MakeUseOf only offers article stubs, but FreshRSS can fetch full articles directly to your Raspberry Pi.
Most articles on different sites have a standard layout with common and consistent elements across the site. You want to find the CSS selector that contains the text you want to read.
Open any article on your target site and right-click on the part of the article body that contains the text. Then select inspect from the menu and the browser window will split, with one half showing the source and the top showing the original site.
You will see that certain 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.
Return to FreshRSS and click the cog icon next to MUO feed, scroll down to Advanced, and in the marked field Article CSS selector on the original websitepaste into selector #article-body. Click on Submit so what Reload articles.
For your eternal joy and enjoyment, every MUO article on your FreshRSS instance will be full-text, and every future article fetched by FreshRSS will also be full-text. This works on all sites, although the exact selector varies.
Accessing a website over an unencrypted HTTP connection is insecure and leaves you vulnerable to attacks, even if you host the site on a Raspberry Pi. Certbot will secure your site by retrieving and deploying security certificates and Let’s Encrypt encryption keys. So, type the following:
Enter your email address and select the site you want to secure from a list. The next time you visit your FreshRSS site, the connection will automatically be upgraded to HTTPS.
In the current state of your installation, FreshRSS can only update its feeds with manual input. You must click the button Refresh to prompt the software to check its sources and pull new information from the web.
Luckily for your fingers, FreshRSS runs under Linux on your Raspberry Pi, and Linux has a built-in tool called cron, which can trigger a refresh on a schedule you set. Familiarize yourself with using cron and crontab, then enter the command below:
sudo crontab -e
Add a new entry depending on how often you want FreshRSS to pull new feeds from ether:
*/15 * * * * php -f /var/www/FreshRSS-master/app/actualize_script.php
The above line of code will configure FreshRSS to refresh its feeds every 15 minutes. So, modify the value according to your needs.
With FreshRSS, you can read news from a variety of sources without ever triggering tracking scripts or experiencing annoying ads. Cookies will never be deposited on your Raspberry Pi, which means that you do not trigger soft paywalls.
In the rare event that a site administrator spots FreshRSS, they’ll assume it’s a bot, entirely separate from the rest of your digital identity.