// Tutorial //

How To Install TTRSS with Nginx for Debian 7 on a VPS

Published on October 7, 2013
Default avatar
By Josef Gajd?šek
Developer and author at DigitalOcean.
How To Install TTRSS with Nginx for Debian 7 on a VPS


This tutorial is going to guide you through the installation process of Tiny Tiny RSS with nginx and PostgreSQL on Debian 7.0 VPS. For setting up TTRSS, you need two essential components: a web server and a database. As a web server, we are going to use nginx and as database PostgreSQL.

Prerequisite: Update Package List

First, you should update list of available packages.

sudo apt-get update

Step 1: Install PHP

To install PHP and all the needed modules, use the following command.

sudo apt-get install php5 php5-pgsql php5-fpm php-apc php5-curl php5-cli

Step 2: Install and Configure PostgreSQL

Install PostgreSQL:

sudo apt-get install postgresql

Now setup the database and user for TTRSS (replace yourpasshere with some random password. Write it down somewhere, you are going to need it later.):

sudo -u postgres psql
postgres=# CREATE USER "www-data" WITH PASSWORD 'yourpasshere';
postgres=# CREATE DATABASE ttrss WITH OWNER "www-data";
postgres=# \quit

Step 3: Install nginx

Install and start nginx:

sudo apt-get install nginx
sudo service nginx start

To verify if nginx is running, open your web browser and go to http://your.server.ip. If you see “Welcome to Nginx” message, your nginx is installed correctly.

Step 4: Setup TTRSS

Now head to https://github.com/gothfox/Tiny-Tiny-RSS/releases and select the version you want to install (if you are not sure about which version to select, then just get the newest one). Copy the link to tar.gz to the wget command below.

cd /usr/share/nginx
sudo wget -O ttrss.tar.gz http://your.link.here
sudo tar -xvzf ttrss.tar.gz
sudo rm ttrss.tar.gz
sudo mv Tiny-Tiny-RSS* ttrss
sudo chown -R www-data:www-data ttrss

To add the nginx config file:

cd /etc/nginx/sites-available
sudo nano ttrss

Paste following lines into the editor, press Ctrl+X and then Y to save the file. Modify line “server_name” to match your domain name or ip.

server {
    listen  80; ## listen for ipv4; this line is default and implied

    root /usr/share/nginx/ttrss;
    index index.html index.htm index.php;

    access_log /var/log/nginx/ttrss_access.log;
    error_log /var/log/nginx/ttrss_error.log info;

    server_name name.here;

    location / {
        index           index.php;

    location ~ \.php$ {
        try_files $uri = 404; #Prevents autofixing of path which could be used for exploit
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        include /etc/nginx/fastcgi_params;


To enable this config file (and disable the default welcome page):

cd /etc/nginx/sites-enabled
sudo rm default
sudo ln -s ../sites-available/ttrss ttrss

Restart nginx:

sudo service nginx restart

Head to http://your.server.ip. You should see the Tiny Tiny RSS install page.

Fill fields as follows:

Database type: Select PostgreSQL

Username: www-data

Password: The password you used during Step 2

Database Name: ttrss

Hostname: leave blank

Port: 5432

Press “Test configuration” button, then “Initialize database” and then “Save configuration”. Now your TTRSS is configured. Go to http://your.server.ip and login to default admin account (Username: “admin” Password: “password”). In the top-right go to Actions->Preferences. You can change TTRSS settings there. It is recommended to create a new user account and use it for RSS reading instead of admin account. Also, do not forget to change your admin password to a different one from default.

Step 5: Add Automatic Feed Update to cron

For TTRSS to periodically check and update feeds, open a text editor:

sudo nano /etc/crontab

Paste the following lines to the end of the file. This tells cron to call update.php every 30 minutes.

*/30 * * * * www-data /usr/bin/php /usr/share/nginx/ttrss/update.php --feeds --quiet

What Now?

Congratulations! Everything is now set up to use TTRSS. That said, there are still some things you can do to improve this tool.

Install Android client

There is an Android client available on Google Play. To install it, go to Actions -> Preferences and check “Enable API access”.

Install Chrome Client

You can get TTRSS notification icon on https://chrome.google.com/webstore/detail/tiny-tiny-rss-notifier/pehjgkflglcdbmhkjjpfjomemgaaljeb. This add-on is going to show the amount of unread messages on the right side of your Chrome omnibox.

Change Theme

On the TTRSS forum, there is quite a lot of themes to download. To install them, just copy the theme as CSS to /usr/share/nginx/ttrss/themes and then select it in Preferences.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in our Questions & Answers section, find tutorials and tools that will help you grow as a developer and scale your project or business, and subscribe to topics of interest.

Sign up
About the authors
Default avatar
Developer and author at DigitalOcean.

Still looking for an answer?

Was this helpful?

@alinux @matt7277 I had the same problem with blank page on Debian 8 droplet. Turns out, it was because of changed fastcgi_params file in nginx package. Solution - add this line to /etc/nginx/fastcgi_params:

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

Don’t forget to restart nginx after.

@alinux @matt7277 I had the same problem with blank page on Debian 8 droplet. Turns out, it was because of changed fastcgi_params file in nginx package. Solution - add this line to /etc/nginx/fastcgi_params:

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

Don’t forget to restart nginx after.

Hi! After following step by step this tuto, at point “Head to http://your.server.ip.”, I reach a complete blank page…

Impossible to continue with ttrss install. Nginx doesn’t seem to be the issue, it worked fine with default page.

Sorry I can’t give you precise details, I’m completely novice in server administration and web development. I’m doing my tests on a Raspberry Pi B+ with Raspbian Jessie

No error in log file and ttrss_access.log shows only this: - - [16/Dec/2015:00:51:42 +0000] “GET / HTTP/1.1” 200 31 “-” “Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.4.0”

It looks like it’s just NOT loading…

I wonder if those files that I got with - git clone https://tt-rss.org/git/tt-rss.git - are good ones?

Thanks for your help !

Reporting back as I have had some success and feel it could help others:

  • Instructions above don’t seem to work for me with Debian 8.3 x64 Droplet
  • Instructions above seem to work just FINE for Debian 7.9 x64 Droplet

That is all :)

Hey @alinux I am experiencing the same problem! i.e. Nginx loads fine from my Droplet, however I see a blank white page when I use the Git Clone command to download the TT-RSS files (because the code is no longer on github!)

Anyone figure out a way to work around this?

Also worth mentioning if you use Debian 8 you will need to install the sudo apt using apt-get install sudo. Otherwise you won’t be able to use sudo (clearly) or visudo

Perhaps this problem is related tome using Debian 8 versus 7?

I’ve tried this tutorial several times, but I keep getting tripped up in the nginx config file part.

I’m not using a domain at this time, opting for now just to use the public IP of my droplet. Is there a special way to put that in under the “server_name name.here;” part?

Also, I was a bit tripped up by how to install TTRSS, since it’s not hosted in the same way any more, but I think I managed to work past that.

Followed this article & had TTRSS up in > 15 minutes. Works perfectly on Ubuntu Server 14.04. Thanks!

Thank you for the helpful article. Apologies for my ignorance, as I am completely new to networking, Linux, and web development, but what if I wanted to install TT-RSS in a subdirectory? What would I do different? I appreciate your time; thank you.

@shicky256: Thanks, I’ll update the article :]

@Alejandro: Glad it’s working now :]