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.
First, you should update list of available packages.
sudo apt-get update
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
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
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.
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.
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
Congratulations! Everything is now set up to use TTRSS. That said, there are still some things you can do to improve this tool.
There is an Android client available on Google Play. To install it, go to Actions -> Preferences and check “Enable API access”.
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.
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.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
@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:
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: 94.249.174.226 - - [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:
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 :]
Oh Dear!
I found out myself following this how-to: https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04
In /etc/php5/fpm/pool.d/www.conf change “listen = 127.0.0.1:9000” to “listen = /var/run/php5-fpm.sock”