Files
home-docker/docker/moltbot/docker-entrypoint.sh
T
2026-02-01 08:32:31 +11:00

17 lines
772 B
Bash

#!/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 "$@"