Urgent.News

What's breaking now, across hundreds of outlets.

Tech

I finally understood Docker networking once I realized my containers only need three network types

The other four drivers can wait.

I finally understood Docker networking once I realized my containers only need three network types

After migrating from Trilium to Wiki.js as the central hub for my homelab, I encountered errors like "failed to create network wikijs_wikinet: all predefined address pools have been fully subnetted." This was not the first time, as similar issues had occurred in the past. Additionally, AdGuard Home (AGH) refused to open its admin dashboard, only to later detach itself from the Docker network after a reboot.

Determined to resolve these issues, I decided to explore Docker networks and simplify them by using only three network types.

Initially, Docker generates a new virtual switch called docker0 upon installation. Every subsequent network creates its own virtual switch, br-xxxx, often where containers reside when deployed via Compose. Every new container connects to this virtual switch and receives a private IP from its subnet, typically 172.x.x.x. Docker automatically creates a new network for each stack, either with a default name or a custom one.

However, when a deployment creates a new stack, Docker assigns a large /16-sized block from its pool, which quickly gets exhausted if multiple stacks are deployed (around 30 networks in my case).

One recurring issue involved AGH's admin dashboard. Binding to a plain mapping like 8443:443 opened the port on every address, including LAN and Tailscale. To resolve this, I bound AGH to the LAN IP, which worked in my case. When using reverse proxies, I found two methods: having them join every stack's network (messy) or using a shared network for them to join (simpler).

I opted for the latter, creating a shared network "homelab_net" and redeploying stacks with it as an external network. This approach simplified things but had downsides, such as name collisions and potential blast radius if one container was compromised.

There are pros and cons to isolated private networks and shared networks. While isolated networks keep containers separate, shared networks can cause issues if they aren't properly managed. Ultimately, three network types—isolated private networks, shared networks, and host mode—are sufficient for most homelab users. However, other drivers like overlay, ipvlan, and macvlan exist for specific scenarios, though they are not necessary for a single home server.

My journey of experimenting, failing, and learning has led me to rely on these three network types for managing my homelab effectively.

Rewritten by urgent.news; may contain errors — check the original.

Source: xda-developers.com

Read the original at xda-developers.com →

More from XDA Developers on urgent.news

Get the news by email. Yesterday's most-covered stories, every morning.

See today's edition · More options

More in Tech

More from Friday, 4 December 2026 →