Important or Recent Updates
Historic Updates | Date |
---|---|
New DSM7.2 Container Manager Update | 22/04/2023 |
We are now going to set up a Docker Bridge Network, we are doing this for consistency across the guides here. It also allows us to have more control over the ports containers use in case we want to avoid certain port ranges that DSM uses.
While most containers will happily work without doing this step it is good practice to set up a specific Bridge rather than using the default bridge or Network Host mode.
Let’s Begin
Open up the Container Manager and go into the Network tab.
Next click on ‘Add’ which brings up the settings screen. In here we are going to specify the following values.
Section | Setting |
---|---|
Network Name | synobridge (you can change this if you wish) |
IPv4 Configuration | Manual |
Subnet | 172.20.0.0/16 |
network: iprange | 172.20.0.0/16 |
Gateway | 172.20.0.1 |
Now click ‘Apply’ which will take you back to the original screen.
That’s it the Bridge is now ready for containers to be attached to it. You can go back to the guide you were following.
Optional Steps if you have the Synology Firewall Enabled
If you have the Synology Firewall enabled and configured to block incoming or outgoing connections you will need to do this step. Otherwise, you will have issues with your containers being able to contact each other.
Go into Control Panel > Security > Firewall
Click on Edit Rules and in the screen that appears click on ‘Create’
In the first screen select ‘All’ and ‘Specific IP’ then press ‘Select’
Then select ‘IP Range’ and enter ‘172.20.0.1’ in ‘From:’ and ‘172.20.255.254’ in ‘To:’
Press OK until you are back to the main Firewall screen and press Apply.
You can now go back to the guide you were following.
Hi,
I’m stuck at the first part of this guide, I’m not allowed to create a network. I use your numbers, and it says:
Unable to perform this operation, possibly because the network connection is unstable or the system is busy. Please try again later.
Edit:
It worked when I disabled my pihole. Any idea if this is going to make problems for me down the road? :/
Hey, if you are getting that error it would suggest that the system is actually busy, it might be worth checking Resource Manager to see what kind of Disk IO you are getting.
Hi, what is the advantage of setting up a new bridge instead of using the default one? Thanks!
We get this setup purely for a nice consistent bridge to add most of the containers that communicate to each other via it. It’s generally preferred to set up your own bridges or allow the compose to set one up for the containers within it. See the docs for a full explanation of the differences.
https://docs.docker.com/network/drivers/bridge/
Thank you, I had no idea! So much to learn about docker.
One more question. There are two ports that you can apply to your container: local port and container port. What is the difference? I used to point to the Edgebridge by typing http://192.168.168.x:8088 for example. Is this the local port or the container port or can they both be the same?
So Local is the one exposed to your network and the Internal in the one the container is using (local left : Internal container right). For most of the time they are the same, the exception is if the local port is not available so you are free to generally change to what ever you want to, however the internal container port generally can only be changed using the actual app inside it first.
If I am using an Edgebridge or proxy server don’t I need to change the up address to the up address of the nas so I can point to the Edgebridge proxy server? Currently you show a 172.x.x.x but my up address of my nas is 192.x.x.x so how would SmartThings know to find 172.x.x.x since this isn’t the assigned network addressing of my network.
Thank you,
John
Hi John
The bridge network is purely for internal docker communication so your existing setup of using the NAS IP should continue to function as normal, the bridge is purely for the container(s).
I am trying to setup an Edgebridge for my SmartThings app to get updates from weather services. I am confused on how to setup the network. In the old docker I just setup a port and point SmartThings to the up address of the Synology nas but this doesn’t seem to work anymore. Any advice for me?
Thank you, john