# FreshRSS Installation

<div data-extension-key="toc" data-extension-type="com.atlassian.confluence.macro.core" data-layout="default" data-local-id:="04dd18ee-8267-472b-80e7-7833c1206af5" data-node-type="extension" data-parameters="{&quot;macroParams&quot;:{&quot;style&quot;:{&quot;value&quot;:&quot;none&quot;}},&quot;macroMetadata&quot;:{&quot;macroId&quot;:{&quot;value&quot;:&quot;9c3dcc97-069a-4366-b377-94a3dd219a15&quot;},&quot;schemaVersion&quot;:{&quot;value&quot;:&quot;1&quot;},&quot;title&quot;:&quot;Sommaire&quot;}}" data-pm-slice="0 0 []" data-prosemirror-content-type="node" data-prosemirror-node-block="true" data-prosemirror-node-name="extension" id="bkmrk-">  
</div>## 1. System Preparation and Prerequisites

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

<div class="fabric-editor-breakout-mark" data-mode="wide" data-prosemirror-content-type="mark" data-prosemirror-mark-name="breakout" data-width="760" id="bkmrk-sudo-apt-update-sudo"><div class="code-block--start" contenteditable="false">  
</div><div class="code-block-content-wrapper"><div contenteditable="false" style="background-color: var(--ds-background-neutral, #0515240f); box-sizing: content-box; flex-shrink: 0; font-size: 0.875em; padding: var(--ds-space-100, 8px) var(--ds-space-250, 20px) var(--ds-space-100, 8px) var(--ds-space-075, 6px); position: relative; width: var(--lineNumberGutterWidth, 2rem);"><div class="code-block-gutter-pseudo-element" data-label="1&#xA;2" style="color: var(--ds-text-subtlest, #6b6e76); font-family: var(--ds-font-family-code, 'Atlassian Mono', ui-monospace, Menlo, 'Segoe UI Mono', 'Ubuntu Mono', monospace); text-align: right; white-space: pre-wrap;">  
</div></div><div class="code-content"><code>sudo apt update sudo apt install nginx ufw curl docker&#45;compose&#45;plugin docker&#46;io &#45;y</code></div></div></div>**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.

<div class="fabric-editor-breakout-mark" data-mode="wide" data-prosemirror-content-type="mark" data-prosemirror-mark-name="breakout" data-width="760" id="bkmrk-sudo-ufw-allow-22%2Ftc"><div class="code-block--start" contenteditable="false">  
</div><div class="code-block-content-wrapper"><div contenteditable="false" style="background-color: var(--ds-background-neutral, #0515240f); box-sizing: content-box; flex-shrink: 0; font-size: 0.875em; padding: var(--ds-space-100, 8px) var(--ds-space-250, 20px) var(--ds-space-100, 8px) var(--ds-space-075, 6px); position: relative; width: var(--lineNumberGutterWidth, 2rem);"><div class="code-block-gutter-pseudo-element" data-label="1&#xA;2&#xA;3&#xA;4&#xA;5" style="color: var(--ds-text-subtlest, #6b6e76); font-family: var(--ds-font-family-code, 'Atlassian Mono', ui-monospace, Menlo, 'Segoe UI Mono', 'Ubuntu Mono', monospace); text-align: right; white-space: pre-wrap;">  
</div></div><div class="code-content"><code>sudo ufw allow 22&#47;tcp &#35; Keep SSH access opensudo ufw allow 80&#47;tcp &#35; HTTPsudo ufw allow 443&#47;tcp &#35; HTTPSsudo ufw enablesudo ufw reload</code></div></div></div>## 2. Deploying FreshRSS with Docker Compose

Create the directory structure for your application data and database.

<div class="fabric-editor-breakout-mark" data-mode="wide" data-prosemirror-content-type="mark" data-prosemirror-mark-name="breakout" data-width="760" id="bkmrk-sudo-mkdir--p-%2Fopt%2Ff"><div class="code-block--start" contenteditable="false">  
</div><div class="code-block-content-wrapper"><div contenteditable="false" style="background-color: var(--ds-background-neutral, #0515240f); box-sizing: content-box; flex-shrink: 0; font-size: 0.875em; padding: var(--ds-space-100, 8px) var(--ds-space-250, 20px) var(--ds-space-100, 8px) var(--ds-space-075, 6px); position: relative; width: var(--lineNumberGutterWidth, 2rem);"><div class="code-block-gutter-pseudo-element" data-label="1&#xA;2" style="color: var(--ds-text-subtlest, #6b6e76); font-family: var(--ds-font-family-code, 'Atlassian Mono', ui-monospace, Menlo, 'Segoe UI Mono', 'Ubuntu Mono', monospace); text-align: right; white-space: pre-wrap;">  
</div></div><div class="code-content"><code>sudo mkdir &#45;p &#47;opt&#47;freshrss&#47;&#123;data&#44;extensions&#44;db&#45;data&#125; cd &#47;opt&#47;freshrss</code></div></div></div>Create the <span class="code" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code" spellcheck="false">docker-compose.yml</span> file (<span class="code" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code" spellcheck="false">sudo nano docker-compose.yml</span>) and paste the configuration below. Notice the <span class="code" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code" spellcheck="false">127.0.0.1:8080:80</span> port mapping: this is critical to force FreshRSS to only listen locally, blocking direct external access to port 8080.

<div class="fabric-editor-breakout-mark" data-mode="wide" data-prosemirror-content-type="mark" data-prosemirror-mark-name="breakout" data-width="760" id="bkmrk-services%3A-freshrss-d"><div class="code-block--start" contenteditable="false">  
</div><div class="code-block-content-wrapper"><div contenteditable="false" style="background-color: var(--ds-background-neutral, #0515240f); box-sizing: content-box; flex-shrink: 0; font-size: 0.875em; padding: var(--ds-space-100, 8px) var(--ds-space-250, 20px) var(--ds-space-100, 8px) var(--ds-space-075, 6px); position: relative; width: var(--lineNumberGutterWidth, 2rem);"><div class="code-block-gutter-pseudo-element" data-label="1&#xA;2&#xA;3&#xA;4&#xA;5&#xA;6&#xA;7&#xA;8&#xA;9&#xA;10&#xA;11&#xA;12&#xA;13&#xA;14&#xA;15&#xA;16&#xA;17&#xA;18&#xA;19&#xA;20&#xA;21&#xA;22&#xA;23&#xA;24&#xA;25&#xA;26" style="color: var(--ds-text-subtlest, #6b6e76); font-family: var(--ds-font-family-code, 'Atlassian Mono', ui-monospace, Menlo, 'Segoe UI Mono', 'Ubuntu Mono', monospace); text-align: right; white-space: pre-wrap;">  
</div></div><div class="code-content"><code>services&#58;  freshrss&#45;db&#58;    image&#58; postgres&#58;15&#45;alpine    container&#95;name&#58; freshrss&#45;db    restart&#58; unless&#45;stopped    volumes&#58;      &#45; &#46;&#47;db&#45;data&#58;&#47;var&#47;lib&#47;postgresql&#47;data    environment&#58;      POSTGRES&#95;USER&#58; freshrss      POSTGRES&#95;PASSWORD&#58; ChangeMeSuperStrongPwd      POSTGRES&#95;DB&#58; freshrss  freshrss&#45;app&#58;    image&#58; freshrss&#47;freshrss&#58;latest    container&#95;name&#58; freshrss&#45;app    restart&#58; unless&#45;stopped    ports&#58;      &#45; &#34;127&#46;0&#46;0&#46;1&#58;8080&#58;80&#34; &#35; Blocks direct external access    depends&#95;on&#58;      &#45; freshrss&#45;db    volumes&#58;      &#45; &#46;&#47;data&#58;&#47;var&#47;www&#47;FreshRSS&#47;data      &#45; &#46;&#47;extensions&#58;&#47;var&#47;www&#47;FreshRSS&#47;extensions    environment&#58;      TZ&#58; Europe&#47;Paris      CRON&#95;MIN&#58; &#34;3&#44;33&#34;</code></div></div></div>Start the containers in the background:

<div class="fabric-editor-breakout-mark" data-mode="wide" data-prosemirror-content-type="mark" data-prosemirror-mark-name="breakout" data-width="760" id="bkmrk-sudo-docker-compose-"><div class="code-block--start" contenteditable="false">  
</div><div class="code-block-content-wrapper"><div contenteditable="false" style="background-color: var(--ds-background-neutral, #0515240f); box-sizing: content-box; flex-shrink: 0; font-size: 0.875em; padding: var(--ds-space-100, 8px) var(--ds-space-250, 20px) var(--ds-space-100, 8px) var(--ds-space-075, 6px); position: relative; width: var(--lineNumberGutterWidth, 2rem);"><div class="code-block-gutter-pseudo-element" data-label="1" style="color: var(--ds-text-subtlest, #6b6e76); font-family: var(--ds-font-family-code, 'Atlassian Mono', ui-monospace, Menlo, 'Segoe UI Mono', 'Ubuntu Mono', monospace); text-align: right; white-space: pre-wrap;">  
</div></div><div class="code-content"><code>sudo docker compose up &#45;d</code></div></div></div>## 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.

<div class="fabric-editor-breakout-mark" data-mode="wide" data-prosemirror-content-type="mark" data-prosemirror-mark-name="breakout" data-width="760" id="bkmrk-sudo-mkdir--p-%2Fetc%2Fn"><div class="code-block--start" contenteditable="false">  
</div><div class="code-block-content-wrapper"><div contenteditable="false" style="background-color: var(--ds-background-neutral, #0515240f); box-sizing: content-box; flex-shrink: 0; font-size: 0.875em; padding: var(--ds-space-100, 8px) var(--ds-space-250, 20px) var(--ds-space-100, 8px) var(--ds-space-075, 6px); position: relative; width: var(--lineNumberGutterWidth, 2rem);"><div class="code-block-gutter-pseudo-element" data-label="1&#xA;2&#xA;3&#xA;4&#xA;5" style="color: var(--ds-text-subtlest, #6b6e76); font-family: var(--ds-font-family-code, 'Atlassian Mono', ui-monospace, Menlo, 'Segoe UI Mono', 'Ubuntu Mono', monospace); text-align: right; white-space: pre-wrap;">  
</div></div><div class="code-content"><code>sudo mkdir &#45;p &#47;etc&#47;nginx&#47;sslsudo openssl req &#45;x509 &#45;nodes &#45;days 365 &#45;newkey rsa&#58;2048 &#92;  &#45;keyout &#47;etc&#47;nginx&#47;ssl&#47;your&#45;domain&#46;key &#92;  &#45;out &#47;etc&#47;nginx&#47;ssl&#47;your&#45;domain&#46;crt &#92;  &#45;subj &#34;&#47;CN&#61;rss&#46;your&#45;domain&#46;com&#34;</code></div></div></div>*(Make sure to replace* <span class="code" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code" spellcheck="false">rss.your-domain.com</span> *with your actual domain name or server IP).*

## 4. Configuring the Nginx Reverse Proxy

Ensure the standard Nginx directory structure exists:

<div class="fabric-editor-breakout-mark" data-mode="wide" data-prosemirror-content-type="mark" data-prosemirror-mark-name="breakout" data-width="760" id="bkmrk-sudo-mkdir--p-%2Fetc%2Fn-1"><div class="code-block--start" contenteditable="false">  
</div><div class="code-block-content-wrapper"><div contenteditable="false" style="background-color: var(--ds-background-neutral, #0515240f); box-sizing: content-box; flex-shrink: 0; font-size: 0.875em; padding: var(--ds-space-100, 8px) var(--ds-space-250, 20px) var(--ds-space-100, 8px) var(--ds-space-075, 6px); position: relative; width: var(--lineNumberGutterWidth, 2rem);"><div class="code-block-gutter-pseudo-element" data-label="1" style="color: var(--ds-text-subtlest, #6b6e76); font-family: var(--ds-font-family-code, 'Atlassian Mono', ui-monospace, Menlo, 'Segoe UI Mono', 'Ubuntu Mono', monospace); text-align: right; white-space: pre-wrap;">  
</div></div><div class="code-content"><code>sudo mkdir &#45;p &#47;etc&#47;nginx&#47;sites&#45;available &#47;etc&#47;nginx&#47;sites&#45;enabled</code></div></div></div>Create a new configuration file for FreshRSS (<span class="code" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code" spellcheck="false">sudo nano /etc/nginx/sites-available/freshrss.conf</span>)

<div class="fabric-editor-breakout-mark" data-mode="wide" data-prosemirror-content-type="mark" data-prosemirror-mark-name="breakout" data-width="760" id="bkmrk-%23-http-to-https-redi"><div class="code-block--start" contenteditable="false">  
</div><div class="code-block-content-wrapper"><div contenteditable="false" style="background-color: var(--ds-background-neutral, #0515240f); box-sizing: content-box; flex-shrink: 0; font-size: 0.875em; padding: var(--ds-space-100, 8px) var(--ds-space-250, 20px) var(--ds-space-100, 8px) var(--ds-space-075, 6px); position: relative; width: var(--lineNumberGutterWidth, 2rem);"><div class="code-block-gutter-pseudo-element" data-label="1&#xA;2&#xA;3&#xA;4&#xA;5&#xA;6&#xA;7&#xA;8&#xA;9&#xA;10&#xA;11&#xA;12&#xA;13&#xA;14&#xA;15&#xA;16&#xA;17&#xA;18&#xA;19&#xA;20&#xA;21&#xA;22&#xA;23&#xA;24&#xA;25" style="color: var(--ds-text-subtlest, #6b6e76); font-family: var(--ds-font-family-code, 'Atlassian Mono', ui-monospace, Menlo, 'Segoe UI Mono', 'Ubuntu Mono', monospace); text-align: right; white-space: pre-wrap;">  
</div></div><div class="code-content"><code>&#35; HTTP to HTTPS redirectionserver &#123;    listen 80&#59;    server&#95;name rss&#46;your&#45;domain&#46;com&#59;    return 301 https&#58;&#47;&#47;&#36;host&#36;request&#95;uri&#59;&#125;&#35; HTTPS Configurationserver &#123;    listen 443 ssl http2&#59;    server&#95;name rss&#46;your&#45;domain&#46;com&#59;    &#35; Paths to the certificates generated in Step 3    ssl&#95;certificate &#47;etc&#47;nginx&#47;ssl&#47;your&#45;domain&#46;crt&#59;    ssl&#95;certificate&#95;key &#47;etc&#47;nginx&#47;ssl&#47;your&#45;domain&#46;key&#59;    location &#47; &#123;        proxy&#95;pass http&#58;&#47;&#47;127&#46;0&#46;0&#46;1&#58;8080&#59;        proxy&#95;set&#95;header Host &#36;host&#59;        proxy&#95;set&#95;header X&#45;Real&#45;IP &#36;remote&#95;addr&#59;        proxy&#95;set&#95;header X&#45;Forwarded&#45;For &#36;proxy&#95;add&#95;x&#95;forwarded&#95;for&#59;        proxy&#95;set&#95;header X&#45;Forwarded&#45;Proto &#36;scheme&#59;        proxy&#95;cookie&#95;path &#47; &#34;&#47;&#59; HTTPOnly&#59; Secure&#34;&#59;    &#125;&#125;</code></div></div></div>*If you are using an IP address instead of a domain name, replace* <span class="code" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code" spellcheck="false">server\_name rss.your-domain.com;</span> *with* <span class="code" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code" spellcheck="false">server\_name \_;</span> *in both server blocks.*

Enable the site and reload Nginx:

<div class="fabric-editor-breakout-mark" data-mode="wide" data-prosemirror-content-type="mark" data-prosemirror-mark-name="breakout" data-width="760" id="bkmrk-sudo-ln--s-%2Fetc%2Fngin"><div class="code-block--start" contenteditable="false">  
</div><div class="code-block-content-wrapper"><div contenteditable="false" style="background-color: var(--ds-background-neutral, #0515240f); box-sizing: content-box; flex-shrink: 0; font-size: 0.875em; padding: var(--ds-space-100, 8px) var(--ds-space-250, 20px) var(--ds-space-100, 8px) var(--ds-space-075, 6px); position: relative; width: var(--lineNumberGutterWidth, 2rem);"><div class="code-block-gutter-pseudo-element" data-label="1&#xA;2&#xA;3" style="color: var(--ds-text-subtlest, #6b6e76); font-family: var(--ds-font-family-code, 'Atlassian Mono', ui-monospace, Menlo, 'Segoe UI Mono', 'Ubuntu Mono', monospace); text-align: right; white-space: pre-wrap;">  
</div></div><div class="code-content"><code>sudo ln &#45;s &#47;etc&#47;nginx&#47;sites&#45;available&#47;freshrss&#46;conf &#47;etc&#47;nginx&#47;sites&#45;enabled&#47;sudo nginx &#45;tsudo systemctl reload nginx</code></div></div></div>## 5. Web Installation Wizard

1. Open your web browser and navigate to <span class="code" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code" spellcheck="false">https://rss.your-domain.com</span> (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 <span class="code" data-prosemirror-content-type="mark" data-prosemirror-mark-name="code" spellcheck="false">docker-compose.yml</span>:
    
    
    - **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!