Earn 14 free days when your bug report or suggestion is accepted — how it works
Back to blog

Self-Hosting an Automated QA Loop for AI-Generated Code

CodeLoop TeamApril 27, 20267 min read

Self-Hosting an Automated QA Loop for AI-Generated Code

For most teams, the right answer is: install codeloop, point your editor at it, and let the cloud handle billing and OSS verification. The data plane is already local — your tests, screenshots, and videos never leave your machine.

But some teams have stricter requirements. Air-gapped networks. Government clouds. Customer code that legally cannot touch a third-party service even for an auth handshake. For those teams, CodeLoop self-hosts cleanly with Docker Compose. This post is the short-form runbook; the full reference lives at /docs/self-host.

What you actually run

Three containers and a Postgres:

  • codeloop-backend — the auth, billing, and key-issuance service. In self-host mode, billing is a no-op and keys are issued from a local CLI.
  • codeloop-dashboard — the local artifact viewer (screenshots, videos, gate scores). Lives on http://localhost:3737.
  • codeloop-mcp — the MCP server itself. Each developer machine runs its own; only the backend is shared.
  • Postgres — for the backend's user / key / OSS-application tables. Any 14+ instance works.
  • The MCP server has a CODELOOP_MODE=local flag that bypasses cloud key validation entirely. If you trust your network you can run that mode and skip the backend altogether.

    The 10-line Compose file

    services:

    postgres:

    image: postgres:16

    environment: { POSTGRES_PASSWORD: changeme }

    volumes: ["pg:/var/lib/postgresql/data"]

    backend:

    image: codeloop/backend:latest

    environment:

    DATABASE_URL: postgres://postgres:changeme@postgres:5432/codeloop

    JWT_SECRET: ${JWT_SECRET}

    NODE_ENV: production

    ports: ["8787:8787"]

    depends_on: [postgres]

    volumes: { pg: {} }

    Then on each dev machine:

    export CODELOOP_BACKEND_URL=https://qa.internal.example.com

    export CODELOOP_API_KEY=

    npx codeloop install

    That's it. Every codeloop_verify, codeloop_gate_check, and codeloop_design_compare runs locally; nothing leaves your perimeter.

    What still works in self-host mode

    All 29 MCP tools. Visual regression. Design comparison. Multi-section orchestration. The local dashboard. The GitHub Action (point it at your internal backend URL). The Cursor extension and the Claude Code toolkit are unchanged.

    What you give up

  • OSS auto-verification. The hosted service checks GitHub repo licenses to auto-approve OSS plans; in self-host mode you issue keys manually.
  • Hosted billing. You're not running Stripe; you also don't need to.
  • Hosted run history across machines. Each developer's runs live on their own machine + the local dashboard. If you want a team-wide history, a small S3 bucket + the codeloop_flush_usage tool's s3 mode covers it.
  • When to self-host vs. when to use the hosted plan

    Use the hosted plan if you want zero ops, OSS auto-verification, hosted billing, and you're fine with auth tokens flowing to api.codeloop.tech. (Your code, screenshots, and gate scores never do.)

    Self-host if regulation, contracts, or principle says no third-party endpoints. The product surface is identical.

    Self-host runbook → · Compare to other tools →

    Frequently asked questions

    Can I run CodeLoop fully on-premise?

    Yes. The MCP server has a CODELOOP_MODE=local flag for fully air-gapped use, and the backend, dashboard, and Postgres can run via Docker Compose inside your own network.

    Does CodeLoop send my code or screenshots to a third party?

    No. The data plane (tests, screenshots, videos, diagnoses, gate scores) is always local on the developer's machine. Only auth and billing touch codeloop.tech, and those are skipped entirely in self-host / local mode.

    Do I lose features if I self-host?

    All 29 MCP tools work identically. You give up hosted billing, OSS auto-verification (keys are issued manually), and hosted cross-machine run history (a small S3 bucket replaces it).

    What does the self-host stack look like?

    Three containers (backend, dashboard, MCP server) plus a Postgres. Docker Compose handles the lot; each developer machine runs its own MCP server pointed at the shared backend URL.