FreshRSS is a free and open-source web-based RSS feed aggregator that allows you to read and follow multiple RSS feeds in one place. In this tutorial, we will walk you through the process of installing FreshRSS on NixOS.
Before we start with the installation, make sure you have a running instance of NixOS with sudo privileges. If you don't have NixOS installed, you can refer to this guide.
Before installing FreshRSS on NixOS, it's essential to update your NixOS system packages to ensure that they're up-to-date. To accomplish that, use the following command:
sudo nix-channel --update
sudo nixos-rebuild switch
FreshRSS is built using PHP. Therefore, you will need to install PHP and other necessary PHP modules. You can do that by running the following command:
sudo nix-env -i php \
php-fpm \
php-opcache \
php-pdo_mysql \
php-dom \
php-json \
php-curl \
php-mbstring
FreshRSS requires a webserver to function. We'll use Nginx, a popular web server to handle all incoming requests. To Install Nginx, use the below command:
sudo nix-env -i nginx
FreshRSS requires a database to store and retrieve feed data. We'll use MariaDB, a fork of MySQL, for this purpose. Run the following command to install MariaDB:
sudo nix-env -i mariadb
Before we proceed with the FreshRSS installation, we need to configure MariaDB. Run the following command to log in to MariaDB using the root account.
sudo mysql -u root
We will now create a new database and user for FreshRSS. Run the following commands:
CREATE DATABASE freshrss;
GRANT ALL ON freshrss.* TO 'freshrss'@'localhost' IDENTIFIED BY 'password';
Note that 'password' is the password we'll be using for the FreshRSS user. You can use any other password of your choice instead.
When you're done, run the following command to exit MariaDB:
exit
Now we're ready to download and set up FreshRSS. Run the following commands:
cd /srv/www/
sudo mkdir freshrss
sudo chown your_user_name:www-data freshrss
cd freshrss
sudo git clone https://github.com/FreshRSS/FreshRSS.git -b master .
sudo git submodule init
sudo git submodule update
We used the git clone command to download the latest FreshRSS version from Github. We also used Git to download the submodule package dependency.
We now need to configure FreshRSS to use our database. Copy the config file using the following command:
cp app/config.default.php app/config.php
Next, edit app/config.php file and replace all instances of the MariaDB username, password, and database name with the ones you created in step 5:
'db' => array(
'type' => 'mysqli',
'host' => 'localhost',
'port' => null,
'user' => 'freshrss',
'password' => 'password',
'base' => 'freshrss'
),
The final step is to configure Nginx to serve FreshRSS. Create a new configuration file for FreshRSS by running:
sudo nano /etc/nginx/sites-available/freshrss
Inside the file, paste the following contents:
server {
listen 80;
server_name your_domain_name;
root /srv/www/freshrss;
index index.php index.html;
client_max_body_size 1m;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Replace 'your_domain_name' with your Nginx server's domain name or IP Address. Save changes using CTRL + X.
Next, create a symlink for the configuration file by running the following command:
sudo ln -s /etc/nginx/sites-available/freshrss /etc/nginx/sites-enabled/
Finally, restart Nginx to make the changes take effect:
sudo systemctl restart nginx
That's it! You've successfully installed FreshRSS on NixOS. You can access FreshRSS by visiting 'your_domain_name' in your web browser. The first time you access the site, you'll be asked to create an admin account. Follow the prompts to get started with using FreshRSS!
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!