Run always-on Gigbotic specialists on any Debian, Ubuntu, or RHEL Linux VPS without exposing inbound webhook ports or maintaining custom relay code. This production runbook walks through deploying the open-source Gigbotic Managed Relay Web App (https://github.com/lesscodeio/gigbotic-webook-webapp) with per-job Docker containers, the 3-tier Host Egress Proxy, headless CLI OAuth (codex, claude, agy), Creator Studio Quick Fill, PM2, and Day-2 troubleshooting.
Connect accounts across supported OAuth providers, review sensitive agent writes at $0/min with playable previews, and build OAuth-enabled agents safely.
Why self-host on Linux VPS and how to size your machine
Why self-host on Linux VPS and how to size your machine
The open-source Gigbotic Managed Relay Web App (https://github.com/lesscodeio/gigbotic-webook-webapp) is a zero-dependency Node.js 22+ server with built-in node:sqlite durability, an authenticated Web Console, an interactive browser PTY terminal (pty-runner.py), and the shared runner-sandbox.mjs + egress-proxy.mjs security engine. It connects outward over wss://webhook.gigbotic.com/ws/ch_... using zero-trust Managed Relay tokens (rly_...), so your VPS never needs an open inbound webhook port.
Every incoming job is verified and decrypted (HMAC-SHA256 + AES-256-GCM), deduplicated in SQLite, prefetched against your agent's SHA-256-verified Cloud Core Files, and launched inside an ephemeral hardened Docker container on the --internalgigbotic-sandbox-net bridge. Size your VPS based on your agent's Execution Sandbox mode and concurrent job count.
Supported Linux distros: Ubuntu 22.04/24.04 LTS, Debian 12, RHEL 9 / Rocky / AlmaLinux (x86_64 or arm64).
Core runtime: Node.js >= 22.5.0 (built-in node:sqlite, zero npm install dependencies), Python 3 (stdlib pty module for the browser terminal), and Docker Engine (>= 24.x).
One Managed Relay instance can host multiple Gigbotic agents simultaneously, each pinned 1:1 to its own ID, CLI engine (, , or ), model override, and relay channel.
Recommended Linux VPS Sizing by Agent Workload
Workload & Sandbox Mode
Minimum VPS
Recommended VPS
Typical Concurrency & Notes
Workload & Sandbox ModeSaaS, CRM, Social & Research (`mcp_only` / `read_only`)
Minimum VPS2 vCPU · 4 GB RAM · 40 GB SSD
Step 1 • Base host setup
Clone the repository, install Node 22 + CLIs, and enable Docker Engine
Run the Managed Relay under a dedicated non-root Linux user (for example gigbotic or your standard VPS admin user, never root). Clone the public repository, run scripts/install-linux.sh to install Node.js 22 LTS, @openai/codex, Claude Code CLI, Antigravity CLI (agy), and PM2 cleanly under ~/.local/bin, then install Docker Engine and grant your non-root user access to the Docker daemon.
Remember to start a fresh login shell (newgrp docker or re-SSH) after adding your user to the docker group so PM2 and server.mjs inherit the group membership and can reach without .
Step 2 • Hardened runner image
Build gigbotic-runner:latest, extend custom toolchains, and enable GPU pass-through
The repository ships a hardened, non-root docker/Dockerfile.runner built on node:22-bookworm-slim. It bundles Node 22, Python 3 (python3-pil, python3-venv), ffmpeg, git, jq, ripgrep, unzip, fonts-dejavu-core, Codex CLI, Claude Code CLI, and Antigravity (agy), strips all SUID/SGID bits (), omits , , , and , and runs as UID/GID ().
Step 3 • Console access & TLS
Start the Web Console securely via SSH tunnel or HTTPS reverse proxy
By default, server.mjs binds strictly to `127.0.0.1:3450`. On first start, if data/auth.json does not exist, it generates a high-entropy password and prints it once to stdout. Set your own strong console credentials anytime with bash scripts/set-password.sh "YourStrongPassword" gigbotic.
The Web Console enforces a hardened security posture out of the box: scrypt-hashed credentials stored with 0600 permissions in data/auth.json, HMAC-SHA256 signed `HttpOnly; Secure; SameSite=Lax` session cookies (7-day TTL), per-IP login rate limiting, same-origin CSRF checks on CLI/terminal endpoints, Cache-Control: no-store, private, , and masked secret storage in .
Step 4 • Auth & Creator Studio pairing
Complete headless CLI OAuth and pair agents via Creator Studio Quick Fill
Headless Linux servers do not have a desktop browser for interactive codex, claude, or agy sign-in. Open the Web Console's CLI & MCP Terminal tab (powered by pty-runner.py) to run interactive login commands right inside your browser—with zero SSH port forwarding.
When codex login, claude, or agy login prints an OAuth authorization URL that redirects back to http://127.0.0.1:<port>/callback?..., open the authorization link in your local browser, finish sign-in, copy the failed localhost redirect URL from your browser's address bar, and paste it into the console's bar. The server validates that the target is loopback ( / , ports , never ) and replays the callback directly to your waiting VPS CLI process.
Configure runtime overrides in .env or your shell environment before running npm run pm2:start (or pm2 restart gigbotic-managed-relay --update-env). ecosystem.config.cjs forwards all Docker and egress overrides cleanly to server.mjs.
All 16 Environment Variables Supported by gigbotic-webook-webapp
Variable
Default
Reference • Container isolation
Docker container hardening flags and dynamic resource limits
Every job turn runs in a fresh --rm --init container named gigbotic-job-<jobId>-<deliveryId> with zero direct internet route, zero host $HOME exposure, kernel-enforced read-only Core Files overlays, and automatic orphan container cleanup when server.mjs boots. If a buyer clicks Stop or Send now (job.turn_stopped) or cancels the job (job.cancel_requested), the relay immediately executes docker kill on the active container so compute and billing stop on the spot.
Step 5 • Day-2 operations
Operate 24/7 with PM2, automated tests, and the cron watchdog
Keep the Managed Relay online across VPS reboots and memory spikes with PM2 (ecosystem.config.cjs, configured with autorestart: true and max_memory_restart: "512M") paired with scripts/ensure-running.sh in your user crontab. Whenever you pull updates from GitHub, run npm test to verify runner-sandbox.mjs and egress-proxy.mjs before restarting PM2.
Example
Help • Diagnostics
Troubleshooting Docker, egress blocks, and runtime errors
Inspect live container output in the Web Console's Live Runs tab, host relay logs via pm2 logs gigbotic-managed-relay, and the Runner Security Telemetry banner inside Creator Studio (/creator/agents/[id]). Most production issues fall into six clear categories.
Common Linux Managed Relay & Docker Troubleshooting Matrix
Symptom / Error
Root Cause
Exact Fix
Put the guide into practice
Jump directly into the live platform surfaces covered in this guide.
How Gigbotic separates /mcp/creator from /mcp with 24 tools, single-job tokens, 5-layer security, Docker/Hub isolation, and client-only room mailboxes.
Typical Concurrency & NotesSet GIGBOTIC_DOCKER_MEMORY=6g or 8g and GIGBOTIC_DOCKER_TMPFS_SIZE=1g; optionally enable GIGBOTIC_DOCKER_GPUS=all for NVENC/CUDA.
/var/run/docker.sock
sudo
Example
# 1. Clone the public Managed Relay Web App
git clone https://github.com/lesscodeio/gigbotic-webook-webapp.git ~/gigbotic-webook-webapp
cd ~/gigbotic-webook-webapp
# 2. Install Node 22 LTS, Codex CLI, Claude Code CLI, Antigravity (agy), and PM2 into ~/.local/bin
bash scripts/install-linux.sh
export PATH="$HOME/.local/bin:$PATH"
# 3. Install Docker Engine (Debian/Ubuntu) and allow your non-root user to run containers
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker "$USER"
newgrp docker
docker info --format '{{.ServerVersion}}'
find / -perm /6000 -type f -exec chmod a-s {} +
sudo
ssh
cron
docker-cli
1000
runner
Build the base image once from the repository root with docker build -t gigbotic-runner:latest -f docker/Dockerfile.runner . (or npm run docker:build). Because GIGBOTIC_SANDBOX_DRIVER defaults to auto on Linux, server.mjs automatically detects Docker + gigbotic-runner:latest, creates the --internal bridge network gigbotic-sandbox-net (br-gbsandbox), and launches the Host Egress Proxy.
If your agent needs specialized packages—such as Playwright/Chromium, LibreOffice, LaTeX, Go, Rust, or Python scientific wheels—never install them at runtime inside a locked container. Instead, write a small derived Dockerfile starting with FROM gigbotic-runner:latest, build it as a custom tag, and point GIGBOTIC_RUNNER_IMAGE to it. For video rendering or ML workloads on a GPU VPS, install the NVIDIA Container Toolkit on the host and set GIGBOTIC_DOCKER_GPUS=all (or device=0).
Set GIGBOTIC_REQUIRE_DOCKER=1 on Multi-Tenant Production VPS Hosts
Production Guardrail
In auto mode, if the Docker daemon stops or gigbotic-runner:latest is missing, the runner falls back to native OS sandboxing. Setting GIGBOTIC_REQUIRE_DOCKER=1 fails closed instead of downgrading isolation, ensuring no client job ever executes outside a container.
Example
# Build the default hardened runner image
cd ~/gigbotic-webook-webapp
docker build -t gigbotic-runner:latest -f docker/Dockerfile.runner .
# Optional: Derived custom Dockerfile (e.g. Dockerfile.custom) for Chromium / Python data tools
# FROM gigbotic-runner:latest
# USER root
# RUN apt-get update && apt-get install -y --no-install-recommends chromium pandoc \
# && rm -rf /var/lib/apt/lists/*
# RUN find / -perm /6000 -type f -exec chmod a-s {} + 2>/dev/null || true
# USER 1000:1000
# Build and activate:
docker build -t my-agent-runner:latest -f Dockerfile.custom .
export GIGBOTIC_RUNNER_IMAGE=my-agent-runner:latest
export GIGBOTIC_REQUIRE_DOCKER=1
# Optional NVIDIA GPU pass-through:
# export GIGBOTIC_DOCKER_GPUS=all
X-Robots-Tag: noindex, nofollow
0600
data/webhooks.json
Never bind UI_HOST=0.0.0.0 directly to the public internet. For solo operators, an SSH local port forward (ssh -L 3450:127.0.0.1:3450 user@your-server) gives full live WebSocket streaming at http://127.0.0.1:3450 with zero exposed ports. If you prefer a browser URL over HTTPS, deploy one of the three drop-in reverse-proxy templates bundled under reverse-proxy/.
Zero Exposed Ports
SSH Tunnel (Recommended Default)
Run ssh -L 3450:127.0.0.1:3450 user@your-vps and open http://127.0.0.1:3450. Full live WebSocket console streaming and PTY terminal without opening port 80/443.
reverse-proxy/Caddyfile
Caddy (Automatic HTTPS + WS)
Automatic Let's Encrypt TLS certificates with native /ws WebSocket upgrades proxied cleanly to 127.0.0.1:3450.
reverse-proxy/nginx.conf
Nginx (HTTPS + WS Upgrade)
Production Nginx site config forwarding HTTPS traffic and Upgrade: websocket headers to 127.0.0.1:3450 with strict security headers.
reverse-proxy/apache-php/
Apache + PHP-FPM Fallback
For managed LAMP hosts without mod_proxy_http. Keep the gigbotic-webook-webapp directory outside your public web root.
Example
# Set console password and start under PM2
bash scripts/set-password.sh "ReplaceWithAStrongPassphrase!" gigbotic
npm run pm2:start
pm2 save
# Access safely from your laptop with zero open firewall ports:
ssh -L 3450:127.0.0.1:3450 user@your-vps-ip
# Open http://127.0.0.1:3450 in your browser
Complete OAuth Callback
127.0.0.1
localhost
1024–65535
UI_PORT
Next, pair each Gigbotic agent 1:1: open Creator Studio → MCP Connections → Wakeup Webhooks (/creator/mcp?tab=webhooks), click Provision Managed Relay, bind the endpoint to a single owned agent (agt_...), subscribe to all needed lifecycle events (up to 12 events, including job.turn_stopped), and copy the one-time "Managed Relay Provisioned" environment snippet. In the Linux Web Console, click Add Agent, paste that snippet into Quick Fill from Creator Studio to auto-fill all 4 relay fields (GIGBOTIC_RELAY_URL, GIGBOTIC_RELAY_TOKEN, GIGBOTIC_WEBHOOK_ID, GIGBOTIC_WEBHOOK_SECRET), select the CLI engine (codex, claude, or agy) and optional model override, and save.
1-click MCP presets: Use the CLI & MCP Terminal's built-in presets to inspect codex mcp list / claude mcp list or register https://gigbotic.com/mcp/creator for authoring while keeping runtime jobs strictly pinned to https://gigbotic.com/mcp with ephemeral bw_job_... tokens.
Zero local AGENTS.md copy needed: Publish your agent's AGENTS.md (and optional SKILL.md / helper scripts) as Cloud Core Files in Creator Studio or via manage_agent_core_files on /mcp/creator. The Managed Relay prefetches and SHA-256 verifies them via read_agent_core_files before spawning each container.
Verify end to end: Click Send Test in Creator Studio to confirm WSS delivery and decryption (webhook.test), then run a Private Sample Job and 6-Stage Gigbotic Tests from /creator/agents/[id].
Purpose & Production Guidance
VariableUI_HOST
Default127.0.0.1
Purpose & Production GuidanceBind interface for the Web Console HTTP/WS server. Keep on 127.0.0.1 behind SSH tunnel or reverse proxy.
VariableUI_PORT
Default3450
Purpose & Production GuidanceTCP port for the Web Console and /api/health endpoint.
VariableGIGBOTIC_CONSOLE_USER
Defaultgigbotic
Purpose & Production GuidanceInitial Web Console login username used only when initializing data/auth.json.
VariableGIGBOTIC_CONSOLE_PASSWORD
DefaultRandom once on boot
Purpose & Production GuidanceInitial Web Console password if data/auth.json does not exist; prefer scripts/set-password.sh after boot.
VariableGIGBOTIC_SANDBOX_DRIVER
Defaultauto (Linux)
Purpose & Production GuidanceIsolation engine: auto (uses Docker when image + daemon are ready, else native), docker (force Docker), or native.
VariableGIGBOTIC_REQUIRE_DOCKER
Default0 (unset)
Purpose & Production GuidanceSet to 1 to fail closed if Docker or GIGBOTIC_RUNNER_IMAGE is unavailable instead of falling back to native.
VariableGIGBOTIC_RUNNER_IMAGE
Defaultgigbotic-runner:latest
Purpose & Production GuidanceDocker image tag used for per-job containers. Override when using a custom derived Dockerfile.
Root CauseThe container requested a domain disallowed by the agent's networkPolicy (locked allows only Gigbotic /mcp, upload hosts, and active CLI LLM APIs; public_web blocks Git hosts and npm/PyPI/Docker registries) or a private/metadata IP / non-443 port.
Exact FixCheck pm2 logs for [egress-blocked] host=... reason=.... For legitimate client-site browsing or Git/package installs, update Execution & Deliverable Security Policy in Creator Studio to public_web or public_web_and_git (with allowExternalGitClone). Never bypass the proxy for private IPs.
Root CauseThe Linux user running PM2 cannot access /var/run/docker.sock, gigbotic-runner:latest has not been built yet, or an outdated runner is omitting runner_security telemetry.
Exact FixRun sudo usermod -aG docker $USER, rebuild with npm run docker:build, set GIGBOTIC_REQUIRE_DOCKER=1, and restart PM2 from a fresh shell (pm2 kill && npm run pm2:start).
Symptom / Error`CORE_FILES_REQUIRED` error on job pickup
Root CauseThe agent version has no published Cloud Core Files (AGENTS.md), so the pre-spawn read_agent_core_files gate refuses to start the job.
Exact FixOpen Creator Studio → Agent → Core Files (or call manage_agent_core_files on /mcp/creator), publish AGENTS.md, and retry.
Root CauseAn inner CLI (such as Codex or Claude Code) tried to spawn a nested Linux namespace inside a --cap-drop=ALL container without container-aware flags.
Exact FixPull the latest gigbotic-webook-webapp (runner-sandbox.mjs automatically passes container-safe CLI flags when running inside Docker) and confirm npm test passes.
Symptom / Error`agy` binary not found inside Docker container
Root CauseDockerfile.runner installs agy best-effort; on some architectures or custom builds the host binary is newer.
Exact FixInstall agy on the Linux host at ~/.local/bin/agy (bash scripts/install-linux.sh): runner-sandbox.mjs automatically bind-mounts the host binary read-only at /usr/local/bin/agy:ro.