#14254: fix: resolve Render deploy timeout by fixing port and bind config
docker
stale
Cluster:
Docker and Deployment Improvements
Two issues prevented Render from detecting the open port:
1. render.yaml set PORT env var, but the app reads OPENCLAW_GATEWAY_PORT
2. Dockerfile defaulted to --bind loopback (127.0.0.1), unreachable by Render's external health checks — now uses --bind lan (0.0.0.0)
https://claude.ai/code/session_01MMWWXLnNcAyQM9D5XaYDH3
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Fixes two Render deployment issues: renames the `PORT` env var in `render.yaml` to `OPENCLAW_GATEWAY_PORT` (which the app actually reads), and changes the Dockerfile default bind from `loopback` (127.0.0.1) to `lan` (0.0.0.0) so Render's external health checks can reach the gateway.
- **`render.yaml`**: `PORT` → `OPENCLAW_GATEWAY_PORT` to match the env var the gateway code reads via `resolveGatewayPort()`.
- **`Dockerfile`**: Default CMD now includes `--bind lan` instead of defaulting to loopback, making the gateway reachable from outside the container.
- **Potential concern**: Render Docker services route traffic to the `PORT` env var (default 10000). Removing the `PORT` key may cause a routing mismatch if Render falls back to its default while the app listens on 8080. Verify that Render correctly routes to the app's actual listen port.
<h3>Confidence Score: 3/5</h3>
- The bind mode change is correct, but the port env var rename may introduce a routing mismatch on Render
- The `--bind lan` change is clearly correct for container deployments. However, removing the `PORT` env var from render.yaml could cause Render to route traffic to its default port (10000) while the app listens on 8080, potentially recreating the health-check timeout issue. The security implications are addressed — `OPENCLAW_GATEWAY_TOKEN` is already configured with `generateValue: true`, satisfying the non-loopback auth requirement.
- `render.yaml` — verify that Render correctly routes traffic to the app's listen port without an explicit `PORT` env var
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#13539: Claude/update dockerfile cmd 1 te te
by federiconicolasvozza-oss · 2026-02-10
80.2%
#10024: Add Render blueprint for OpenClaw
by nima779 · 2026-02-06
79.0%
#3514: fix: Render deployment support with CIDR trustedProxies and LLM con...
by ojusave · 2026-01-28
77.3%
#6638: fix: make Dockerfile work on container platforms (Render, Railway, ...
by kaizen403 · 2026-02-01
76.4%
#11272: Update render.yaml
by raushan-s · 2026-02-07
73.7%
#9999: Docker: fix token mismatch and add dev setup workflow
by benclarkeio · 2026-02-06
73.7%
#8050: fix: docker hardening
by christopherbarnett96 · 2026-02-03
73.5%
#17916: [ fix ] : correct config directory path during onboarding
by Dijo-404 · 2026-02-16
72.5%
#21784: fix(security): restrict gateway ports to loopback by default
by smilekyra · 2026-02-20
71.8%
#4695: Fixed the default CLI image to use published GHCR image
by TASMAYU · 2026-01-30
71.5%