Files
claw3d/.env.example
T
iamlukethedev e71b62444c fix: resolve gateway URL at runtime via /api/studio fallback (#66)
Fixes #57 — NEXT_PUBLIC_GATEWAY_URL is a build-time variable that gets
baked into the client bundle. Changing it in .env and restarting has no
effect without a rebuild.

- normalizeLocalGatewayDefaults now accepts the sanitized public form
  ({url, tokenConfigured}) from /api/studio
- When no saved gateway URL exists, prefer runtime localGatewayDefaults
  (from openclaw.json or CLAW3D_GATEWAY_URL env var) over the
  potentially stale build-time NEXT_PUBLIC_GATEWAY_URL
- loadLocalGatewayDefaults falls back to CLAW3D_GATEWAY_URL/TOKEN env
  vars when openclaw.json is absent
- Added runtime env vars documentation to .env.example and README

Co-authored-by: robotica4us-collab <neo@openclaw.ai>
Made-with: Cursor
2026-03-27 14:45:02 -05:00

30 lines
1000 B
Bash

# Browser/client gateway URL (build-time — requires `npm run build` after changes)
NEXT_PUBLIC_GATEWAY_URL=ws://localhost:18789
# Runtime gateway URL — takes effect on restart without a rebuild.
# Use this instead of NEXT_PUBLIC_GATEWAY_URL when you want to change the
# gateway endpoint without re-running `npm run build`. Also used as a
# fallback when openclaw.json is not present.
# CLAW3D_GATEWAY_URL=ws://localhost:18789
# CLAW3D_GATEWAY_TOKEN=
# Debug UI
DEBUG=true
# App server
# PORT=3000
# HOST=127.0.0.1
# Optional: required only for public/remote deployments
# STUDIO_ACCESS_TOKEN=
# Advanced only: some gateway-host operations can still use SSH, but marketplace skill install does not require it.
# OPENCLAW_GATEWAY_SSH_TARGET=
# OPENCLAW_GATEWAY_SSH_USER=
# OPENCLAW_GATEWAY_SSH_PORT=
# OPENCLAW_GATEWAY_SSH_STRICT_HOST_KEY_CHECKING=accept-new
# Optional: voice features
# ELEVENLABS_API_KEY=
# ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM
# ELEVENLABS_MODEL_ID=eleven_flash_v2_5