Tutoriel FreshRSS Debian 11

Comment installer FreshRSS sur Debian 11 ?

I. Presentation

In this tutorial, we will learn how to install FreshRSS on a machine running Debian 11 where we will deploy the Apache 2 web server, the PHP scripting engine as well as MariaDB for the application database.



As a reminder, FreshRSS is an open source feed aggregator that you can install on a NAS, Raspberry Pi, Linux web server, etc. There are several different ways to deploy this application. There is also a Docker container.

To learn more about this application and how to configure it, I recommend you to read the following article (which will prevent me from repeating myself) :

According to the prerequisites listed on the official FreshRSS GitHub, we need the following to perform a manual installation:

  • Web server : Apache2 (recommended), Nginx or Lighttpd
  • PHP version : 7.0+ as well as several extensions (cURL, XML, JSON, MySQL, GMP)
  • Database server : MySQL 5.5.3+ or MariaDB, or SQLite 3.7.4+, or PostgreSQL 9.5+
FreshRSS - Exemples flux RSS
Overview of FreshRSS

II. Web server installation: Apache, PHP, database

I will not detail this part step by step, because I have already posted an article on setting up a LAMP server under Debian 11, here is the link:

However, here are the commands to execute to set up the base necessary for the installation of FreshRSS.

A. Installation d’Apache2

Updating package cache:

sudo apt-get update

Installing Apache2 and enabling autostart:

sudo apt-get install -y apache2
sudo systemctl enable apache2

Activation of essential Apache2 modules: rewrite, deflate, headers, ssl (to switch the site to HTTPS)

sudo a2enmod rewrite
sudo a2enmod deflate
sudo a2enmod headers
sudo a2enmod ssl

Restart Apache2:

sudo systemctl restart apache2

B. Installation de PHP 7.4

Installation of the latest version of PHP 7.4 available in the Debian 11 repositories:

sudo apt-get install -y php

Installing additional modules:

sudo apt-get install -y php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath php-json php-gmp

Restart Apache2:

sudo systemctl restart apache2

C. Installation de MariaDB

Installation of a MariaDB server to store the application’s SQL database. You can also use MySQL or why not SQLite.

sudo apt-get install -y mariadb-server

Basic security of the MariaDB server, in particular to define the “root” password:

sudo mariadb-secure-installation

From there, Apache2, PHP and MariaDB are installed on our Debian 11 server!

We need to create a database specific to FreshRSS. In addition, a user dedicated to FreshRSS will be created and he will have rights only on this database. Let’s start by connecting to our MariaDB instance:

sudo mariadb -u root -p

Enter the “root” password. Next, we create a database for FreshRSS. In this example, it is called “web_freshrss“.

CREATE DATABASE web_freshrss;

Then, we create a user named “admbdd_freshrss“with password”Your-Super-Password” :

CREATE USER 'admbdd_freshrss'@'localhost' IDENTIFIED BY 'Votre-Super-Mot-De-Passe';

Then, we add the rights to this new user on the database that we created previously and we clean the rights:

GRANT ALL PRIVILEGES ON web_freshrss.* TO admbdd_freshrss@localhost;
FLUSH PRIVILEGES;

Finally, we leave the MariaDB shell, because we have finished:

EXIT;

We will grab the FreshRSS installation sources directly from the GitHub by cloning the project. For this we need the Git package:

sudo apt-get install -y git

Once it’s done, we can clone the project with the “git clone” command specifying the project path. We will download the data in “/tmp” since it is only temporary.

cd /tmp
git clone 

FreshRSS - Download source GitHub

Then, we will move the “FreshRSS” folder to the root of our Web server with the “mv” command:

sudo mv /tmp/FreshRSS /var/www/html/

This means that to access FreshRSS, it will be necessary to use a URL like this:

 IP du serveur>/FreshRSS

This is explained by the fact that Apache2’s default site root is “/var/www/html” and that our application is stored in a subfolder. To adjust this configuration, you can edit the “/etc/apache2/sites-enabled/000-default.conf” and change the value of the directive DocumentRoot.

The data is moved to the root of Apache2’s default website but we still need to adjust the permissions.

First, we need to set the Apache2 user as the owner:

sudo chown -R www-data:www-data /var/www/html/FreshRSS

Then apply permissions “644” on files and “755” on folders. I don’t want to see “777” style permissions… This is done with the commands below.

For files, run this command:

sudo find /var/www/html/FreshRSS -type f -exec chmod 644 {} \;

For folders, run this command:

sudo find /var/www/html/FreshRSS -type d -exec chmod 755 {} \;

That’s it, let’s go to the finalization of the installation!

The continuation and end of the installation is done in web mode with the browser! Log in to your FreshRSS like this:

 IP du serveur>/FreshRSS
 de domaine>/FreshRSS

The first step is to choose the language.

Installer FreshRSS sur Debian 11

Then step “Verifications” is displayed: everything must be green in order to continue. If this is not the case, it is probably that you are missing an extension for PHP (see the previous command list). Otherwise, continue.

Step #3 is to specify the information to connect to the database : host (localhost because it is the local server), name of the user to connect, his password, the name of the database and a prefix for the tables (use something other than “freshrss” or “rss“). Reuse the values ​​chosen when creating the database.

FreshRSS - MySQL Database

Finally, step #4 is to create a user account that will be an administrator of the FreshRSS instance. Set a username and password!

FreshRSS - Creating an admin account

Click on “Complete the installation“If all went well!

Synology - Installation de FreshRSS - Etape 5

IV. Conclusion

Voila, FreshRSS is installed on your Debian server! By default, the GitHub RSS feed for FreshRSS releases is embedded. All you have to do is add your first RSS feeds! See the article on installing FreshRSS on a Synology NAS (link at the beginning of the article) to learn more about post-installation usage and configuration.

Synology - Installation de FreshRSS - Tableau de bord

Apache,Internet,Linux,Apache2,Debian,FreshRSS,RSS,

#Comment #installer #FreshRSS #sur #Debian

Leave a Comment

Your email address will not be published. Required fields are marked *