tt-rss with postgresql on uberspace

Last Updated: 2015-06-29

To install tt-rss using PostgreSQL as a database backend on uberspace hosting, you first have to set up Postgres. PostgreSQL is recommended, because you can use advanced filter rules for your feeds which are not available if you are using i.e. MySQL as a database backend.

This is done by running uberspace-setup-postgresql which creates all the stuff to get started with psql, but you still have to set some things up to get it to actually work with tt-rss.

First, create a database user, i.e. ttrss with

createuser -e -E -P -S ttrss

The -e switch echoes the command being sent to the server, the -E encrypts the stored password, -P asks you for a password to input and -S creates a role without superuser privileges. To create a database execute the following:

createdb ttrss -O ttrss "Database for Tiny Tiny RSS"

The -O sets the owner of the newly created database and inside the quotes you can add a comment.

The next step to do is to tell the PostgreSQL-server what kind of connections are allowed - to make it work with tt-rss you'll need to add the two following lines to your ~/postgresql/pg_hba.conf file:

# IPv4 local connections:
host ttrss ttrss md5
# IPv6 local connections:
host ttrss ttrss ::1/128 md5

Finally, you have to set a port for the connection in your ~/postgresql/postgresql.conf file:

listen_addresses = 'localhost'
port = 5432 #change this to sth different - most probably this port is already used!

As explained in the uberspace-wiki, you can also change your unix_socket_directory - but do not forget to change it in all places. i.e. also in:

  • postgresql.conf
  • .pgpass

To reflect your unix_socket_directory and port, you have to add the following lines to your .bashrc-file:

export PGHOST=/home/username/tmp_pq
export PGPORT=5432

When everything is set up, you should log-out and log-in again to your shell and restart your postgresql service with svc -iu ~/service/postgresql.

If you have set everything up like this, you can download the latest version of tt-rss via git

git clone tt-rss

into a subdirectory of your ~/html directory. Now proceed to install tt-rss by browsing to https://your.domain/tt-rss which will allow you to install tt-rss. How to configure automatic feed updates is already described nicely in the uberspace wiki.

Not yet rated