docker network "already exists / overlaps": Subnet Collision Fix

Symptom

compose up fails with "Pool overlaps with other one on this address space".

Root cause

Two compose projects (or another Docker network) claim the same RFC1918 subnet.

Fix, in order

1. List existing networks and their subnetsdocker network ls && docker network inspect <net> | grep Subnet
2. Prune orphaned networksdocker network prune -f
3. Pin a unique subnet per projectnetworks: { default: { ipam: { config: [{ subnet: 172.28.0.0/16 }] } } }

Prevent it coming back

Assign each stack its own subnet range in compose.

Run it on clean infra

Spinning up a fresh box to reproduce or escape this error?

DevOps tools shelf

Related

Cloud & DevOps tool comparisons · Hardware build guides

NinjaOps publishes free engineering guides. Some outbound links are affiliate links: they cost you nothing and support the site.

Last reviewed 2026-10-02 · NinjaOps SEO grid · DevOps blog