Installing Tiny Tiny RSS and Using It With iOS Devices

Background

Individually checking each blog on the growing list of blogs that I follow was becoming tedious. So I thought I would use RSS feeds to get notified when new articles appeared. Within days of that epiphany, as I’m looking for a means to implement a solution, fellow CALUG member Chuck Frain posted about TT-RSS as a potential solution to Google’s announced closure of Google Reader. So I thought I would give TT-RSS a try. This blog post describes my first tentative steps setting up my own RSS aggregator using TT-RSS on a Debian Linux shared hosting environment and then getting it working with OS X and iOS browsers. I gave a talk at CALUG on setting up TT-RSS based on this experience. You can find a copy of the presentation here.

To quote tt-rss.org [], “Tiny Tiny RSS is an open source web-based news feed (RSS/Atom) reader and aggregator, designed to allow you to read news from any location, while feeling as close to a real desktop application as possible.”

Decisions

The first decision I had to make was whether to host TT-RSS internally or externally. I chose to host it externally on the Internet so that there was no need to open up any ports into my network.

Setting Up TT-RSS

To set up TT-RSS I followed instructions at tt-rss.org [] and Lifehacker [].

TT-RSS uses PHP 5.3+ and needs a web server to host it and either a MySQL or Postgres a database. I choose to host it on a Debian Linux shared web hosting server using Apache and MySQL.

Setting Up The Host

Having decided to host externally I created a subdomain http://rss.example.com to one of the domains I host at Dreamhost []. (Needless to say the URLs, and usernames in this article are examples.) I also created a new user tt-rss-host-user to be the owner of this subdomain. The Dreamhost robot did its magic and the web root directory rss.example.com was placed in the home directory of tt-rss-host-user.

SSH Passwordless Access

Once the new user account for tt-rss-host-user was available I scp my id_rsa.pub to ~/.

$ scp .ssh/id_rsa.pub tt-rss-host-user@rss.example.com:~/

I then created the directory ~/.ssh and moved id_rsa.pub into authorized_keys and then set the required directory and file permissions:

$ mkdir .ssh  
$ mv id_rsa.pub .ssh/authorized_keys  
$ chmod 700 .ssh/  
$ cd .ssh/  
$ chmod 600 authorized_keys

Setting Up The Database

I used the Dreamhost MySQL panel to create a MySQL database example_ttrss with the database user. The database was given the hostname mysql.rss.example.com.

Installing Tiny Tiny RSS

I downloaded Tiny-Tiny-RSS-1.7.5.tar from tt-rss.org [] on to my local machine. I then scp it to ~/ on server. I then unzipped the tar and moved the files into the web root:

$ tar xvf Tiny-Tiny-RSS-1.7.5.tar  
$ mv Tiny-Tiny-RSS-1.7.5/* rss.example.com/  

I then setup the MySQL database schema:

$ cd ~/rss.example.com/schema/  
$ mysql -u example_db_user -p -h mysql.rss.example.com sysint_ttrss < ttrss_schema_mysql.sql  

I created the PHP configuration file by copying, renaming and editing the default that comes with the installation:

$ cp config.php-dist config.php  
$ vi config.php  

I altered the following parameters to link to the MySQL database, set the site’s URL and enable simple update mode:

define(‘DB_TYPE’, “mysql”); // or mysql
define(‘DB_HOST’, “mysqlhost.mydomain.com”);
define(‘DB_USER’, “ttrssdbusername”);
define(‘DB_NAME’, “ttrssdb”);
define(‘DB_PASS’, “strongpassword”);

define(‘SELF_URL_PATH’, ‘http://yourserver/tt-rss/');

define(“SIMPLE_UPDATE_MODE”, true);

I then used a browser to log into http://rss.example.com as user admin with the password “password”. I changed the password by clicking the Actions menu at the top-right corner of the screen, selecting the Preferences menu item, and selecting the Personal Data/Authentication bar near the top of the screen to open the password change screen.

TT-RSS can also use One Time Passwords & Google Authenticator to provide two factor authentication to the user’s account.

Once the administrator account was secure I used the administration pane to create a user account with lower privileges for the day-to-day viewing of the RSS feeds.

Refreshing RSS Feeds [Added To Post On April 28, 2013]

Initially I configured TT-RSS to use its simple update mode to refresh the RSS feeds. In simple update mode TT-RSS refreshes the feeds when a user’s browser accesses the TT-RSS site to read the RSS feed articles. This does mean that there can be some delay before TT-RSS is showing the latest set of available articles. However this client-side refreshing of the RSS feeds is the easiest to use when you do not have access to cron on the server that is hosting TT-RSS.

Simple Refreshing Of RSS Feeds

To enable simple update mode edit the PHP configuration file:

$ vi config.php  

And enable simple update mode by setting the SIMPLE_UPDATE_MODE parameter to true:

define(“SIMPLE_UPDATE_MODE”, true);

cron Refreshing Of RSS Feeds

I have now revised my TT-RSS installation and enabled cron to refresh the RSS feeds. I am fortunate that my hosting provider, Dreamhost [], gives access to cron through a web-based administration panel. So for me, enabling server-side RSS feed refresh was as simple as ensuring simple update mode was disabled in the PHP configuration file:

$ vi config.php  

And disable simple update mode by setting the SIMPLE_UPDATE_MODE parameter to false:

define(“SIMPLE_UPDATE_MODE”, false);

Then setting a cron job for the user tt-rss-host-user and setting the “Command To Run” in the cron panel to:

/usr/local/bin/php-5.3 /home/tt-rss-host-user/rss.example.com/update.php --feeds --quiet  

I set the cron job to run every 15 minutes. (I enabled “Use Locking” so that the cron job could not be run more than once at a time.)

Your mileage may vary! Your ability to set up cron will depend on the access you have been given by your hosting provider and the method you use to set up the cron job may also be different.

Updating TT-RSS

The Tiny Tiny RSS: New Releases feed is visible by default on all TT-RSS feed accounts that are created so you are easily informed when an update is available. There are a number of ways to update. I enabled the Updater plugin and used the browser to update my TT-RSS installation from v1.7.5 to v1.7.8. Edit config.php to include Updater in the list of plugins:

define(‘PLUGINS’, ‘auth_remote, auth_internal, digest, mobile, updater, note’);

The steps to update using the browser are straight forward:

  1. Login to the shared host as user tt-rss-host-user and back up directory ~/rss.example.com;
  2. Log into http://rss.example.com as admin using browser;
  3. Click update in the Preferences menu to start the update and follow the prompts;
  4. Once the update is complete, log back into http://rss.example.com as admin using the browser and, if prompted, start the database update.

For me, going from v1.7.5 to 1.7.8 resulted in some minor changes in the preferences, including the default hiding of feeds when all the articles in a feed are read.

Browsing From OS X

TT-RSS can be accessed with any of the current browsers. There is also an Android client app available to access the RSS feeds. Using Safari on OS X to browse the RSS feeds worked fine:

TT-RSS in Safari on OS X

Browsing From iOS [Updated Post On June 30, 2013]

[As of v1.7.9 the digest and mobile plugins that I describe below have been moved out of the main git repository and placed in another git repository. I have updated the blog post below to show the additional steps that are needed to install these plugins.]

Download the digest and mobile plugins from GitHub and copy the plugins into the TTRSS plugins folder in the web root:

$ cd ~  
$ clone git://github.com/gothfox/Tiny-Tiny-RSS-Contrib.git  
$ cp -rv Tiny-Tiny-RSS-Contrib/plugins/digest/ rss.example.com/plugins/  
$ cp -rv Tiny-Tiny-RSS-Contrib/plugins/mobile/ rss.example.com/plugins/  

In order to browse the RSS feeds with an iPad I included the digest plugin in the list of plugins in config.php:

define(‘PLUGINS’, ‘auth_remote, auth_internal, digest, mobile, updater, note’);

TT-RSS in Safari on an iPad

In order to browse the RSS feeds with an iPhone I included the mobile plugin in the list of plugins in config.php:

define(‘PLUGINS’, ‘auth_remote, auth_internal, digest, mobile, updater, note’);

TT-RSS in Safari on an iPhone

Conclusions

I am pleased with Tiny Tiny RSS. It allows me to:

  • Keep up with a set of regularly read blogs;
  • Keep in sync across a variety of platforms.

Tiny Tiny RSS provides straight forward setup in a Debian LAMP shared hosting environment. Tiny Tiny RSS also provides two-factor authentication.

Avatar
Gareth Digby
Curriculum Architect

A blog by a Mac User.

Related