
So, the second “hack” we need to do is fix this. You see, Synology really do not want you using port 80 so they do not allow you to choose this in the UI. Unfortunately it isn’t quite that simple.

The reason for this is that the docker UI will not allow me to use port 80. You may think it odd that I go from port 80 to 8080 and then back to 80. This port 8080 is then mapped in docker to my pi-hole containers port 80. What I have defined above is a rule that all traffic that going to my Synology on port 80 will be forwarded onto port 8080. We can do this using the reverse proxy tab in the ‘Application Portal’ section. So now that you have port 80 to do with what you want, let’s set this up to forward all requests to a docker container. Forwarding port 80 to your docker container
PORT 80 CC CHECK IN UPDATE
You can always change back the setting afterwards.Ĭongratulations, you have now freed port 80.ĭon’t forget, if you were accessing DSM via port 80 then you will have to update the URL with your new chosen port. This will trigger the rebuild and restart of the web server. What you can do is change any of the settings from the control panel UI and save. There is probably a terminal command to do this but I have not yet found this out. So we now need to force a rebuild of these. Now what we have done here is changed the template used to generate the Nginx configuration files, not the configuration files themselves. Make this change in all 3 files replacing occurrences of 80 with your chosen port. So if you open one of the files in your favourite editor you will find a server configuration looking something like this: Don’t worry, we don’t really need to understand this to do what we need to do. The files that we will be changing can be found under /usr/syno/share/nginx and are named: Ok, I wont keep you in suspense any longer. Ok, I’ve led you down this little route, the anticipation building and I hear you shouting “Where are these magical files?”. I don’t know if I will need to re-apply this change next time I update, only time will tell. Maybe if we change the source templates that are used by DSM to build the files it will then apply our changes every time. So if you modify them directly, next time you switch something in the UI you changes are lost. Releasing port 80įirst things to know is that all the configuration files for Nginx (the web sever DSM uses) are automatically created on every change via the UI. Just a small note, the reason I wanted port 80 for myself is that I run Pi-Hole as one of my docker containers and as it’s providing ad blocking via DNS then it needed to receive requests on port 80 to provide empty content to replace those annoying adverts. I’m not going to lie, you will need to ssh into your Synology, change a few system files and even maybe pray to your favourite gods, but in the end I hope you can sit back, smile and feel rewarded that you have gained back the power of port 80 from DSM.
PORT 80 CC CHECK IN FREE
So, after many searches and failures I’ve come up with a solution that will free up port 80 for your own uses and does not destroy your Synology.

If you are reading this post you probably already know that even though Synology DSM (disk station manager) by default uses ports 5000 (http) and 5001 (https) it still steals port 80 for it’s redirecting using Nginx.ĭSM ports can be changed (and is advisable) via the web UI. (see: Running Pi-Hole inside Docker on Synology) I want port 80 back please This can also be combined with the Block Page PHP script if desired. Instead I have installed the Web Station package and allow that to serve the blank pages. UPDATE: I no longer use the method defined below. So far everything has been easy to configure, launching docker containers a breeze and has generally been a great experience apart from 1 little thing. As I really wanted a NAS that would support docker containers I was drawn to the DS916+. My reliable ReadyNAS has been working flawlessly for the past 6 years and still going strong (if a little slow). I recently purchased a new NAS for my home network.
