# Docker Networks: Connect Your Containers
URL: https://ctrlops.io/docs/modules/docker/networks
Published: 2026-11-05
Updated: 2026-11-11

The Networks tab shows how your containers reach each other and the outside. Create a network so containers can talk by name, connect and disconnect containers, choose a driver, and remove the networks you no longer need.

The **Networks** tab shows how your containers reach each other and the outside. Most of the time, you only need it for one job: letting two containers talk to each other.

> **New to Docker?**
> 
> A *network* connects containers. Containers on the same network can reach each other by name, so your app can use `db:5432` instead of an IP address that can change.

![The Docker Networks tab with the All 7, In use 7, and Unused 0 filters, the Search networks box and the Remove unused and Create network buttons, and a list of networks with their driver, scope, subnet, and number of containers, where bridge, host, and none are marked system and n8n_default, node-app_default, and test_default are marked with their stack](https://cdn.ctrlops.io/docs/docker-networks-list.webp)

Every server has bridge, host, and none. The rest are networks you or your stacks made.

[Watch: Manage Docker Networks on One Screen - No docker network inspect (CtrlOps)](https://www.youtube.com/watch?v=-Vb6eXCUPh8)

## Find what you need

| I want to | Instead of typing | Go to |
| --- | --- | --- |
| Let two containers talk | `docker network create`, `docker network connect` | [Connect them](#let-two-containers-talk-to-each-other) |
| See my networks | `docker network ls` | [Read the list](#read-the-network-list) |
| See who is on a network | `docker network inspect` | [See the details](#see-the-details-of-a-network) |
| Create a network | `docker network create` | [Create a network](#create-a-network) |
| Connect or remove a container | `docker network connect`, `docker network disconnect` | [Connect or disconnect](#connect-or-disconnect-a-container) |
| Delete a network | `docker network rm` | [Delete a network](#delete-a-network) |
| Clear out old networks | `docker network prune` | [Remove unused](#remove-unused-networks) |

## Let two containers talk to each other

Say your `api` container needs to reach your `db` container.

### Create a network

Click **Create network** at the top right of the tab.

![The Docker Networks tab with the cursor on the Create network button at the top right, next to Remove unused](https://cdn.ctrlops.io/docs/docker-click-create-network-button.webp)

Create network is at the top right of the Networks tab.

Type a name such as `app-net`, and keep the **Driver** on `bridge`. Click **Create network**.

![The Create network dialog with the Name app-net, the Driver bridge with the line Private network on this server, the optional Subnet, Gateway, and IP range fields, the Internal and IPv6 checkboxes, Add label, and the Cancel and Create network buttons](https://cdn.ctrlops.io/docs/docker-create-network.webp)

For most networks, you only need a name.

### Connect both containers

Click the new network in the list. Under **Connect a container**, pick `api` and click **Connect**. Do the same for `db`. They do not need to restart.

![The details panel of the app-net network, with its IPAM subnet and gateway, the Containers table listing test-web-1 as running with its IP address, MAC address, and a Disconnect button, and Connect a container with postgressss picked, db typed as the alias, and the cursor on Connect](https://cdn.ctrlops.io/docs/docker-connect-container.webp)

Connect a container is in the details of the network.

### Use the container name

In your app, use the name of the other container as its host name. For example, `api` can reach the database at `db:5432`. Keep the same name if the container is recreated, and your app keeps working even if the IP address changes.

> Using Docker Compose? You can skip this. Services in one stack already share a network, named `<stack>_default`, and they reach each other by service name. For a new container, you can also pick the network in the [Create Container](https://ctrlops.io/docs/modules/docker/containers#run-a-container-from-an-image) form.

## Read the network list

Each row shows the name, driver, scope, subnet, and how many containers name that network, stopped ones too. **Search networks…** finds a network by its name, driver, or subnet.

| Mark | What it means |
| --- | --- |
| **system** | Docker needs this network, so you cannot delete it |
| **internal** | Containers on it cannot reach outside networks |
| **stack** | A Compose stack made it, and its next deploy makes it again if you delete it |

Every server has these three networks:

| Network | What it does |
| --- | --- |
| `bridge` | The default. Containers get a private address and can reach outside networks, but they cannot reach each other by name |
| `host` | The container uses the network of the server directly, with no separation |
| `none` | The container has no network at all |

## See the details of a network

Click a row to open its details: the **Summary**, **IPAM** with its subnet and gateway, **Containers** with each container's address and aliases, **Options**, and **Labels**. **View raw inspect** shows the full `docker inspect` output.

## Create a network

Click **Create network**. Only **Name** is required. Leave the rest alone unless you have a reason to change it.

| Field | What it does |
| --- | --- |
| **Name** | Letters, digits, dots, underscores, or hyphens. Start with a letter or a digit |
| **Driver** | The type of network. Keep `bridge` unless you know you need another one |
| **Subnet**, **Gateway**, **IP range** | Set your own addresses. Leave them empty and Docker picks free ones |
| **Internal** | No access to outside networks. Use it for a database that nothing outside should reach |
| **IPv6** | Turns on IPv6. It needs an IPv6 subnet |
| **Labels** | Optional notes for your own use |

### Which driver should I use?

| Driver | What it does | Use it when |
| --- | --- | --- |
| `bridge` | A private network on this server | **Almost always** |
| `macvlan` | Each container gets its own MAC address and an IP address on your physical network | A container must look like a separate device on your network |
| `ipvlan` | Each container gets an IP address on your physical network, using the MAC address of the server | Same as macvlan, where your network allows only one MAC address per port |
| `overlay` | Connects containers on more than one server | Your containers run on several servers. It needs Swarm mode |

`host` and `none` are in the list but turned off, because every server already has them.

> With `macvlan` and `ipvlan`, the server itself cannot reach containers on that network, and many cloud servers block these drivers. Docker does not check if another device already uses an address, so set an **IP range** that no other device uses.

These two drivers also ask for a **Parent interface**, such as `eth0`, a **Mode** (`L2` or `L3`), and a **Subnet**. CtrlOps fills in what it can read from the server.

### Use overlay and Swarm mode

Overlay needs Swarm mode. If it is off, CtrlOps says *Overlay needs Swarm mode. Swarm mode is off on this server.*, with two choices: **Use bridge** and **Start Swarm mode**. If your containers are all on one server, click **Use bridge**.

**Start Swarm mode** shows what will change before you confirm:

- This server becomes a Swarm manager, and Docker adds the `ingress` and `docker_gwbridge` networks.
- Running containers do not stop, and nothing is downloaded.

> Docker opens ports 2377, 7946, and 4789 for Swarm. Block them from the internet. To stop Swarm later, run `docker swarm leave --force` on the server.

To add another server, click **Copy join command** and run the command on that server. CtrlOps can start Swarm mode for an overlay network, but it does not manage Swarm services.

## Connect or disconnect a container

You can do this from either side:

- **From the network:** open its details and use **Connect a container**, or **Disconnect** on a row.
- **From the container:** open its [Network tab](https://ctrlops.io/docs/modules/docker/containers#connect-to-a-network) and use **Connect to a network**.

**Alias** is optional. It gives the container a second name on this network, such as `db` for a container named `postgres-prod`.

> When you disconnect a container, its programs lose that network right away. On a Compose container, the next deploy sets the networks from the compose file again, so make lasting changes there.

## Delete a network

Click **Delete** on the row and confirm. The button is off in these cases, and it tells you why:

| You see | What to do |
| --- | --- |
| *Docker needs this network.* | Nothing. This is a system network |
| *Used by* and a container name | Disconnect or delete that container first. A stopped container counts too |
| *Swarm manages this network.* | Change it with the Swarm tools on a manager server |

## Remove unused networks

Click **Remove unused** to see the networks no container names, and type `prune` to confirm. Docker's own networks are never listed.

![The Docker Networks tab with the cursor on the Remove unused button at the top, next to Create network](https://cdn.ctrlops.io/docs/docker-remove-unused-networks.webp.webp)

Remove unused is at the top of the Networks tab.

Networks of stopped stacks stay, because those stacks need them to start again. [Prune System](https://ctrlops.io/docs/modules/docker/dashboard#free-up-disk-space) can remove them along with their containers.

## Tips

- **Give each app its own network.** A database on `app-net` is only reachable by the containers you connected to it.
- **Use names, not IP addresses.** A container's IP address can change when it is recreated, and its name does not.
- **Use Internal for databases.** The database can still talk to your app, but it cannot reach outside networks.

## Troubleshooting

Most failures show **Show details** with the **Likely cause**, **Retry** where it helps, and **Copy report**. Send that report with any support question.

### My containers cannot reach each other

Check that both are on the same network, and not only on the default `bridge`, which has no names. Open the network and look at **Containers**. Use the container name and the port inside the container, not the published port. Also check that your app listens on `0.0.0.0`, not `127.0.0.1`.

### My container cannot reach the internet

Check that its network is not marked **internal**, and that the server itself can reach the internet.

### This subnet is in use on the server.

Another network or the server already uses those addresses. Type a different subnet, or leave it empty so Docker picks a free one.

### Ports do not apply to the host, none, macvlan or ipvlan networks.

On these networks, the container does not use Docker's port mapping. Pick a `bridge` network if you need a published port.

### A container on the host or none network cannot join other networks.

That container does not use Docker's networks at all, so it cannot join another one. To change this, recreate it on a `bridge` network.

### This interface is not on the server.

The **Parent interface** does not exist. Pick one from the list. If the message is *Another network uses this interface.*, pick another, or type a VLAN name such as `eth0.10`.

### This server is a Swarm worker.

A Swarm worker cannot make an overlay network. Make it on the manager server.

### Docker shows no networks.

Docker always has `bridge`, `host`, and `none`, so this means CtrlOps could not read them. Click **Retry**.

## Frequently Asked Questions

### Do I need to create a network to run a container?

No. A container joins the default `bridge` network if you pick nothing. Create your own network when containers need to reach each other by name.

### Why can't my containers reach each other by name?

Containers on the default `bridge` network cannot reach each other by name. Create your own network and connect both containers to it. Containers in the same Compose stack already share a network.

### Does a Docker network open my app to the internet?

No. A network only connects containers. People outside reach a container through a published port, which you set under **Port mapping**. **Internal** networks also block the containers from reaching outside networks.

### Does creating a network restart my containers?

No. Creating a network changes nothing for running containers, and you can connect a running container to a network without restarting it.

### Can I delete the bridge, host, or none network?

No. Docker needs them, so **Delete** is off for these networks.

### Does choosing overlay start Docker Swarm?

Only if you confirm. Overlay needs Swarm mode, so CtrlOps shows what will change and asks first. For containers on one server, use `bridge`, which does not need Swarm.
