Compare commits

..

5 commits

Author SHA1 Message Date
Philip Peterson
671ff1d774 openclaw: fix app container mount so CLI probes can connect to gateway
Remove :ro from the .openclaw volume so the CLI can write state files
on startup (it was crashing immediately with EROFS). Add
OPENCLAW_GATEWAY_TOKEN so the CLI bypasses the device identity
handshake when auth=none, allowing the gateway reachability probe to
succeed before the device is auto-approved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 04:00:03 -07:00
Philip Peterson
aee8dbda75 openclaw: mount gateway node_modules into control center for CLI access
Control center runs 'openclaw status --json' as a subprocess to probe
the gateway. Mount the gateway install volume and set OPENCLAW_BIN_PATH
so the control center can find the binary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 03:45:28 -07:00
Philip Peterson
2971282c45 openclaw: use --dev --auth none for gateway startup
Newer openclaw (2026.6.6) requires more config than our minimal json.
--dev creates a working config if missing, --auth none skips token
auth since the gateway is loopback-only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 03:36:21 -07:00
Philip Peterson
64672a1cde openclaw: add gateway as separate host-network container
Gateway runs in its own node:22-alpine container with host networking,
installs openclaw@latest on first boot (persisted to /var/openclaw/gateway).
Control center also switches to host networking so ws://127.0.0.1:18789
reaches the gateway's loopback. UI_BIND_ADDRESS locked to 127.0.0.1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 03:30:13 -07:00
Philip Peterson
45d673c292 openclaw: default to English and add basic auth
- Patch app source at startup to change default language from zh to en
- Add basicAuth (ironmagma) to nginx vhost for claw.quineglobal.com

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 03:13:31 -07:00
3 changed files with 38 additions and 7 deletions

View file

@ -2,24 +2,50 @@
{
project.name = "openclaw";
networks.openclaw.external = false;
services = {
gateway = {
service = {
image = "node:22-alpine";
container_name = "openclaw-gateway";
restart = "unless-stopped";
network_mode = "host";
volumes = [
"/var/openclaw/gateway:/app"
"/root/.openclaw:/root/.openclaw"
];
environment = {
OPENCLAW_HOME = "/root/.openclaw";
};
command = [
"sh" "-c"
''
set -e
if [ ! -f /app/node_modules/.bin/openclaw ]; then
cd /app && npm install openclaw@latest
fi
exec /app/node_modules/.bin/openclaw gateway --port 18789 --dev --auth none
''
];
};
};
app = {
service = {
image = "node:lts-alpine";
image = "node:22-alpine";
container_name = "openclaw";
restart = "unless-stopped";
networks = [ "openclaw" ];
network_mode = "host";
volumes = [
"/var/openclaw/app:/app"
"/root/.openclaw:/root/.openclaw:ro"
"/var/openclaw/gateway:/gateway"
"/root/.openclaw:/root/.openclaw"
];
ports = [ "127.0.0.1:4310:4310" ];
environment = {
PORT = "4310";
UI_BIND_ADDRESS = "0.0.0.0";
UI_BIND_ADDRESS = "127.0.0.1";
OPENCLAW_HOME = "/root/.openclaw";
OPENCLAW_BIN_PATH = "/gateway/node_modules/.bin/openclaw";
OPENCLAW_GATEWAY_TOKEN = "openclaw-local-dev";
};
command = [
"sh" "-c"
@ -35,6 +61,9 @@
sed -i "s|OPENCLAW_HOME=.*|OPENCLAW_HOME=/root/.openclaw|" .env
sed -i "s|PORT=.*|PORT=4310|" .env
fi
sed -i 's/resolveUiLanguage(url.searchParams, "zh")/resolveUiLanguage(url.searchParams, "en")/g' src/ui/server.ts
sed -i 's/hasExplicitLanguage ? resolvedLanguage : "zh"/hasExplicitLanguage ? resolvedLanguage : "en"/g' src/ui/server.ts
sed -i 's/language: "zh",/language: "en",/g' src/runtime/ui-preferences.ts
npm install
npm run build
exec npm run dev:ui

View file

@ -243,6 +243,7 @@ in {
"d /var/paperless/postgres 0755 root root"
"d /var/paperless/redis 0755 root root"
"d /var/openclaw/app 0755 root root"
"d /var/openclaw/gateway 0755 root root"
"d /var/riverside/files 0755 root root"
"d /var/riverside/postgres 0755 root root"
"d /var/lib/gitea-runner/ubuntu 0755 gitea-runner gitea-runner"

View file

@ -56,6 +56,7 @@
enableACME = true;
forceSSL = false;
addSSL = true;
basicAuthFile = "/var/openclaw/htpasswd";
locations."/" = {
proxyPass = "http://127.0.0.1:4310/";