Error response from daemon: network X not found
The container or Compose project refers to a Docker network that doesn’t exist (any more).
Seen on:
Docker
Meaning
External networks in Compose must be created first, and containers created before a network was deleted keep a stale reference to the old network ID.
Common causes
- external: true network not created
- Network removed (docker network prune) while containers still reference it
- Typo in network name
- Compose project name changed, so the network name changed
⚡ Quick fix
- Create it: docker network create <name>
- Recreate containers: docker compose up -d --force-recreate
- Check names: docker network ls
Detailed fix by platform
Docker Compose
- bash
networks: shared: external: true # requires: docker network create shared
How to diagnose
- List — docker network ls
- Stale — Container created before the network was deleted?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- actively refused it HttpRequestException: No connection could be made because the target machine actively refused it (localhost:5001)
- compose validation docker compose: services.x Additional property y is not allowed / yaml: line N: mapping values are not allowed
- depends on undefined service service "web" depends on undefined service "db": invalid compose project
Most viewed in Docker
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026