Skip to main content

FreshRSS Installation


1. System Preparation and Prerequisites

First, update your system and install the necessary packages: Docker, Docker Compose, Nginx, and UFW.



sudo apt update sudo apt install nginx ufw curl docker-compose-plugin docker.io -y

Firewall Configuration (UFW):
By default, Docker bypasses UFW rules, but Nginx runs directly on your host. You need to explicitly allow standard web traffic while enabling the firewall.



sudo ufw allow 22/tcp # Keep SSH access open sudo ufw allow 80/tcp # HTTP sudo ufw allow 443/tcp # HTTPS sudo ufw enable sudo ufw reload

2. Deploying FreshRSS with Docker Compose

Create the directory structure for your application data and database.



sudo mkdir -p /opt/freshrss/{data,extensions,db-data} cd /opt/freshrss

Create the docker-compose.yml file (sudo nano docker-compose.yml) and paste the configuration below. Notice the 127.0.0.1:8080:80 port mapping: this is critical to force FreshRSS to only listen locally, blocking direct external access to port 8080.



services: freshrss-db: image: postgres:15-alpine container_name: freshrss-db restart: unless-stopped volumes: - ./db-data:/var/lib/postgresql/data environment: POSTGRES_USER: freshrss POSTGRES_PASSWORD: ChangeMeSuperStrongPwd POSTGRES_DB: freshrss freshrss-app: image: freshrss/freshrss:latest container_name: freshrss-app restart: unless-stopped ports: - "127.0.0.1:8080:80" # Blocks direct external access depends_on: - freshrss-db volumes: - ./data:/var/www/FreshRSS/data - ./extensions:/var/www/FreshRSS/extensions environment: TZ: Europe/Paris CRON_MIN: "3,33"

Start the containers in the background:



sudo docker compose up -d

3. Creating a Self-Signed SSL Certificate

To enable HTTPS on Nginx right away, generate a self-signed SSL certificate. You can replace it later with a valid Let's Encrypt certificate.



sudo mkdir -p /etc/nginx/ssl sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ -keyout /etc/nginx/ssl/your-domain.key \ -out /etc/nginx/ssl/your-domain.crt \ -subj "/CN=rss.your-domain.com"

(Make sure to replace rss.your-domain.com with your actual domain name or server IP).

4. Configuring the Nginx Reverse Proxy

Ensure the standard Nginx directory structure exists:



sudo mkdir -p /etc/nginx/sites-available /etc/nginx/sites-enabled

Create a new configuration file for FreshRSS (sudo nano /etc/nginx/sites-available/freshrss.conf)



# HTTP to HTTPS redirection server { listen 80; server_name rss.your-domain.com; return 301 https://$host$request_uri; } # HTTPS Configuration server { listen 443 ssl http2; server_name rss.your-domain.com; # Paths to the certificates generated in Step 3 ssl_certificate /etc/nginx/ssl/your-domain.crt; ssl_certificate_key /etc/nginx/ssl/your-domain.key; location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_cookie_path / "/; HTTPOnly; Secure"; } }

If you are using an IP address instead of a domain name, replace server_name rss.your-domain.com; with server_name _; in both server blocks.

Enable the site and reload Nginx:



sudo ln -s /etc/nginx/sites-available/freshrss.conf /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx

5. Web Installation Wizard

  1. Open your web browser and navigate to https://rss.your-domain.com (or your server's IP). You will need to accept the security warning caused by the self-signed certificate.

  2. Follow the FreshRSS setup wizard.

  3. At the Database step, input the values from your docker-compose.yml:

    • Type: PostgreSQL

    • Host: freshrss-db

    • User: freshrss

    • Password: ChangeMeSuperStrongPwd

    • Database: freshrss

  4. Create your final admin account.

Your FreshRSS instance is now fully operational, secured with HTTPS, and direct port access is safely blocked!