Introduction
I've been wanting to get more into the stock market, and for that, I would have to keep up more with the news. However, I don't want to have to manually check news sites for interesting articles, and I have a homelab, so I decided to run FreshRSS on it. I will be running it in Docker and using NGinx in front of it as a reverse proxy.
Docker setup
The Docker setup was pretty simple, just following the Docker Compose installation instructions. All I had to do was download the docker-compose.yml and configure it to fit my needs. There were two important things to note though:
-
To make sure the appliation runs at the port you want, don't forget to add a
ports:
entry in the config:
ports: - "DESIRED PORT:80"
Otherwise it will just run on port 80, which is not what I wanted. - In the
volumes
section, the volumes are by default set to absolute paths, but I couldn't find where it put them. I like having the folders for the application in the same folder as the docker compose file anyway, so I changed those to be relative to the docker compose file:
volumes: - ./data:/var/www/FreshRSS/data - ./extensions:/var/www/FreshRSS/extensions
NGinx setup
The NGinx setup is pretty simple as well. I just started out with this:
server {
server_name hostname.domain-name
location / {
proxy_pass http://IP:PORT;
proxy_http_version 1.1;
}
}
However, that didn't work as the page could not be found when I entered the correct address. After some searching I found that you need to add some headers:
server {
server_name hostname.domain-name
location / {
proxy_pass http://IP:PORT;
proxy_http_version 1.1;
# headers
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;
}
}
That's all folks!🕺