Skip to main content

Changing Docker Internal Network Subnets

in Firewalls and Networking
Authors list
Published: Feb 14, 2024|Last updated: Feb 14, 2024

Deskpro instances run on Docker, and Docker requires an internal network to connect and communicate between containers.

By default, Docker will create the bridge network on the subnet 172.17.0.0/16

Additionally, Deskpro will create the deskpro_net network on the subnet 172.30.0.0/16 for the Deskpro instance containers.

There is a chance of network conflicts causing strange behaviours if you use these subnets within your LAN, so it is possible to change the subnets these services use to empty subnets to prevent conflicts.

Warning

We STRONGLY recommend not making any changes unless absolutely necessary.

Any misconfiguration of internal docker networking could render your server nonfunctional

Changing the Docker [bridge] networkCopy link to Changing the Docker [bridge] network to clipboard

As this is the default docker network, it is not possible to remove or modify it using CLI commands, and must be configured by modifying the daemon config.

Create the file /etc/docker/daemon.json with a text editor such as vi or nano, and paste the following:

{ "default-address-pools": [ { "base": "172.17.0.0/16", "size": 24 } ] }
copy

You will need to change the base to the new subnet you would like to use. The size is the size of the pools within this subnet (in CIDR notation).

Once you've added that file, restart docker with systemctl restart docker

Warning

This action will cause downtime on your helpdesk while Docker restarts.

You should now be able to confirm the subnet has changed with the the following command:

docker network inspect bridge | grep Subnet
copy

Changing the Deskpro [deskpro_net] networkCopy link to Changing the Deskpro [deskpro_net] network to clipboard

The following OPC command will allow you to change the subnet used for the deskpro_net network:

opc config set docker-network --subnet <subnet>
copy

You will need to replace <subnet> with the new subnet you would like to use in CIDR notation.

Warning

As this action is potentially destructive, the OPC will ask you to confirm you wish to continue at multiple steps.

This will also cause downtime on your helpdesk as the instances will need to restart.

Once the OPC has completed its tasks, you can confirm the subnet has changed with the following command:

docker network inspect deskpro_net | grep Subnet
copy
HelpfulUnhelpful

1 of 2 people found this page helpful

next pageEnabling/Disabling Telemetry within Deskpro
previous pagePort Requirements

Please log in or register to submit a comment.