From a8eb6b3cfaf566c289d8e4dd26aa7c2711fb9ca6 Mon Sep 17 00:00:00 2001 From: Valerio Date: Sat, 20 Jun 2026 14:43:55 +0200 Subject: [PATCH] fix(deploy): write WEBCLAW_API_KEY in generated .env, not WEBCLAW_AUTH_KEY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit setup.sh and deploy/hetzner.sh emitted WEBCLAW_AUTH_KEY into the server's .env, but webclaw-server reads WEBCLAW_API_KEY (env = "WEBCLAW_API_KEY"). The generated key was silently ignored — and since hetzner.sh binds 0.0.0.0, the server refused to start at all (it rejects a public bind without WEBCLAW_API_KEY). Fix both .env writers, plus the hetzner help line that told users to grep the wrong name and the env.example sample. Co-Authored-By: Claude Opus 4.8 (1M context) --- deploy/hetzner.sh | 4 ++-- env.example | 2 +- setup.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/hetzner.sh b/deploy/hetzner.sh index 826c9b5..5deff22 100755 --- a/deploy/hetzner.sh +++ b/deploy/hetzner.sh @@ -196,7 +196,7 @@ build_cloud_init() { local env_content="# webclaw deployment — generated by hetzner.sh WEBCLAW_HOST=0.0.0.0 WEBCLAW_PORT=3000 -WEBCLAW_AUTH_KEY=$auth_key +WEBCLAW_API_KEY=$auth_key OLLAMA_HOST=http://ollama:11434 OLLAMA_MODEL=$ollama_model WEBCLAW_LOG=info" @@ -469,7 +469,7 @@ create_server() { printf " ${BOLD}SSH:${RESET} ssh root@%s\n" "$server_ip" printf " ${BOLD}Auth key:${RESET} %s\n" "$(mask_secret "$AUTH_KEY")" printf " ${DIM}(full key stored in /opt/webclaw/.env on the server:\n" - printf " ssh root@%s 'grep WEBCLAW_AUTH_KEY /opt/webclaw/.env')${RESET}\n" "$server_ip" + printf " ssh root@%s 'grep WEBCLAW_API_KEY /opt/webclaw/.env')${RESET}\n" "$server_ip" echo printf " ${BOLD}Monitor build progress:${RESET}\n" printf " ssh root@%s 'cd /opt/webclaw && docker compose logs -f'\n" "$server_ip" diff --git a/env.example b/env.example index cfe9c61..58e3182 100644 --- a/env.example +++ b/env.example @@ -29,7 +29,7 @@ OLLAMA_MODEL=qwen3:8b # --- Server (webclaw-server only) --- # WEBCLAW_PORT=3000 # WEBCLAW_HOST=0.0.0.0 -# WEBCLAW_AUTH_KEY=your-auth-key +# WEBCLAW_API_KEY=your-auth-key # WEBCLAW_MAX_CONCURRENCY=50 # WEBCLAW_JOB_TTL_SECS=3600 # WEBCLAW_MAX_JOBS=100 diff --git a/setup.sh b/setup.sh index 1b3c0fb..f059ba3 100755 --- a/setup.sh +++ b/setup.sh @@ -244,7 +244,7 @@ EOF # --- Server --- WEBCLAW_PORT=$server_port WEBCLAW_HOST=0.0.0.0 -WEBCLAW_AUTH_KEY=$auth_key +WEBCLAW_API_KEY=$auth_key # --- Logging --- WEBCLAW_LOG=info