Simford.Dong Claude commited on
Commit
0e9d3a7
·
1 Parent(s): 89d226e

Fix OpenClaw config format for valid startup

Browse files

- Fix agents.defaults.model: should be object with id, not string
- Remove invalid gateway.bind config
- Set auth.mode to "none" for no authentication
- Simplify startup command

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. Dockerfile +11 -9
Dockerfile CHANGED
@@ -11,7 +11,6 @@ RUN mkdir -p /root/.openclaw
11
 
12
  # Set up environment for Hugging Face Spaces
13
  ENV PORT=7860
14
- ENV GATEWAY_CONTROLUI_ALLOWINSECUREAUTH=true
15
 
16
  # Expose the port (Hugging Face default)
17
  EXPOSE 7860
@@ -23,15 +22,18 @@ if [ ! -f /root/.openclaw/openclaw.json ]; then\n\
23
  cat > /root/.openclaw/openclaw.json << EOF\n\
24
  {\n\
25
  "gateway": {\n\
26
- "bind": "0.0.0.0",\n\
27
- "port": 7860,\n\
28
- "controlUi": {\n\
29
- "allowInsecureAuth": true\n\
 
30
  }\n\
31
  },\n\
32
- "agents": {\n\
33
- "defaults": {\n\
34
- "model": "anthropic/claude-sonnet-4-20250514"\n\
 
 
35
  }\n\
36
  }\n\
37
  }\n\
@@ -39,7 +41,7 @@ EOF\n\
39
  fi\n\
40
  \n\
41
  # Start OpenClaw gateway\n\
42
- exec openclaw gateway --port 7860 --verbose\n\
43
  ' > /usr/local/bin/start-openclaw && chmod +x /usr/local/bin/start-openclaw
44
 
45
  CMD ["/usr/local/bin/start-openclaw"]
 
11
 
12
  # Set up environment for Hugging Face Spaces
13
  ENV PORT=7860
 
14
 
15
  # Expose the port (Hugging Face default)
16
  EXPOSE 7860
 
22
  cat > /root/.openclaw/openclaw.json << EOF\n\
23
  {\n\
24
  "gateway": {\n\
25
+ "port": 7860\n\
26
+ },\n\
27
+ "agent": {\n\
28
+ "model": {\n\
29
+ "id": "anthropic/claude-sonnet-4-20250514"\n\
30
  }\n\
31
  },\n\
32
+ "connect": {\n\
33
+ "params": {\n\
34
+ "auth": {\n\
35
+ "mode": "none"\n\
36
+ }\n\
37
  }\n\
38
  }\n\
39
  }\n\
 
41
  fi\n\
42
  \n\
43
  # Start OpenClaw gateway\n\
44
+ exec openclaw gateway --port 7860\n\
45
  ' > /usr/local/bin/start-openclaw && chmod +x /usr/local/bin/start-openclaw
46
 
47
  CMD ["/usr/local/bin/start-openclaw"]