Docker networks
Create Docker networks, attach them to services, and isolate internal services from the shared network.
Every service wtree Cloud deploys joins the shared overlay network w3panel-network. Traefik reaches your services through it, and every service on the server can reach every other by name. Create your own networks to control which services talk to each other.
Before you start
- Access to the Containers tab of the server.
- A network belongs to one server, so open the server first: Servers, then This server or a remote server.
Manage networks
Go to Servers › your server › Containers › Networks. The table has search and a driver filter, and lets you:
- Create network.
- View config: the output of
docker network inspect. - Delete a network.
- Verify: check that every listed network still exists in Docker.
- Sync: reconcile Docker and wtree Cloud (below).
Create a network
| Field | Description |
|---|---|
| Name | The Docker network name. |
| Driver | bridge for single-server containers, overlay for Swarm services. Applications and databases are Swarm services, so use overlay for them. |
| MTU (optional) | Maximum transmission unit. Empty uses Docker's default. |
| Internal | Containers on the network can't reach external networks. |
| Attachable | Lets standalone containers attach. Overlay only. |
| Enable IPv4 / Enable IPv6 | Address families on the network. |
| IPAM | Optional IPAM driver and subnet, IP range and gateway entries, for example 172.20.0.0/16. |
Networks are immutable. To change one, delete it and create it again.
Sync with Docker
Networks created outside wtree Cloud, with the Docker CLI or a Compose file, aren't listed until imported. Sync:
- Imports networks that exist in Docker but not in wtree Cloud.
- Removes records whose network is gone from Docker, or recreates the network from stored settings.
- Updates a record from Docker when the two have drifted.
Attach networks to a service
Open the service and go to Settings › Networking for an application or Compose service, or Settings › Resources and storage for a database. Find Networks.
Select one or more networks and save.
Redeploy. Network changes apply on the next deploy.
Services on the same network reach each other by service name. For Compose, the same card attaches networks per service in the compose file.
Detach from w3panel-network
Detach from w3panel-network removes the service from the shared network, so only the networks you attached reach it.
Traefik uses w3panel-network. Detaching a service that has domains breaks its routing. Use it for internal services only.
If a detached service has no other network, wtree Cloud keeps it on w3panel-network until you attach one, so it is never unreachable.
Example: isolate a database
In Servers › your server › Containers › Networks, create an overlay network named backend.
On the database, go to Settings › Resources and storage › Networks, attach backend, enable Detach from w3panel-network, and redeploy.
On the application that uses it, attach backend, stay on w3panel-network so its domain keeps working, and redeploy.
Verify: the application reaches the database by its internal host name, and no other service on the server can.
