Setup FreshRSS

In my Homelab I am running an instance of FreshRSS.

„It’s a free self-hostable feed aggregator.“

The Client App I am using is the wonderful Reeder-App.

Docker setup

I run it in Docker Containers, with a PostgreSQL Database coordinated by docker compose. It does not contain any magic. Just the link to the database, configuration for CRON, volumes for the data and basic logging configuration.

Here my docker-compose.yaml file:

version: "3.5"

volumes:
data:
  driver: local
extensions:
  driver: local
db:
  driver: local

services:
freshrss:
  image: freshrss/freshrss:latest
  # Optional build section if you want to build the image locally:
  build:
    # Pick #latest (stable release) or #edge (rolling release) or a specific release like #1.21.0
    context: https://github.com/FreshRSS/FreshRSS.git#catch-window.Notification
    dockerfile: Docker/Dockerfile-Alpine
  container_name: freshrss
  restart: unless-stopped
  logging:
    options:
      max-size: 10m
  volumes:
    # Recommended volume for FreshRSS persistent data such as configuration and SQLite databases
    - data:/var/www/FreshRSS/data
    # Optional volume for storing third-party extensions
    - extensions:/var/www/FreshRSS/extensions
    # Optional file providing custom global settings (used before a FreshRSS install)
    #- ./config.custom.php:/var/www/FreshRSS/data/config.custom.php
    # Optional file providing custom user settings (used before a new user is created)
    #- ./config-user.custom.php:/var/www/FreshRSS/data/config-user.custom.php
  ports:
    # If you want to open a port 8080 on the local machine:
    - "6080:80"
  environment:
    # A timezone http://php.net/timezones (default is UTC)
    TZ: Europe/Berlin
    # Cron job to refresh feeds at specified minutes
    CRON_MIN: "6,21,36,51"
    # 'development' for additional logs; default is 'production'
    FRESHRSS_ENV: production
    # Optional advanced parameter controlling the internal Apache listening port
    LISTEN: 0.0.0.0:80
    # Optional parameter, remove for automatic settings, set to 0 to disable,
    # or (if you use a proxy) to a space-separated list of trusted IP ranges
    # compatible with https://httpd.apache.org/docs/current/mod/mod_remoteip.html#remoteiptrustedproxy
    # This impacts which IP address is logged (X-Forwarded-For or REMOTE_ADDR).
    # This also impacts external authentication methods;
    # see https://freshrss.github.io/FreshRSS/en/admins/09_AccessControl.html
    TRUSTED_PROXY: 172.16.0.1/12 192.168.0.1/16
    # Optional parameter, set to 1 to enable OpenID Connect (only available in our Debian image)
    # Requires more environment variables. See https://freshrss.github.io/FreshRSS/en/admins/16_OpenID-Connect.html
    OIDC_ENABLED: 0
    # Optional auto-install parameters (the Web interface install is recommended instead):
    # ⚠️ Parameters below are only used at the very first run (so far).
    # So if changes are made (or in .env file), first delete the service and volumes.
    # ℹ️ All the --db-* parameters can be omitted if using built-in SQLite database.
    FRESHRSS_INSTALL: |-
      --api_enabled
      --base_url ${BASE_URL}
      --db-base ${DB_BASE}
      --db-host ${DB_HOST}
      --db-password ${DB_PASSWORD}
      --db-type pgsql
      --db-user ${DB_USER}
      --default_user admin
      --language en
    FRESHRSS_USER: |-
      --api_password ${ADMIN_API_PASSWORD}
      --email ${ADMIN_EMAIL}
      --language en
      --password ${ADMIN_PASSWORD}
      --user admin
  depends_on:
    - freshrss-db

freshrss-db:
  image: postgres:16
  container_name: freshrss-db
  hostname: freshrss-db
  restart: unless-stopped
  logging:
    options:
      max-size: 10m
  volumes:
    - db:/var/lib/postgresql/data
  environment:
    POSTGRES_DB: ${DB_BASE:-freshrss}
    POSTGRES_USER: ${DB_USER:-freshrss}
    POSTGRES_PASSWORD: ${DB_PASSWORD:-freshrss}
  command:
    # Examples of PostgreSQL tuning.
    # https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
    # When in doubt, skip and stick to default PostgreSQL settings.
    - -c
    - shared_buffers=256MB
    - -c
    - work_mem=32MB

And the corresponding env file:

ADMIN_EMAIL=me@example.com
ADMIN_PASSWORD=***secret***
ADMIN_API_PASSWORD=***secret***
BASE_URL=https://freshrss.example.com:6080
DB_HOST=freshrss-db
DB_BASE=freshrss
DB_USER=freshrss
DB_PASSWORD=***top-secret***