# Change docker0 network

**URL:** <https://forum.ansible.com/t/change-docker0-network/34561>\
**Category:** AWX Project\
**Created:** [February 3, 2021, 4:37pm UTC](https://forum.ansible.com/t/change-docker0-network/34561 "2021-02-03T16:37:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yan](https://avatars.discourse-cdn.com/v4/letter/y/3e96dc/32.png) [@Yan](https://forum.ansible.com/u/Yan)\
**Post date:** [February 3, 2021, 4:37pm UTC](https://forum.ansible.com/t/change-docker0-network/34561/1 "2021-02-03T16:37:47Z")

</div>

Hi,

I need to change docker0 network from 172.17.0.1/16 to another network.

I found this in inventory:

# Docker compose explicit subnet. Set to avoid overlapping your existing LAN networks.

docker\_compose\_subnet=“172.17.0.1/16”

This is exactly my case, our LAN is using 172.17.0.1/16

So I changed it with

docker\_compose\_subnet=“152.17.0.1/16”

Then re-run the installer, but unfortunately afer I still have :

3: docker0: \<NO-CARRIER,BROADCAST,MULTICAST,UP\> mtu 1500 qdisc noqueue state DOWN group default  
link/ether 02:42:cc:d1:61:08 brd ff:ff:ff:ff:ff:ff  
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0  
valid\_lft forever preferred\_lft forever

Why did it not change ?

How to force it to take in account the new “152.17.0.1/16” please ?

Regards

Yan

---

<div class="post-metadata">

**Author:** ![Garrett\_Kelly](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Garrett\_Kelly](https://forum.ansible.com/u/Garrett_Kelly)\
**Post date:** [February 5, 2021, 4:01pm UTC](https://forum.ansible.com/t/change-docker0-network/34561/2 "2021-02-05T16:01:42Z")

</div>

Hey Yan,

I had the same issue with mine when the network team created new networks that conflicted. Even after having updated that file with the docker\_compose\_subnet, and re-ran the deployment, it still hadn’t updated it. Please make sure you take a VM snapshot or backup prior to running the below commands.

To resolve, you would need to do the following:

docker stop $(docker ps -aq) This will stop all your containers so we can update the networking  
docker network ls Find the current awx network listed, and copy the associated network id. We are going to want to delete this network  
docker network rm   
docker network create --driver bridge --subnet ‘192.168.168.0/24’ --gateway ‘192.168.168.1’ awxcompose\_default create new network. Match whatever network is configured as your docker\_compose\_subnet

Once you have re-run the deployment, it should see the awxcompose\_default network configuration, and use the networking provided in that.

[https://github.com/ansible/awx/issues/750](https://github.com/ansible/awx/issues/750)
