> ## Documentation Index
> Fetch the complete documentation index at: https://proxylink.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker gateway: the log and what to do

> Every sentence the ProxyLink gateway container prints in its log, what it means and what to do. The health check, and a device that does not answer.

This page belongs to [Docker gateway](https://proxylink.dev/docs/tunnels/docker-gateway.md). It describes release **v0.2.0** of the container.

Start with the container's own log. Every line begins with `ProxyLink:`.

```bash theme={null}
docker logs proxylink-gateway
```

## A normal start

| The log says | What it means |
| - | - |
| `gateway v0.2.0 starting` | The release that runs. |
| `made a new key for this gateway` | First start with an empty volume. |
| `ready. Gateway 10.100.0.7 forwards to 192.168.1.0/24, 192.168.40.0/24 only; the agent asks ProxyLink which networks it carries, and runs nothing. Connecting to ProxyLink.` | The rules are set, for the networks named. The agent is on. |
| `ready. Gateway 10.100.0.7 forwards to 192.168.1.0/24 only; connecting to ProxyLink.` | The same, without the agent line. |
| `OK. Connected to ProxyLink.` | ProxyLink answered. The gateway is online. |
| `networks changed. This gateway now forwards to 192.168.1.0/24, 192.168.40.0/24 only.` | A network was added or removed on the gateway's page, and the container has applied it. |
| `ProxyLink could not be asked yet; starting with the networks this gateway carried last time.` | ProxyLink could not be reached at the start. The saved list is used. |

## It keeps trying by itself

| The log says | What it means and what to do |
| - | - |
| `could not reach ProxyLink yet: … Trying again in 5s` | The host has no way out to ProxyLink yet. Check its internet connection and DNS. The wait grows up to five minutes. |
| `ProxyLink answered 503. Trying again in 5s` | ProxyLink was busy. Wait. |
| `no answer from ProxyLink for 3 minutes. Check this host's internet connection; if this gateway was removed in ProxyLink, stop this container.` | The gateway is offline. Check the host's internet connection, and that outgoing UDP is not blocked at the site. |
| `ProxyLink answered 404 to the question about networks (404: this gateway is not known there, was it removed? 429: asked too often). Keeping the networks it has; asking again every ten minutes.` | With 404: the gateway was removed in ProxyLink. Stop the container and run `docker compose down -v`. With 429: nothing to do. |
| `PROXYLINK_URL is missing or is not a ProxyLink link, so the agent stays off: this gateway carries 192.168.1.0/24 only.` | The `PROXYLINK_URL` line was taken out of the Compose file. Put it back as it was. |
| `the list of networks could not be saved in /data; it is applied, and will be asked again after a restart.` | The volume is full or not writable. The networks work now. Check the volume. |

## "not carried, and why"

When the container refuses a network, it says so once:

```
ProxyLink: not carried, and why: 192.168.50.0/24>10.128.9.0/24=overlap-docker
```

Each item is the network, the range ProxyLink uses for it, and a code. The code is the reason, and the gateway's page shows the same reason as a sentence: see [When the container refuses a network](https://proxylink.dev/docs/tunnels/docker-gateway.md#when-the-container-refuses-a-network). The networks that are not named in the line are carried.

A related line is `the rules for a changed list of networks were refused: … Nothing was changed.` The host's kernel refused the new rules, and the container kept what it had.

## It stopped and waits

When something is wrong that a restart cannot fix, the container says what once, takes its connection to ProxyLink down, reports itself unhealthy and waits. It does not exit and it does not loop. Fix the cause, then start it again.

| The log says | What to do |
| - | - |
| `ProxyLink refused this link (410): this link has expired; create a new one on the Devices page. With a new link from the Devices page, start again with an empty volume (docker compose down -v).` | The 30 minutes passed. Run `docker compose down -v`, generate a new Compose file, start again. |
| A line that begins `ProxyLink refused this link (409)` | The link was used before. Most often the container was started again with an emptied volume, so it has another key: remove the gateway in ProxyLink and add it again. If it was not you, see the warning below. |
| `this container is running in the host's network (it sees 'docker0'). It must run in its own network, as in the Compose file from ProxyLink: remove 'network_mode: host'. Nothing was changed on the host.` | Remove `network_mode: host`. Use the Compose file as ProxyLink gave it. |
| `the /data volume is missing or not writable. Keep the volume from the Compose file ProxyLink gave you.` | Put the `volumes:` lines back. |
| `/run is not writable. Keep 'tmpfs: /run' from the Compose file.` | Put the `tmpfs:` lines back. |
| `PROXYLINK_LAN is missing or is not a private network like 192.168.1.0/24. Copy the Compose file again from the Devices page.` | The line was changed or removed. Generate the file again. |
| `PROXYLINK_URL is missing or is not a ProxyLink link. Copy the Compose file again from the Devices page.` | The same, for the link. |
| `IP forwarding is off in this container. Keep 'sysctls: net.ipv4.ip_forward=1' from the Compose file.` | Put the `sysctls:` lines back. |
| `your network 192.168.1.0/24 overlaps the Docker network this container is on (192.168.0.2/20). Give the container's network another range in the Compose file (networks: ipam), or use a router as the gateway.` | Docker gave the container a network that overlaps yours. Set another range for it in the Compose file. |
| `this host's kernel has no WireGuard, or the container may not use it (it needs cap_add: NET_ADMIN). …` | Keep `cap_add` as in the file. If it is there, the host's kernel is too old or built without WireGuard. |
| A line that begins `the firewall rule` or `the firewall rules were refused` | The host's kernel lacks something the container's rules need. Use another host, or a router gateway. |
| `the stored key is damaged. Remove the volume (docker compose down -v), remove this gateway in ProxyLink and add it again.` | Do what it says. |
| A line that begins `ProxyLink's answer was not what this gateway may accept` | The container did not trust what it was told at its first start, for example a first network other than `PROXYLINK_LAN`. Run `docker compose down -v`, remove the gateway in ProxyLink if it is listed, and add it again. If it repeats, contact us. |

> [!WARNING]
>
> **"A gateway link was used twice."** If a second machine presents the link of your gateway, ProxyLink refuses it, sends you one email, and shows a notice on the gateway's page. If you started the container again with an empty volume, nothing is wrong: remove the gateway and add it again. If you did not, somebody else may have the Compose file. Check that the gateway shown as connected is your machine. If you are not sure, remove it now.

## The health check

The image has a health check, so `docker ps` shows `healthy` or `unhealthy` beside the container. Docker runs it once a minute.

* **healthy**: no standing error, and ProxyLink answered within the last three minutes.
* **unhealthy**: the container stopped and waits (see above), or ProxyLink has not answered for more than three minutes.

During the first two minutes after a start Docker shows `health: starting`. The health check only reports: read the log to see why.

**healthy** is about the container and its connection to ProxyLink. It does not say that a device on your network answers: a device that is switched off, or a network the Docker host cannot reach, leaves the container healthy. For that, see the last part of this page.

## The gateway is online but a device does not answer

* Check that the device's address is inside a network the page shows as **On the gateway**.
* For a network you added: check that the Docker host itself can reach an address in it.
* Remember that devices see the connection as coming from the Docker host. A firewall on the device, or between the networks, must allow that address.
* A scan of the network also comes from the Docker host's own address, so a firewall there will name that machine.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.