fix: change gateway backend URLs from service name to host.docker.internal

Update gateway configuration to use host.docker.internal instead of backend service name for API communication. Add extra_hosts mapping in docker-compose to enable host.docker.internal resolution. Add NEXAVPN_BACKEND_HOST environment variable to .env.example with host.docker.internal default.
This commit is contained in:
2026-03-17 19:43:56 +01:00
parent c921e86a11
commit 4a2985ae5e
2 changed files with 8 additions and 5 deletions

View File

@@ -15,10 +15,11 @@ DEFAULT_GATEWAY_PUBLIC_KEY=replace-me
GATEWAY_BOOTSTRAP_TOKEN=nexavpn-gateway-bootstrap
NEXAVPN_GATEWAY_ID=
NEXAVPN_GATEWAY_NAME=primary-gateway
NEXAVPN_GATEWAY_SYNC_URL=http://backend:8080/api/v1/gateway-agent
NEXAVPN_GATEWAY_BOOTSTRAP_URL=http://backend:8080/api/v1/gateway-agent/bootstrap
NEXAVPN_GATEWAY_SYNC_URL=http://host.docker.internal:8080/api/v1/gateway-agent
NEXAVPN_GATEWAY_BOOTSTRAP_URL=http://host.docker.internal:8080/api/v1/gateway-agent/bootstrap
NEXAVPN_API_TOKEN=
NEXAVPN_GATEWAY_PRIVATE_KEY=
NEXAVPN_GATEWAY_INTERFACE=wg0
NEXAVPN_UPLINK_INTERFACE=eth0
NEXAVPN_ENABLE_MASQUERADE=true
NEXAVPN_BACKEND_HOST=host.docker.internal