Tiny Tiny RSS (TT-RSS) behind Traefik Reverse Proxy

I almost despaired when trying to get the popular RSS server Tiny Tiny RSS working with Traefik. I’ve also tested other RSS reader, but none have pleased me as much as ttrss.

Since I got it working after a long time of testing, I would like to show you here how I got it working.

In my example, the docker configuration files are located unter /opt/containers/.

So first we navigate to this path and clone the GIT repository:

cd /opt/containers

git clone https://git.tt-rss.org/fox/ttrss-docker-compose.git ttrss && cd ttrss

Then we copy the configuration file and adjust the content:

cp .env-dist .env

nano .env

TTRSS_DB_USER=postgres
TTRSS_DB_NAME=postgres
TTRSS_DB_PASS=
TTRSS_SELF_URL_PATH=https://ttrss.example.com/tt-rss
HTTP_PORT=127.0.0.1:8280

So this means in my case I’ve created a subdomain ttrss.example.com which will then be used by traefik to set up the certificate etc.

Now we need to create a docker-compose.override.yml file where we add the traefik labels and network settings.

nano /opt/containers/ttrss/docker-compose.override.yml

version: '3'

services:

  web-nginx:
    networks:
      - proxy
      - default
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=proxy"
      - "traefik.http.routers.ttrss.entrypoints=http"
      - "traefik.http.routers.ttrss.rule=Host(`ttrss.example.com`)"
      - "traefik.http.services.ttrss.loadbalancer.server.port=80"
      - "traefik.http.middlewares.ttrss-secured.redirectscheme.scheme=https"
      - "traefik.http.routers.ttrss-secured.rule=Host(`ttrss.example`)"
      - "traefik.http.routers.ttrss-secured.entrypoints=https"
      - "traefik.http.routers.ttrss-secured.tls.certresolver=production"

networks:
  proxy:
    external: true

Publish the configuration file:

source .env

…and start the container:

docker compose up

Now the website should be reachable over https://ttrss.example.com/tt-rss/.

When going productive, of course it makes more sense to use

docker compose up -d

5 Gedanken zu „Tiny Tiny RSS (TT-RSS) behind Traefik Reverse Proxy

  1. Hi,

    I was following your example very, very closely. But for some weird reason I get an error:
    web-nginx_1 | 2022/05/18 18:50:55 [error] 27#27: *41 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: „GET /tt-rss/index.php HTTP/1.1“, upstream: „fastcgi://172.20.0.5:9000“, host: „localhost“
    web-nginx_1 | 127.0.0.1 – – [18/May/2022:18:50:55 +0000] „GET /tt-rss/index.php HTTP/1.1“ 502 157 „-“ „curl/7.80.0“

    I guess it means that web-nginx can’t talk to app, because it requests the index.php on the proxy network, not the internal one.

    That does not happen if I expose the port directly without traefik.

    What am I doing wrong?

  2. Hi!

    It is not necessary to adapt the original docker-compose.yml.
    Instead you create a docker-compose.override.yml file where you put the network definitions and labels for traefik.
    See https://git.tt-rss.org/fox/ttrss-docker-compose.wiki.git/tree/Home.md#how-do-i-customize-the-yml-without-commiting-my-changes-to-git
    This works really well and is independent from the source code – important during updates.

    Needless to say that you can also add other changes there like mounting plugins.local to filesystem for easier installation of custom plugins.

    Br, Alex.

Schreibe einen Kommentar zu Blechpirat Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.