User Tools

Site Tools


raspiserver2014:tinyrss

RasPi Home Server - Tiny RSS

If you're like me, you read news. When reading them always from the same place, it's easy too keep track via a local RSS aggregator, but that gets trickier when you're using different machines. There, the web-based Tiny RSS comes into its own.

The current version (as of 2013-12-29) is 1.11. Installation instructions are to be found at http://tt-rss.org/redmine/projects/tt-rss/wiki/InstallationNotes.

Download the tarball from the download link provided on the tt-rss.org page, using wget:

cd /var/www
wget https://github.com/gothfox/Tiny-Tiny-RSS/archive/1.11.tar.gz -O ttrss-1.11.tar.gz

Unpack that file:

tar zxvf ttrss-1.11.tar.gz

Create a symlink to the ttrss directory:

ln -s Tiny-Tiny-RSS-1.11 ttrss.hellsnet.lu

and create a corresponding virtual host entry in /etc/lighttpd/lighttpd.conf:

# VirtualHost
$HTTP["host"] == "ttrss.hellsnet.lu" {
  server.document-root = "/var/www/ttrss.hellsnet.lu/"
  accesslog.filename = "/var/log/lighttpd/ttrss.hellsnet.lu-access.log"
}

You now need to access the TTRSS installer on RasPi server using its proper name. Either you configure your network for the definitive name, otherwise add an entry in your /etc/hosts file (exists not only on Unix/Linux, but also on MacOS, Windows and probably others):

192.168.1.253 ttrss.hellsnet.lu

You'll need this for the duration of the installation. As soon as the RasPi is due for duty, you'll have to point that stuff via proper DNS / Port Forwarding / etc.

Now, you should be able to navigate to the installer, at http://ttrss.hellsnet.lu/install/ (insert your own domain name, obviously!).

You'll see a page asking about database configuration. Thus, we need to create the proper db and access to it in MySQL:

mysql -u root -p mysql
Enter password: 
[...]
mysql> create database ttrss;
mysql> grant all on ttrss.* to 'ttrss'@'localhost' identified by 'pass';
mysql> quit

Provide the coordinates you just created to the installer, and click “test the configuration”. You should get some successful tests. Now “initialize database” via the installer. This may take a little while. The installer generates the basic DB contents as well as a configuration file for TTRSS - which he can't save due to permission issues. Thus, we need to copy/paste that and create that file by ourselves.

Now, it should be possible to navigate to http://ttrss.hellsnet.lu/ and log in with the default credentials “admin/password” - obviously, you'll want to change the password right away! There are a few issues before though: some directories are not accessible as needed, we need to change permissions. Thankfully, TTRSS is very explicit about how to go about it:

cd /var/www/ttrss.hellsnet.lu
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

Now access should work. In “preferences”, then “personal data / authentication”, you can change the password.

Under the tab “users”, you can now create the “normal” (i.e., non-admin) user(s) you'll want for normal use of TTRSS. Don't forget defining the password(s) for the(se) user(s).

Now, you can disconnect as admin, and log back in as normal user.

The next step is to configure how TTRSS should update the newsfeeds. I personnally prefer the cron-based updates. The documentation is very explicit about not running things as root, so best run this as a normal (unix-)user. You may try something like (use your own useraccount and judgement):

su - eric
mkdir bin
cd bin
vi ttrss_update.sh

and insert this code:

#!/bin/bash
cd /var/www/ttrss.hellsnet.lu
/usr/bin/php /var/www/ttrss.hellsnet.lu/update.php --feeds > /home/eric/bin/ttrss_update.lastrun

Make it executable, and add it in crontab:

chmod +x ttrss_update.sh
export EDITOR=vi
crontab -e

In there, for updates every half hour, put in:

0,30 * * * * /home/eric/bin/ttrss_update.sh > /dev/null 2>&1

Try running the file straight from the command line to see whether it properly works; check the ttrss_update.lastrun contents.

As you now add newsfeeds, they should be updated automatically. While adding feeds, things may be somewhat slow, but that shouldn't be an issue during normal use.

Feel free to go through the configuration, to adapt the look and feel of the interface to your tastes.

NOTE: after a while I've decided that this application is too “heavy” for use on the RasPi. I've seen loads of over 5, mainly on mysql, while using it, and serious delays awaiting a response from the server.

raspiserver2014/tinyrss.txt · Last modified: 2014/02/23 16:45 (external edit)