Just now I converted from direct hosting tt-rss to the docker version. Here are a few notes, which I hope will be helpful to other people. Some of the things I’ve done may not be optimal, so I welcome comments.
I started with the docker-compose.yml and instructions at https://git.tt-rss.org/fox/ttrss-docker-compose/src/static-dockerhub/README.md, but don’t up
it yet.
Copy .env-dist
to .env
Create a user and group for tt-rss. I called mine “ttrss”. I used these commands. addgroup --system ttrss
then adduser --system --no-create-home --group ttrss
. Note what the gid and uid are, or run something like getent passwd ttrss
. Edit the .env
file and put in the appropriate ids.
Then use pwgen
or something to generate a password for postgres, and put that in there.
For my setup, the SELF_URL_PATH
is http://my.host.name/tt-rss
with http
, not https
, even though I am using a secure connection. The connection between my reverse proxy (non-dockerized) and TT-RSS is not encrypted.
Then I stopped my old tt-rss updater with systemctl stop tt-rss-local
. The method of stopping the updater will be different on different installs.
Then I exported the old postgres database with sudo -u postgres pg_dump --clean tt-rss | zstdmt > backup/tt-rss.db.zst
Of course use the appropriate database name for your install.
At this point I was finally ready to run docker-compose up -d
in the ttrss-docker directory.
Then I imported the database to the docker postgres with zstdcat ~/backup/tt-rss.db.zst | sudo docker exec -i ttrss-docker_db_1 psql -U postgres
Once the dockers were all running, I copied over my old plugins.local
and themes.local
to those directories in /var/lib/docker/volumes/ttrss-docker_app/_data/tt-rss
and ran chown -R ttrss.
on them.
At this point things mostly work, and a connection to http://localhost:8280
should give a SELF_URL_PATH
error.
I’m using Apache as my reverse proxy, because my setup predates widespread use of nginx.
<Location /tt-rss>
ProxyPass http://localhost:8280/tt-rss
ProxyPassReverse http://localhost:8280/tt-rss
ProxyPreserveHost On
</Location>
It didn’t immediately work, because I had to do some firewall tweaking so that the different tt-rss dockers could talk to each other. Depending on your setup, this might not be necessary.
After that, I was able to connect to https://my.host.name/tt-rss
and it worked. I logged in with my username, and all of my stuff (except some favicons) was there. A bunch of my feeds were red though, because the tt-rss docker couldn’t reach my rss-bridge docker.
There are probably lots of ways to make this work, but the easiest to me was to just put tt-rss into the same network as rss-bridge. Those feeds were already subscribed with http://172.29.0.2/?action=display&bridge=...
so all I need is to let tt-rss see that IP. To do that, I edited the docker-compose.yml
file and added
networks:
default:
external:
name: my-docker-network-name
At the top. Now tt-rss can talk to my other containers.
docker-compose down && docker-compose rm && docker-compose pull && docker-compose up -d
and the rss-bridge feeds are working again.
Much of that stuff has all been covered in other places, but some of the steps weren’t immediately obvious. None of it is magic, and this list is not a tested recipe, so don’t blindly copy and paste, but hopefully it will give people a general series of steps to follow.
There are different ways to do lots of these things, for example it might be better to add rss-bridge to the docker-compose.yml
file, or to bridge the two networks, but this is the way I chose to do it. I welcome criticism if there are better ways to do any of this.
If it doesn’t work, in my case all I have to do is revert the Apache changes, and I can go back to using my hosted version. If it does work, run systemctl disble tt-rss-local.service
or equivalent. Then in a week or so, rm -rf
the old hosted install and DROP
the database.
ETA: Oh yeah, don’t forget to exclude /var/lib/docker/volumes/ttrss-docker_app/_data/tt-rss/cache
from your backups.