Dmitry Beresnev commited on
Commit ·
0568556
1
Parent(s): 52ba61b
fix connection conf for Chat of Openclaw UI, caddyfile, supervisord
Browse files- Caddyfile +44 -4
- Dockerfile +1 -0
- app.py +0 -7
- supervisord.conf +1 -1
Caddyfile
CHANGED
|
@@ -2,20 +2,60 @@
|
|
| 2 |
|
| 3 |
# OpenClaw main UI under /openclaw/
|
| 4 |
handle_path /openclaw/* {
|
| 5 |
-
reverse_proxy 127.0.0.1:18789
|
|
|
|
|
|
|
|
|
|
| 6 |
}
|
| 7 |
|
| 8 |
# OpenClaw UI uses absolute runtime paths; proxy them too.
|
| 9 |
handle /ws* {
|
| 10 |
-
reverse_proxy 127.0.0.1:18789
|
|
|
|
|
|
|
|
|
|
| 11 |
}
|
| 12 |
|
| 13 |
handle /__openclaw__/* {
|
| 14 |
-
reverse_proxy 127.0.0.1:18789
|
|
|
|
|
|
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
handle /ask {
|
| 18 |
-
reverse_proxy 127.0.0.1:18789
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
|
| 21 |
handle {
|
|
|
|
| 2 |
|
| 3 |
# OpenClaw main UI under /openclaw/
|
| 4 |
handle_path /openclaw/* {
|
| 5 |
+
reverse_proxy 127.0.0.1:18789 {
|
| 6 |
+
header_up Authorization "Bearer {$OPENCLAW_GATEWAY_TOKEN}"
|
| 7 |
+
header_up X-OpenClaw-Token "{$OPENCLAW_GATEWAY_TOKEN}"
|
| 8 |
+
}
|
| 9 |
}
|
| 10 |
|
| 11 |
# OpenClaw UI uses absolute runtime paths; proxy them too.
|
| 12 |
handle /ws* {
|
| 13 |
+
reverse_proxy 127.0.0.1:18789 {
|
| 14 |
+
header_up Authorization "Bearer {$OPENCLAW_GATEWAY_TOKEN}"
|
| 15 |
+
header_up X-OpenClaw-Token "{$OPENCLAW_GATEWAY_TOKEN}"
|
| 16 |
+
}
|
| 17 |
}
|
| 18 |
|
| 19 |
handle /__openclaw__/* {
|
| 20 |
+
reverse_proxy 127.0.0.1:18789 {
|
| 21 |
+
header_up Authorization "Bearer {$OPENCLAW_GATEWAY_TOKEN}"
|
| 22 |
+
header_up X-OpenClaw-Token "{$OPENCLAW_GATEWAY_TOKEN}"
|
| 23 |
+
}
|
| 24 |
}
|
| 25 |
|
| 26 |
handle /ask {
|
| 27 |
+
reverse_proxy 127.0.0.1:18789 {
|
| 28 |
+
header_up Authorization "Bearer {$OPENCLAW_GATEWAY_TOKEN}"
|
| 29 |
+
header_up X-OpenClaw-Token "{$OPENCLAW_GATEWAY_TOKEN}"
|
| 30 |
+
}
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
handle /gateway* {
|
| 34 |
+
reverse_proxy 127.0.0.1:18789 {
|
| 35 |
+
header_up Authorization "Bearer {$OPENCLAW_GATEWAY_TOKEN}"
|
| 36 |
+
header_up X-OpenClaw-Token "{$OPENCLAW_GATEWAY_TOKEN}"
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
handle /events* {
|
| 41 |
+
reverse_proxy 127.0.0.1:18789 {
|
| 42 |
+
header_up Authorization "Bearer {$OPENCLAW_GATEWAY_TOKEN}"
|
| 43 |
+
header_up X-OpenClaw-Token "{$OPENCLAW_GATEWAY_TOKEN}"
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
handle /socket* {
|
| 48 |
+
reverse_proxy 127.0.0.1:18789 {
|
| 49 |
+
header_up Authorization "Bearer {$OPENCLAW_GATEWAY_TOKEN}"
|
| 50 |
+
header_up X-OpenClaw-Token "{$OPENCLAW_GATEWAY_TOKEN}"
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
handle /health {
|
| 55 |
+
reverse_proxy 127.0.0.1:18789 {
|
| 56 |
+
header_up Authorization "Bearer {$OPENCLAW_GATEWAY_TOKEN}"
|
| 57 |
+
header_up X-OpenClaw-Token "{$OPENCLAW_GATEWAY_TOKEN}"
|
| 58 |
+
}
|
| 59 |
}
|
| 60 |
|
| 61 |
handle {
|
Dockerfile
CHANGED
|
@@ -42,6 +42,7 @@ ENV OPENCLAW_DISABLE_MDNS=1
|
|
| 42 |
ENV OPENCLAW_ONBOARD_NONINTERACTIVE=1
|
| 43 |
ENV OPENCLAW_CUSTOM_BASE_URL=https://researchengineering-agi.hf.space/v1
|
| 44 |
ENV OPENCLAW_CUSTOM_MODEL_ID=deepseek-chat
|
|
|
|
| 45 |
|
| 46 |
RUN mkdir -p /app/vault /app/.openclaw/state
|
| 47 |
|
|
|
|
| 42 |
ENV OPENCLAW_ONBOARD_NONINTERACTIVE=1
|
| 43 |
ENV OPENCLAW_CUSTOM_BASE_URL=https://researchengineering-agi.hf.space/v1
|
| 44 |
ENV OPENCLAW_CUSTOM_MODEL_ID=deepseek-chat
|
| 45 |
+
ENV OPENCLAW_GATEWAY_BIND=0.0.0.0
|
| 46 |
|
| 47 |
RUN mkdir -p /app/vault /app/.openclaw/state
|
| 48 |
|
app.py
CHANGED
|
@@ -616,13 +616,6 @@ with std_ui_embed_col:
|
|
| 616 |
else:
|
| 617 |
st.info("Standard UI proxy is not ready yet. Wait 10-30s and refresh.")
|
| 618 |
|
| 619 |
-
st.markdown("**Gateway Token**")
|
| 620 |
-
token_masked = f"{gateway_token[:4]}...{gateway_token[-4:]}" if gateway_token and len(gateway_token) > 8 else (gateway_token or "(not found)")
|
| 621 |
-
st.code(token_masked)
|
| 622 |
-
show_full_token = st.checkbox("Show full token (sensitive)", value=False)
|
| 623 |
-
if show_full_token and gateway_token:
|
| 624 |
-
st.text_input("OPENCLAW_GATEWAY_TOKEN", value=gateway_token, type="password")
|
| 625 |
-
|
| 626 |
st.divider()
|
| 627 |
|
| 628 |
cfg_col, env_col = st.columns(2)
|
|
|
|
| 616 |
else:
|
| 617 |
st.info("Standard UI proxy is not ready yet. Wait 10-30s and refresh.")
|
| 618 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 619 |
st.divider()
|
| 620 |
|
| 621 |
cfg_col, env_col = st.columns(2)
|
supervisord.conf
CHANGED
|
@@ -5,7 +5,7 @@ pidfile=/tmp/supervisord.pid
|
|
| 5 |
user=root
|
| 6 |
|
| 7 |
[program:openclaw]
|
| 8 |
-
command=/bin/sh -lc "AUTH_FILE_MAIN=/app/.openclaw/state/agents/main/agent/auth-profiles.json; AUTH_FILE_DEV=/app/.openclaw/state/agents/dev/agent/auth-profiles.json; if [ \"${OPENCLAW_ONBOARD_NONINTERACTIVE:-1}\" = \"1\" ] && [ ! -s \"$AUTH_FILE_MAIN\" ] && [ ! -s \"$AUTH_FILE_DEV\" ]; then echo '[onboard] running non-interactive setup'; openclaw onboard --non-interactive --mode local --auth-choice custom-api-key --custom-base-url \"${OPENCLAW_CUSTOM_BASE_URL}\" --custom-model-id \"${OPENCLAW_CUSTOM_MODEL_ID}\" --gateway-port 18789 --gateway-bind
|
| 9 |
autorestart=true
|
| 10 |
startsecs=5
|
| 11 |
startretries=20
|
|
|
|
| 5 |
user=root
|
| 6 |
|
| 7 |
[program:openclaw]
|
| 8 |
+
command=/bin/sh -lc "AUTH_FILE_MAIN=/app/.openclaw/state/agents/main/agent/auth-profiles.json; AUTH_FILE_DEV=/app/.openclaw/state/agents/dev/agent/auth-profiles.json; GATEWAY_BIND=${OPENCLAW_GATEWAY_BIND:-0.0.0.0}; if [ \"${OPENCLAW_ONBOARD_NONINTERACTIVE:-1}\" = \"1\" ] && [ ! -s \"$AUTH_FILE_MAIN\" ] && [ ! -s \"$AUTH_FILE_DEV\" ]; then echo '[onboard] running non-interactive setup'; openclaw onboard --non-interactive --mode local --auth-choice custom-api-key --custom-base-url \"${OPENCLAW_CUSTOM_BASE_URL}\" --custom-model-id \"${OPENCLAW_CUSTOM_MODEL_ID}\" --gateway-port 18789 --gateway-bind \"$GATEWAY_BIND\" --skip-skills --accept-risk --secret-input-mode plaintext || true; fi; python /app/scripts/bootstrap_gateway_token.py; exec openclaw gateway run --port 18789 --bind \"$GATEWAY_BIND\" --allow-unconfigured --dev"
|
| 9 |
autorestart=true
|
| 10 |
startsecs=5
|
| 11 |
startretries=20
|