Post

Install FreshRSS - Ubuntu 22.04

This post explains how to self host a free opensource RSS aggregator called FreshRSS. FreshRSS is a self-hosted RSS and Atom feed aggregator. It is lightweight, easy to work with, powerful, and customizable.

Install Nginx Web Server

Run the following command to install Nginx:

1
sudo apt install nginx -y

Install PHP and other dependencies:

1
sudo apt install php-fpm php-curl php-gmp php-intl php-mbstring php-sqlite3 php-xml php-zip -y

Installing FreshRSS

1
sudo apt install git -y
1
2
3
4
5
6
7
8
cd /usr/share/
sudo git clone https://github.com/FreshRSS/FreshRSS.git
cd FreshRSS
sudo chown -R :www-data .
sudo chmod -R g+r .
sudo chmod -R g+w ./data/
sudo chmod -R g+w .
sudo ln -s /usr/share/FreshRSS/p /var/www/html/

Configure Nginx configuration file:

1
2
sudo rm /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/sites-enabled/default

Add the following configuration to the default file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
server {
        # Domain name below.
        server_name DOMAIN_NAME;

        # Replace the following root path to your website or app folder
        root  /var/www/html/p/;

        # This is the order in which server searches for the file names.
        # If index.html is not found, it will search for index.htm and so on.
        index index.php index.html index.htm index.nginx-debian.html;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }

        # php files handling
        # this regex is mandatory because of the API
        location ~ ^.+?\.php(/.*)?$ {
                fastcgi_pass unix:/var/run/php/php-fpm.sock;
                fastcgi_split_path_info ^(.+\.php)(/.*)$;
                # By default, the variable PATH_INFO is not set under PHP-FPM
                # But FreshRSS API greader.php need it. If you have a “Bad Request” error, double check this var!
                # NOTE: the separate $path_info variable is required. For more details, see:
                # https://trac.nginx.org/nginx/ticket/321
                set $path_info $fastcgi_path_info;
                fastcgi_param PATH_INFO $path_info;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }
}

Replace DOMAIN_NAME with either localhost or your own domain/sub-domain.

Make sure Nginx is ok with the configuration file:

1
sudo nginx -t

Reload Nginx:

1
sudo systemctl reload nginx

Configuring FreshRSS

Enter the IP or URL of your server into a browser to bring up the site for initial configuration (http://localhost, http://192.168.x.x or https://freshrss.example.org)

Complete the setup with the following configuration:

  • Language (choose your language) Language
  • Checks (make sure all check ar OKAY) Language
  • Database Configuration (choose SQLite) Language
  • General Configuration (setup username and password) Language
  • Installation Complete Language
  • Login Page Language

For further information on setting up FreshRSS, see their website @ FreshRSS

This post is licensed under CC BY 4.0 by the author.