TT-RSS with Synology Docker

Last modified date

Comments: 9

After the demise of the much loved Google Reader I’ve pretty much tried every RSS service out there and have always come back to TT-RSS (https://tt-rss.org/). It’s clean, very functional and give me everything I need to track all my RSS feeds. This is a guide to setting it up with the offical Docker container using the GUI front end of Synology Docker.

This tutorial is going to assume a number of basics are already in place but I’ll look to expand on these in future posts. Because Synology DSM doesn’t support docker-compose from the GIU we have to do each part by hand and it’s this docker-compose file that we’re going to replicate https://git.tt-rss.org/fox/ttrss-docker-compose/src/static-dockerhub/docker-compose.yml Four containers in total need to be set up.

‘DB’ Container

First of all we’re going to start with the database of which TTRSS recommend the use of Postgres.

  • Open Docker in DSM
  • Navigate to Registry and search for the Postgres official container and download it
  • Once downloaded go to Image and launch postgres. Give it a name you’ll recognise and click advanced settings
  • Select ‘Enable auto-restart’ This setting will start the container for you when you reboot your NAS
  • In the ‘Volume’ tab select a folder for the database to be saved with the mount path as ‘/var/lib/postgresql/data’
  • Network & Links should be left as the default values.
  • For ports enter a port number you wish to use, I’ve used a local port of 5434
  • Add the following entries into Environment (POSTGRES_DB, POSTGRES_USER & POSTGRES_PASSWORD). The values can be anything you want them to be.
  • Now start the container and check the logs to confirm all is well

‘APP’ Container

Now it’s time for the app (cthulhoo/ttrss-fpm-pgsql-static). Download it in the same way as you did for Postgres. You’ll then need to enter the following settings
Volumes – mount path of ‘/var/www/html’ to a folder on your NAS
Links – whatever you have called the postgres db with an Alias of ‘db’
Ports – leave this as Auto

Environment Variables……
DB_PASS – the password you used in the db container
DB_USER – the user you used in the db container
DB_NAME – the db name you used in the db container
DB_HOST – db
DB_TYPE – pgsql
OWNER_GID – see https://blog.oliroe.com/2020/04/17/how-to-obtain-your-puid-pgid/(opens in a new tab)
OWNER_UID – as above
SELF_URL_PATH – the address to be used to access the app in the fomat http(s)://ADDRESS:XXXX(port number if reverse proxy isn’t being used)/tt-rss/

‘UPDATER’ Container

Next is the container to update the feeds. Set up the container cthulhoo/ttrss-fpm-pgsql-static as before but add the command in the environment tab ‘/bin/sh updater.sh’ as shown below. This container also needs to be linked to the app and db container as shown

‘WEB’ Container

Next, set up a container for ‘web’ using the image called cthulhoo/ttrss-web. It requires the port you have used in the SELF_URL_PATH above against the container port 2015 and it requires a volume with mount path /var/www/html. Link the container to the ‘app’ container as below.

ALL SET

Once all those containers have been set up and running it’s now ready to be set up the application on the address used for SELF_URL_PATH.

http(s)://ADDRESS:XXXX(port number if reverse proxy isn’t being used)/tt-rss/

Oli

9 Responses

    • I’ve had success using MySQL before but this is the response by the developer in his FAQs

      What should I use – MySQL or PostgreSQL?
      tt-rss is developed with PostgreSQL in mind, MySQL support is an afterthought.

      If possible, consider using PostgreSQL for tt-rss. MySQL is supported but some minor features may be exclusive to Postgres and you’re going to see worse performance (because InnoDB is slow).

  1. Hi,
    Very good tutorial. However, I am a bit lost at the end. If I understood correctly, we must have 4 containers in total (‘db’, ‘app’, ‘updater’ and ‘web’). The container ‘updater’ is a dummy copy of ‘app’ (environment variables, volumes, etc.) except that it runs a feed update script, isn’t it? And Finally, for the ‘web’ container if I use the same ports as for the ‘app’ container, Docker tells me that this port is already used. If I remove the port mapping in the container ‘app’ then I can create the ‘web’ container however when accessing the web at http://ADDRESS: 8182/tt-rss/ I get “404 not found”. Can you help me ?

    • Hi

      Thanks for reading the blog, hopefully we can get you over the line. If you take a look at the docker-compose file you’ll see as you say that the ‘updater’ and ‘app’ are from the same image, the only difference being the execution command. The port used for both of these is irrelevant and can be anything you wish as long as they’re not the same (the docker-compose file doesn’t even specify the port). The port used to actually get to the app is from the ‘web’ container and it’s whatever you’ve chosen to map against 2015. I’ve made a couple of changes to the instructions to mention leaving the ports for the ‘app’ and ‘updater’ as AUTO. Hope this helps

  2. Hi Oli,

    thanks for your nice tutorial. I followed your instructions, but I can’t get it to work. Can you help me?
    The app-container seems to be stuck on an error and restarts every few seconds. These lines can be found in the log:

    + pg_isready -h postgres -U postgres
    postgres:5432 – accepting connections
    + id app
    id: unknown user app
    + addgroup -g 1000 app
    addgroup: group ‘app’ in use

    Does it have something to do with the uid and gid? I set the environment OWNER_UID = 1000 and OWNER_GID = 1000. These are the settings in the original docker-compose.yml.
    I also tried different IDs from an existing synology-user (uid = 1026, gid = 100). I found them using your other tutorial. But in both cases I get the same error.

    Thank You.

    • Hi.

      This usually happens because the individual containers a=can’t talk to each other. Could you go through the guide and make sure you have created the links i.e. the ‘APP’ container is linked to your database, the ‘UPDATER’ container is linked to the database and the ‘APP’ container etc etc

  3. Hi Oli,

    I checked the container links, they were set correctly. I deleted everything, started from scratch and used the exact naming as in your tutorial. Now it works!
    Before I used different ports and other container names than yours. I don’t know what the problem was before, but nevermind, now I’m happy!

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment