Sunday, March 17, 2013

Google Reader replacement

Google recently announced it is shutting down their Google Reader service on June 1st. I'm a long time user of this service, like many people, and I was a little dismayed to hear this news. I've been using Google Reader probably ever since it first came out in 2005. One thing I really like about it is because it is a web-based service, it is available anywhere you can use the web. So I don't have to keep separate programs on each computer I use and my cellphone.

There is a good alternative to replicate this functionality.. Tiny Tiny RSS. This is a web-based RSS reader that can be installed on your own hosting or other server. I actually set it up on an old computer at my house and it runs just fine. It is a very easy setup too, if you have a little bit of technical skill. It requires Apache, PHP and MySQL.

Very basically the steps can be summed up as:

  • Acquire the files from the website https://github.com/gothfox/Tiny-Tiny-RSS/archive/1.7.4.tar.gz
    • You might notice it's on github. I just did a  git clone https://github.com/gothfox/Tiny-Tiny-RSS  in my home directory on my Ubuntu server which made a local copy of the most recent tree. Then I made a tt-rss subdirectory under /var/www/ and copied the whole thing there.
    • If you download the tar.gz instead, make sure you unpack that. You could probably unpack it directly into /var/www/. 
  • Make a database and database user in MySQL. It will also work with PostgreSQL but since I already had MySQL, I used that instead. There are several ways you can do this. I used a local copy of phpMyAdmin.
  • Once you have the database and database user setup with correct permissions, install the schema.
    • Look under the schema directory for a file named like "ttrss_schema_mysql.sql" if you are using MySQL.
    • Copy the whole file and paste it into a SQL window in phpMyAdmin. Then run it.
    • This will create all of the appropriate tables, views, etc that Tiny Tiny RSS uses.
  • Go back to your shell and make a copy of config.php-dist in the root of the app. Name it config.php and then edit it.
    • It's a good idea to go through each option and at least read them. The most major options that you have to worry about are the ones you need to set for the database server. Make sure you set IP, database, username, and password.
    • I believe you should enable multi-user mode to use the built-in user account options. If not, you may need to setup authentication in Apache.
  • At this point you can try to open it in your web browser.
    • I had to chmod several files so they could be read/written to. You might even need to chown all of the files to your Apache user such as www-data.
    • Default password is admin/password. Everyone knows this so you should change it right away. Especially if you set it up somewhere where it is Internet accessible. Even if not, it would be best to change it anyways.
    • Rather than using the admin account in normal usage, it is even better if you make a user account and save the admin account for administration.
  • Figure out how you want it to update your RSS feeds. See UpdatingFeeds on the wiki
    • The recommended way is to run update.php -daemon or update_daemon2.php from the shell or from a shell script. These will continuously run in the background.
    • Run update.php -feeds in your crontab occasionally to update your feeds.
    • There's a command in the config.php you can set so while you are browsing via the web interface, it will try to update your feeds. If you don't visit for a while using this method you could miss some entries.
    • If you don't run one of these methods, nothing will ever show up in your feeds.


So once you set this up, what then? If you already have an active Google Reader account, it is possible to import all of your existing feeds. Even the categories you have each feed in can come across!

  • Log into your Google Reader account.
  • Click on the gear shaped icon near the upper right and choose Reader settings.
  • Click on the Import/Export button.
  • Click on Download your data through Takeout
  • Click on CREATE ARCHIVE button.
    • This can take several minutes to run.
    • Once it is done, click on the Download button to download it.
    • The file I downloaded was around 10MB, yours might vary. More than just subscriptions, it also contains all the items you shared, starred, liked, and more in JSON format. That stuff isn't really useful right now unless you can make a program to do something with it.
    • subscriptions.xml is the important file.
  • Log into your Tiny Tiny RSS site in your browser at this point.
  • In the very top right there's a menu named "Actions...", click that.
  • Then click Preferences.
  • Click on the Feeds tab.
  • Look for a bar that says "OPML" and click on it to expand it.
  • Click on "Choose File" and pick your subscriptions.xml
  • Finally click on "Import my OPML"
It should import all of your existing feeds and already have them in all of your original categories.

Now there is a good Android app made by the original author of Tiny Tiny RSS with a 7 day limitation. Despite it being open source, he would like you to pay $2 to unlock it for unlimited use. This application requires access to an instance of Tiny Tiny RSS such as one you just setup or a public one to operate. Someone else has forked the source as TTRSS-Reader which is similar but has a few nicer features and isn't limited to a 7 day trial like the other one. I recommend it.

To use either one, make sure you enable the external API in the options of your instance. Look in Preferences again for that.

No comments:

Post a Comment