Setting up TT-RSS on Debian Wheezy

Ever since Google shut down it's Reader, I needed a way to read my RSS feeds. Lots of other options out there (GoReader, digg, the Old Readeretc), but none of them quite got it right at the beginning. TT-RSS was the closest thing which allowed me to quickly scan through the articles and go to ones that I wanted to read. Been running it on Ubuntu + Apache, but wanted to move it to Debian + nginx.

Tiny Tiny RSS Reader

  1. Follow instructions here except portion about nginx if you want the newest that supports SPDY
  2. Might need to install sudo apt-get install sudo
  3. Install nginx (mainline version)
  4. Fix nginx config:
    My working nginx config with

    # Tiny Tiny RSS Configuration
    server {
        listen 80;
        #server_name domainname www.domainname;
        root /var/www/ttrss;
        index index.php;
    
    
    
        error_log /var/log/nginx/ttrss.error.log;
        access_log /var/log/nginx/ttrss.access.log;
    
    
    location / {
        try_files $uri $uri/ /index.php;
    }
    
    
    location ~ \.php$ {
        #include fastcgi.conf; # don't use fastcgi_params
        include /etc/nginx/fastcgi_params;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
    }
    
    }
  5. restart/reload nginx sudo service nginx restart
  6. Visit http://<IP ADDRESS> to access your new TT-RSS Server
  7. If migrating from another installation and you have a large file to import/export, update nginx config in the server/location block

            # set client body size to 2M #
            client_max_body_size 2M; #SOMETHING LARGER
    
  8. Also have to update /etc/php5/fpm/php.ini to allow for larger files

            upload_max_filesize = 10M ;somethign larger
            post_max_size = 10M ;something larger
    
  9. Restart php sudo /etc/init.d/php5-fpm restart
  10. Add a start stop script to auto start updates 1
    a. sudo nano /etc/init.d/ttrss

    #!/bin/sh
    ### BEGIN INIT INFO
    # Provides:          ttrss
    # Required-Start: $network $remote_fs postgresql
    # Required-Stop:
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: starts ttrss
    # Description:       starts ttrss
    ### END INIT INFO
    
    
    NAME=ttrss
    PIDFILE=/var/run/ttrss.pid
    DAEMON="/usr/bin/php"
    DAEMON_OPTS="./update_daemon2.php"
    APPDIR=/var/www/ttrss
    USER=www-data
    
    
    case "$1" in
       start)
          echo -n "Starting daemon: "$NAME
          start-stop-daemon --start --chdir $APPDIR --background --quiet --chuid $USER --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
          echo "."
          ;;
       stop)
          echo -n "Stopping daemon: "$NAME
          start-stop-daemon --stop --chdir $APPDIR --quiet --chuid $USER --oknodo --pidfile $PIDFILE
          echo "."
          ;;
       restart)
          echo -n "Restarting daemon: "$NAME
          start-stop-daemon --stop --chdir $APPDIR --quiet --chuid $USER --oknodo --retry 30 --pidfile $PIDFILE
          start-stop-daemon --start --chdir $APPDIR --background --quiet --chuid $USER --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
          echo "."
          ;;
       *)
          echo "Usage: "$1" {start|stop|restart}"
          exit 1
    esac
    
    
    exit 0
    
  11. Save the file and make it executable sudo chmod +x /etc/init.d/ttrss
  12. Update the startup services sudo update-rc.d ttrss defaults
  13. Reboot the server to see if it works.

Other things to do