Skip to content

armgit / kwant

Public Imported from GitHub
0

Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.

1.1 KB
Raw Blame
#!/bin/bash
set -e

# Persistent user data directory for Chromium (saves cookies, local storage, logins, passwords)
CHROME_DATA_DIR="${CHROME_USER_DATA_DIR:-/workspace/.chromium_data}"
mkdir -p "$CHROME_DATA_DIR"

# Remote debugging port: --remote-debugging-port=9222
chromium \
  --headless=new \
  --remote-debugging-port=9223 \
  --remote-allow-origins="*" \
  --no-sandbox \
  --disable-gpu \
  --disable-dev-shm-usage \
  --disable-software-rasterizer \
  --window-size=1280,800 \
  --user-data-dir="$CHROME_DATA_DIR" \
  --password-store=basic \
  --enable-features=PasswordImport,AutofillServerCommunication \
  --disable-blink-features=AutomationControlled &

# Proxy incoming port 9222 from container network to local Chromium on 9223.
# max-children caps forked copies so a connection leak runs out of room loudly (ECONNREFUSED) well
# before it exhausts the container's processes/threads and takes Chromium down with it (#753). No
# timeout: a site guard or download connection sitting idle is normal, not stuck.
socat TCP-LISTEN:9222,fork,reuseaddr,max-children=64 TCP:127.0.0.1:9223 &

exec sleep infinity