Lorenzo's blog

Technical reference about work stuff

Self Hosting FreshRSS using containers

🗓️ Date: 2022-07-05 · 🗺️ Word count: 356 · ⏱️ Reading time: 2 Minute

FreshRSS is an open-source self-hosted RSS feeds aggregator. It comes with a web GUI but supports many mobile clients and it’s the ideal solution to centrally manage RSS feeds on many devices.

image alt text

This guide explains how to install it on your own server. The configuration provided here is basic but you can build upon it once you’ve understood the basics. For instance, the sqlite backend will be used to avoid configuring a separate SQL database.

The software tools used in this guide are:

  • Podman, an open-souce container management solution that can run containers in rootless mode, for security purposes
  • Caddy, a modern webserver and reverse-proxy that offers automatic and hassle-free TLS certificate requests and renewals

Assumptions

Writing this guide, I make the following assumptions:

  • the OS used by the server is based on CentOS and uses systemd, such as RockyLinux
  • you already own a domain name and already pointed it to the IP address of the server. If not, you can have some subdomains for free at DuckDNS
  • you have root access on the server and on the firewall
  • ports 80 and 443 are open and correctly configured

Installing Podman and Caddy

The installation procedures may vary based on the operating system or on the availability of repositories containing newer versions of the programs. Your best bet is to follow the istruction on the official websites of the programs.

Currently, on CentOS:

# as root
dnf install 'dnf-command(copr)'
dnf copr enable @caddy/caddy
dnf install caddy
dnf install podman

User configuration

Since podman allows containers to run in rootless mode, we will create a user dedicated to freshrss and run the container with its privileges.

# as root
useradd --system --create-home --home-dir /home/freshrss/ --shell /usr/bin/bash --comment "FreshRSS" freshrss
usermod --add-subuids 210000-211000 --add-subgids 210000-211000 freshrss
mkdir -p /opt/freshrss/config
chown -R freshrss:freshrss /opt/freshrss

Configure Caddy

To configure Caddy, write these lines in the file /etc/caddy/Caddyfile, replacing name@mail.com and your.domain.com with real values.

{
    email name@mail.com
}
your.domain.com {
    reverse_proxy localhost:9090
}

Then, to test if everything is working, run a test web server on port 9090, such as python3 -m http.server 9090 and after some time try reaching your.domain.com.