Install Tiny Tiny RSS with NGINX and PostgreSQL!


Few days back google reader was discontinued, you can read more here , and many happy users are left to find alternative. I have installed Tiny Tiny RSS on my debian server hosted with , it is small VPS only 128 MB RAM with 128 burst, but it was more then enough for this setup, and it costs only 15$ per year. Ofcourse you can use same way to setup this on debian based desktop, or even on virtual box debian based server. In this tutorial I will show you all steps I have done and for me it worked, I hope that it will work for you too.

Installing Prerequisites

From your server providers control panel reinstall server with debian7 minimal image. I have used 32 bit image since my server has only 128 MB RAM. If you are on desktop you don't need this step. Some packages that I always install on my server:

apt-get update
apt-get install nano sudo htop iftop

If you are on server always start with some ssh security, you have article about it here: .

Install and configure NGINX, PHP and PostgreSQL

First install nginx, php and postgresql with command:

apt-get install nginx php5-fpm php5-cli php5-curl php5-gd php5-mcrypt php5-cgi php5-pgsql postgresql-9.1

Now we will configure nginx first, go to nginx sites-enabled directory, and move or delete default file:

cd /etc/nginx/sites-enabled
mv default /home/your_user

then create new 'default' nginx config:

nano default

and add following to that file:

server {
        listen   80;
        root /var/www/ttrss/;
        index index.html index.htm index.php;


        location / {
                        try_files $uri $uri/ /index.html;

        location ~ \.php$ {
                        fastcgi_pass unix:/var/run/php5-fpm.sock;
                        fastcgi_index index.php;
                        include fastcgi_params;

you could edit your default nginx config, but its easier this way. Don't forget to change '' to your domain, or if you are on desktop you can use 'localhost'.

Configure php-fpm, lets open file /etc/php5/fpm/php.ini:

nano /etc/php5/fpm/php.ini

find and edit line:

set: cgi.fix_pathinfo = 0;

also open file /etc/php5/fpm/pool.d/www.conf and check that line "set: listen = /var/run/php5-fpm.sock" is there if not add it.

Restart nginx and php-fpm:

service php5-fpm restart
service nginx restart

Setup PostgreSQL user and database, just copy and paste commands:

su - postgres
psql template1
CREATE USER your_db_user WITH PASSWORD 'your_users_pass';

change 'your_db_user' and 'your_users_pass' with user and pass you want to use to install Tiny Tiny RSS. Restart posgresql:

service postgresql restart

To check if everything is fine you can do test login to db:

psql -d ttrss -U your_db_user

Install Tiny Tiny RSS

First create directory /var/www, and give www-data user owner privileges for directory:

mkdir /var/www
chown www-data:www-data /var/www/

Now to install you can use 'git clone' or wget witch I will use, just copy and paste commands bellow:

cd /var/www
tar zxfv 1.9.tar.gz
mv Tiny-Tiny-RSS-1.9/ ttrss
sudo mv ttrss /var/www
cd /var/www/ttrss
chmod -R 777 cache/images && chmod -R 777 cache/export && chmod -R 777 cache/js && chmod -R 777 feed-icons && chmod -R 777 lock

In time of writing last version of TTRSS was 1.9 you can check on there site for last version and change above lines accordingly.

Now visit your web address and finish installation or for desktop http://localhost , and when you enter everything in that form click 'test configuration' button, at this point if server is setup the right way you may continue. Installation wont be able to make 'config.php' file automatically, but you will see on install screen all data that you need, copy that data to clipboard and on your server:

nano /var/www/ttrss/config.php

create 'config.php' file and copy data from clipboard. At this point you may go to and login with user 'admin' and password 'password', don't forget to change this password when you login.

After this installation my server uses only 32MB of RAM, but we will see how it goes when I put more feeds in it, here is screen:


There are many alternatives for google reader, what I love about Tiny Tiny RSS is that its web based, that means you can access it from anywhere and anything that has web browser.

Comments !