Change default_webodm docker network bridge IP

Hello all - I am having some conflict problems with the default_webodm network IP 172.17.x.x.

I would like to change it to a static IP of my choosing.

I am on Ubuntu 20.04 and docker-ce.

So…

sudo nano 01-netcfg.yaml

network:
version: 2
renderer: networkd

ethernets:
enp0s31f6:
dhcp4: true
dhcp6: true
mtu: 1500
nameservers:
addresses: [8.8.8.8]

bridges:
br-2f58e99d25b2:
addresses: [192.168.2.2/24]
gateway4: 192.168.2.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
dhcp4: false
dhcp6: false

ifconfig

br-2f58e99d25b2: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255

docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255

enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 62.63.221.46 netmask 255.255.255.0 broadcast 62.63.221.255

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0

veth65fb428: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

vethb394bca: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

vethc8c6794: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

vethe9bf36a: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

vethf9176aa: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

docker network ls

NETWORK ID NAME DRIVER SCOPE
3f7ca312c3f0 bridge bridge local
04d1b86486a4 host host local
dbfbd5b5de4c none null local
2f58e99d25b2 webodm_default bridge local

docker network inspect 2f58e99d25b2
[
{
“Name”: “webodm_default”,
“Id”: “2f599d25b2accfe6ecab16e99ab7f821e1bc7e0c027a892382aaae874044”,
“Created”: “2021-01-20T22:46:44.516340221+01:00”,
“Scope”: “local”,
“Driver”: “bridge”,
“EnableIPv6”: false,
“IPAM”: {
“Driver”: “default”,
“Options”: null,
“Config”: [
{
“Subnet”: “172.17.0.0/16”,
“Gateway”: “172.17.0.1”
}
]
},
“Internal”: false,
“Attachable”: true,
“Ingress”: false,
“ConfigFrom”: {
“Network”: “”
},
“ConfigOnly”: false,
“Containers”: {
“18c3bd5625408e463c5cb3d0cd47f250563b15e7e78d6e7d36dede3c4c232e68”: {
“Name”: “webapp”,
“EndpointID”: “33a8db373ddb377a812bc40547eb97d9209f020c8b538d473d72df85dd1e2d9b”,
“MacAddress”: “02:42:ac:11:00:05”,
“IPv4Address”: “172.17.0.5/16”,
“IPv6Address”: “”
},
“32077a2ca846e89109b14bcd78c2aa114fb3072bcfe4cc28b8e40099f7f73553”: {
“Name”: “worker”,
“EndpointID”: “67006ef58309f551a0bcc906e0f8805b1babb76aadd9a335e8858c5fe540df95”,
“MacAddress”: “02:42:ac:11:00:06”,
“IPv4Address”: “172.17.0.6/16”,
“IPv6Address”: “”
},
“4b7e37ab0f21fb934d1ffd7919ee7187ad75ae6d446fc11ed89c26623e106d1c”: {
“Name”: “webodm_node-odm_1”,
“EndpointID”: “5458a49703d597d4f7ed953e1e90a11b7b9f8c8b53405f80572c9659b01c2ec8”,
“MacAddress”: “02:42:ac:11:00:04”,
“IPv4Address”: “172.17.0.4/16”,
“IPv6Address”: “”
},
“b336fedab4d0be7caf4244362b618d9dd3bcf993f5d526b1006416174e2e6dd6”: {
“Name”: “db”,
“EndpointID”: “58194c323eb5a402ccdf1a92022773f7c2c09671070d27624df4d55dd2f69a6d”,
“MacAddress”: “02:42:ac:11:00:03”,
“IPv4Address”: “172.17.0.3/16”,
“IPv6Address”: “”
},
“d5c66477986b1d9d3d9035dc44af29f0f0f722d47aadfcf081b211265106a97c”: {
“Name”: “broker”,
“EndpointID”: “47da3f0529764900e5858d6b1cdf648c21ceb77d5f9a82e752ce7143384ad62b”,
“MacAddress”: “02:42:ac:11:00:02”,
“IPv4Address”: “172.17.0.2/16”,
“IPv6Address”: “”
}
},
“Options”: {},
“Labels”: {
“com.docker.compose.network”: “default”,
“com.docker.compose.project”: “webodm”,
“com.docker.compose.version”: “1.26.2”
}
}
]

So I am not an docker network expert of any sort. My 01-netcfg.yaml file seems to have changed the bridge IP if you look at the ifconfig command but not to the docker inspect command.

I think there is a simple answer to this but I do not understand. So if you understand my “issue” please give me some advice on changing the IP adress of the default_webodm bridge.

Regards Mattias

1 Like

Nobody :slight_smile: ?

I did the following:

./webodm.sh down

add to the docker-compose.yml - at the end.

networks:
default:
external:
name: WebODM-network

Save, exit and then run

docker network create --driver=bridge --subnet=172.x.x.x/x --ip-range=172.x.x.x/24 --gateway=172.x.x.254 WebODM-network

docker network ls
docker network rm [the id of created WebODM-network bridge]

./webodm.sh start

WebODM wants you to “docker create WebODM-network”

run again

docker network create --driver=bridge --subnet=172.x.x.x/x --ip-range=172.x.x.x/24 --gateway=172.x.x.254 WebODM-network

./webodm.sh start

docker network inspect [the id of created WebODM-network bridge]
to confirm.

This will disappear after ./webodm.sh update or rebuild (I think) but will stay stable after a reboot.

Hope this will help anybody…

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.