Skip to content

Instantly share code, notes, and snippets.

@yeokm1
Created May 16, 2015 09:42
Show Gist options
  • Save yeokm1/04f1430cb8a81d86b1ef to your computer and use it in GitHub Desktop.
Save yeokm1/04f1430cb8a81d86b1ef to your computer and use it in GitHub Desktop.
How to install Tiny Tiny RSS on Ubuntu

Adapted from here

  1. Install all packages
sudo apt-get update
sudo apt-get install php5 php5-pgsql php5-fpm php-apc php5-curl php5-cli postgresql nginx git
  1. Configure PostgresSQL
sudo -u postgres psql
postgres=# CREATE USER "www-data" WITH PASSWORD 'yourpasshere';
postgres=# CREATE DATABASE ttrss WITH OWNER "www-data";
postgres=# \quit
  1. Start nginx
sudo service nginx start
  1. Install TT-RSS
cd /usr/share/nginx
git clone https://github.com/gothfox/Tiny-Tiny-RSS.git tt-rss
sudo mv tt-rss ttrss
sudo chown -R www-data:www-data ttrss
  1. Setup TT-RSS
cd /etc/nginx/sites-available
sudo nano ttrss

Paste the following into 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
  1. Setup TT-RSS

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.

  1. Add automatic update with cron
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment