FreshRSS

Introduction

FreshRSS is a self-hosted RSS and Atom feed aggregator. It is lightweight, easy to work with, powerful, and customisable.

The Docker Compose File

---
version: "3.8"

services:
  freshrss:
    image: freshrss/freshrss:latest
    container_name: freshrss
    hostname: freshrss
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    environment:
      - TZ=Europe/Stockholm
      - PUID=1000
      - PGID=1000
      - CRON_MIN=13,43
    ports:
      - 80:80
    volumes:
      - /opt/freshrss/config:/var/www/FreshRSS/data
      - /opt/freshrss/extensions:/var/www/FreshRSS/extensions
      - /etc/localtime:/etc/localtime:ro
    labels:
      - com.centurylinklabs.watchtower.enable=true

docker-compose.yml

This Docker Compose file defines a single service named “freshrss”. The service is built from the “freshrss/freshrss:latest” Docker image, which is the latest version available. The container name is set to “freshrss” as well. FreshRSS has a built-in SQLite database (easiest and good performance), but more powerful databases are also supported.

The “restart” section ensures that the container will always be restarted if it exits (unless manually stopped). This is useful for ensuring that the service is always available, especially if it crashes or is shut down unexpectedly.

The “security_opt” section prevents your container processes from gaining additional privileges. This is an important security consideration.

The “ports” section maps port 80 on the host machine to port 80 in the container. This allows us to access the FreshRSS web interface from our local machine.

The “volumes” section maps the “/var/www/FreshRSS/data” directory inside the container to a local directory on the host machine. This allows us to persist data across container restarts. FreshRSS stores all its configuration and monitoring data in this directory, so it’s important to keep it intact.

The "labels" section allows the Watchtower service to keep this container update automatically.

Running FreshRSS with Docker Compose

To run FreshRSS with Docker Compose, first, make sure you have Docker and Docker Compose installed on your machine. Then, create a new directory for your FreshRSS project and save the above Docker Compose file as “docker-compose.yml” in that directory.

Next, run the following command from the same directory:

docker compose up -d

This command will start the FreshRSS container in the background and detach from it. You can then access the FreshRSS web interface by going to http://localhost:80 in your web browser.

Conclusion

In this article, we explored how to set up and run the FreshRSS software using Docker Compose. We looked at the different sections of the Docker Compose file and explained how they work together to create a functional FreshRSS service. By running FreshRSS with Docker Compose, you can easily deploy and manage the tool on your own server, without having to worry about dependencies or configuration.


FreshRSS, a free, self-hostable feeds aggregator
FreshRSS is lightweight, easy to work with, powerful, and customizable.