From 09d57cf392ecda8d86dba7926c510e873d5bf746 Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Sun, 1 Feb 2026 08:32:31 +1100 Subject: [PATCH] Update --- docker/moltbot/docker-entrypoint.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docker/moltbot/docker-entrypoint.sh diff --git a/docker/moltbot/docker-entrypoint.sh b/docker/moltbot/docker-entrypoint.sh new file mode 100644 index 0000000..8b61fb3 --- /dev/null +++ b/docker/moltbot/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e + +# Always update config to ensure trustedProxies is set for k8s ingress +# Using clawdbot.json (default config name) instead of moltbot.json +# Config includes: +# - trustedProxies: k8s pod network CIDRs for nginx ingress +# - controlUi.allowInsecureAuth: true - allows token-only auth behind reverse proxy +# - auth.mode: token - requires gateway token for authentication +echo '{"gateway":{"mode":"local","bind":"lan","port":18789,"trustedProxies":["10.42.0.0/16","10.43.0.0/16"],"controlUi":{"allowInsecureAuth":true},"auth":{"mode":"token"}},"agents":{"defaults":{"workspace":"/home/node/clawd"}}}' > /home/node/.clawdbot/clawdbot.json + +echo "Clawdbot config written:" +cat /home/node/.clawdbot/clawdbot.json + +echo "Starting clawdbot gateway..." +exec "$@"