How to Install Tiny Tiny RSS on NixOS Latest

This tutorial will guide you through the process of installing Tiny Tiny RSS on NixOS.

Prerequisites

Before proceeding, you need to ensure that your NixOS system is up-to-date and installed with the necessary packages to run Tiny Tiny RSS. You also need a web server like Apache or Nginx installed on your system.

Update Your System

sudo nix-channel --update
sudo nixos-rebuild switch

Install Required Packages

sudo nix-env -i php php-fpm php-curl php-mbstring php-xml php-json mysql

Download and Set Up Tiny Tiny RSS

In this section, we will download and configure Tiny Tiny RSS.

Download the Latest Version of Tiny Tiny RSS

Download the latest version of Tiny Tiny RSS from the official website.

wget https://git.tt-rss.org/fox/tt-rss/archive/master.tar.gz

Extract Tiny Tiny RSS

Extract the downloaded file in the web server's root directory.

sudo tar zxvf master.tar.gz -C /var/www/

Set Permissions

You need to set the permissions so that the web server user can read and write files to the Tiny Tiny RSS directory.

cd /var/www/tt-rss-master/
sudo chown -R www-data:www-data ./cache ./feed-icons ./lock ./plugins.local ./themes.local .
sudo chmod -R 777 ./cache ./feed-icons ./lock ./plugins.local ./themes.local .

Configure Nginx

Create a new Nginx virtual host configuration file.

sudo nano /etc/nginx/conf.d/tt-rss.conf

Add the following lines to configure the virtual host:

server {
    listen       80;
    server_name  EXAMPLE.COM;
 
    location / {
        root   /var/www/tt-rss-master/;
        index  index.php;
    }
 
    location ~ \.php$ {
        fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
}

Replace EXAMPLE.COM with your domain name and save the file.

Restart Nginx

Restart the Nginx server to apply the changes.

sudo systemctl restart nginx

Configure MySQL

Create a new database and user for Tiny Tiny RSS.

sudo mysql -u root -p
mysql> CREATE DATABASE tt_rss;
mysql> CREATE USER 'tt_rss_user'@'localhost' IDENTIFIED BY 'P@ssword';
mysql> GRANT ALL PRIVILEGES ON tt_rss.* TO 'tt_rss_user'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> exit

Configure Tiny Tiny RSS

Copy the configuration file and edit it with the necessary settings.

cd /var/www/tt-rss-master/
cp config.php-dist config.php
sudo nano config.php

Set the database details and other configuration options as needed:

define('DB_TYPE', 'mysql');
define('DB_HOST', 'localhost');
define('DB_USER', 'tt_rss_user');
define('DB_NAME', 'tt_rss');
define('DB_PASSWORD', 'P@ssword');

Save the file and exit.

Access Tiny Tiny RSS

Finally, you can access Tiny Tiny RSS by navigating to your domain name in your web browser.

http://EXAMPLE.COM/

Congratulations! You have successfully installed Tiny Tiny RSS on NixOS.