+5 votes
935 views
How to install Tiny Tiny RSS on Linux Ubuntu

in Guides by (552k points)
reopened | 935 views

1 Answer

+3 votes
Best answer

What is Tiny Tiny RSS and what is it for?
How to install Tiny Tiny RSS on a Linux Ubuntu server.
Configure automatic update of RSS feeds.
Previous server configuration.
Tiny Tiny RSS (TTRSS) script installation.
Create a service to update the feeds.
Create a cronjob to update the feeds.
Simple background update method (available in versions 1.7.0 and higher).

The number of web pages increases day by day and more and more sources we should consult to keep updated. To lighten this task of receiving the latest news in an orderly manner, the RSS (Really Simple Syndication) system was born, with which to share information through the web pages. With this need in mind, we have decided to write a guide on how to install Tiny Tiny RSS on a Linux Ubuntu 16.04 server .

image

To install Tiny Tiny RSS the ideal is to have a VPS or dedicated server and although it can work in shared hosting, it is not ideal. We are going to use a cheap VPS server in which we already have a basic installation of a LAMP environment (Linux + Apache + MySQL + PHP) ready to use. We assume that the reader has access to the system shell through SSH or otherwise.

What is Tiny Tiny RSS and what is it for?

Tiny Tiny RSS is a script programmed in PHP that works as an RSS reader to which we can add all our sources of information. It is a free and open source script that is available on GitLab . In addition, it also allows us to create our own RSS feed with all the information we decide to publish on it .

The true potential of Tiny Tiny RSS is in its API, which allows us to access from an external client , be it a plugin for a browser, an Android application, etc. In this way we keep our sources of information centralized on a single server.

Another feature is the support for plugins and themes, which adds great customization possibilities.

How to install Tiny Tiny RSS on a Linux Ubuntu server.

We start with the previous configuration of the server, since this script has a series of requirements that we must meet. We are going to use Apache as an HTTP server in an Ubuntu 16.04 operating system and we assume that there is a functional installation of MySQL or MariaDB .

Previous server configuration.

First of all we will need a version of PHP 5.4 or higher , we have performed our tests with PHP 7. Our PHP installation needs to have the following modules installed:

  • JSON (extension installed and enabled by default in PHP) .
  • XML
  • mbstring
  • fileinfo (extension installed and enabled by default in PHP) .
  • cURL (installation is not mandatory but if highly recommended, better to install) .
  • GD
  • intl (PHP extension required for internationalization support) .

At this point, to install the necessary PHP extensions in Ubuntu we would use the following command:
sudo apt install php-xml php-mbstring php-curl php-gd php-intl

Restart apache with the sudo systemctl restart apache2 or service apache2 restart command.

To unzip the script package we will need unzip installed and to install it we execute the command:
sudo apt install unzip

We have our Apache server with the modules installed and we can proceed to install the Tiny Tiny RSS (TTRSS) script .

Tiny Tiny RSS (TTRSS) script installation.

To download the Tiny Tiny RSS script we can use git , but to not install more additional programs on the server, we will download the latest version available with the command:
sudo wget https://tt-rss.org/gitlab/fox/tt-rss/repository/archive.zip

Unzip the downloaded file:
sudo unzip archive.zip

We assume that /var/www/html is a public folder accessible from the browser, so we move the folder with the script files there:
sudo mv tt-rss.git /var/www/html/tt-rss

We can now access the Tiny Tiny RSS installer from the browser:
http://vozidea.com/tt-rss/install/

This installer asks us for a username, password and database, which after entering them we can verify its correct operation with the «Test Configuration» button . If we are using an empty database, you will be asked to initialize the database. We must also select the type of database, which in our case is MySQL.

In our case we have entered the data of our server and it is as in the following image:

image

The installer also tries to generate the config.php configuration file and writes it automatically if it has write permissions. If you do not have such permissions, you give us the contents of the config.php file so that we can create the file manually with nano .

We have to give write permissions to the following folders with the chmod command:
chmod -R 777 cache/images
chmod -R 777 cache/upload
chmod -R 777 cache/export
chmod -R 777 cache/js
chmod -R 777 feed-icons
chmod -R 777 lock

After creating this file, we can now access Tiny Tiny RSS with the admin user and the password password . This default password must be changed as soon as possible for security.

Configure automatic update of RSS feeds.

We only have one last step left, which is to configure the automatic update of RSS feeds. In this way when we access Tiny Tiny RSS we will have the updated publications and ready to read.

To configure the automatic update of RSS feeds in Tiny Tiny RSS we have three options:

  • Create a service (recommended option on VPS and dedicated servers. The update_daemon2.php script is update_daemon2.php ) .
  • Create a cronjob (alternative option and available on VPS and dedicated servers. The update.php script is update.php ) .
  • Use the simple background update method (use this option but we cannot use any of the above. No script is used) .

Tiny Tiny RSS developers provide us with two scripts in PHP to manage the update task, update.php and update_daemon2.php . The only difference is that the second one works in multiprocessing mode, so it will be the one we use to create a service. It should also be clear to us that these php scripts must be executed from the console, since if we execute them by calling them from the browser they will not work correctly.

Create a service to update the feeds.

We will configure the service under systemd since we are using Ubuntu 16.04. We execute the following commands:
sudo touch /etc/systemd/system/ttrss.service
sudo chmod 664 /etc/systemd/system/ttrss.service
sudo nano /etc/systemd/system/ttrss.service

We paste as file content:

[Unit]
Description=ttrss_backend
After=network.target mysql.service postgresql.service

[Service]
User=www-data
ExecStart=/var/www/html/tt-rss/update_daemon2.php

[Install]
WantedBy=multi-user.target

We must note that in our case the script path is /var/www/html/tt-rss/update_daemon2.php , each one must adapt the path to their situation.

We only have to load the script and start the service:
sudo systemctl daemon-reload
sudo systemctl start ttrss.service

Create a cronjob to update the feeds.

First we edit the list of tasks with the command:
sudo crontab -e

This will open the default editor and if there is not one chosen, in my case I always choose nano . Then I paste the line:
*/30 * * * * /usr/bin/php /var/www/html/tt-rss/update.php --feeds --quiet

This cronjob will run every 30 minutes and will automatically update RSS feeds from our sources.

We see that we use the PHP CLI binary, which in our case is located in the path /usr/bin/php (we can locate this route with the command which php ). We must also note that in our case the script path is /var/www/html/tt-rss/update.php , each one must adapt the path to their situation.

Simple background update method (available in versions 1.7.0 and higher).

This method will update RSS feeds when we access Tiny Tiny RSS from the browser, so there will be no update until we access the program.

To activate this option we must edit the config.php file and set the SIMPLE_UPDATE_MODE variable to true . For this we execute the command nano /var/www/html/tt-rss/config.php and edit:

define('SIMPLE_UPDATE_MODE', true);
// Enables fallback update mode where tt-rss tries to update feeds in
// background while tt-rss is open in your browser.
// If you don't have a lot of feeds and don't want to or can't run
// background processes while not running tt-rss, this method is generally
// viable to keep your feeds up to date.
// Still, there are more robust (and recommended) updating methods
// available, you can read about them here: http://tt-rss.org/wiki/UpdatingFeeds

So far this installation and configuration guide of Tiny Tiny Rss , which has proved to be more extensive than expected, but in reality it is a simple process. Although I wanted this guide to be as detailed as possible, if you have any questions you can use the comments.


by (3.5m points)

Related questions

+4 votes
1 answer
+4 votes
1 answer
asked Aug 9, 2019 in Guides by backtothefuture (552k points) | 203 views
+3 votes
1 answer
asked Aug 9, 2019 in Guides by backtothefuture (552k points) | 1k views
+4 votes
1 answer
+3 votes
1 answer
asked Aug 9, 2019 in Guides by backtothefuture (552k points) | 208 views
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users