Site Tools


troubleshooting:coolify_ssh_docker_gateway

Coolify Uses Docker Network Gateway as Host IP

Affects: Coolify

Fact

From inside a Docker container, the correct IP to reach the host machine is the Docker network gateway, not the server's LAN IP or host.docker.internal.

For the cafe stack:

  • ✅ Correct: 172.18.0.1 (Docker network gateway)
  • ❌ Wrong: 192.168.1.65 (LAN IP — SSH connects but Coolify validation fails)
  • ❌ Wrong: host.docker.internal (not reliably available on all Docker setups)

How to find the gateway

docker network inspect cafe_cafe_net | grep Gateway

Fixing it in the Coolify database

docker exec coolify-db psql -U coolify -d coolify \
  -c "UPDATE servers SET ip = '172.18.0.1' WHERE name = 'localhost';"

See Also

troubleshooting/coolify_ssh_docker_gateway.txt · Last modified: by 127.0.0.1