Setup and Troubleshooting

August 14, 2026 · View on GitHub

Pentest Copilot supports macOS, Linux, and Windows through WSL2. The default Docker deployment is local-only: application and infrastructure ports bind to 127.0.0.1.

Setup matrix

PriorityEnvironment or failureWhat Pentest Copilot doesWhat you should do
P0Native Windows PowerShell, CMD, or Git BashThe launcher stops before creating partial configuration.Install WSL2, enable Docker Desktop's WSL integration, and clone the repository inside the WSL filesystem.
P0Remote Docker contextThe launcher rejects ssh:// and tcp:// Docker endpoints because bind mounts would point at the remote machine.Switch to a local context with docker context use default or run the repository on the Docker host.
P0Public or LAN exposureCompose binds every published port to loopback. Production mode refuses non-HTTPS frontend/CORS settings.Keep the default for a workstation. For remote access, use the reverse-proxy procedure below.
P0Open registrationOnly the first account can register. The UI hides registration afterward, and the API also enforces it with a unique installation-owner record.Create the owner account once and retain its credentials.
P0Invalid model key, model name, URL, or subscription loginTest & Save performs real inference. Unverified models cannot satisfy onboarding.Correct the error shown by the model test. For a local Docker-hosted API, use host.docker.internal, not localhost.
P0Upgrade from the session-only data modelMongoDB migrations run automatically before readiness succeeds and are idempotent after an interrupted start.Let startup finish; inspect ./run.sh logs backend if readiness fails.
P0Lost MongoDB, Redis, configuration, or workspaces./run.sh backup exports both databases and archives configuration and persistent workspace paths with owner-only permissions.Back up before upgrades. Never run docker compose down -v unless you intend to delete Docker volumes.
P0Untrusted SSH serverExternal SSH profiles require a matching known_hosts entry, including nonstandard ports.Connect once with the normal ssh alias command and verify the fingerprint, then retry.
P0VPN bundle uses separate certificates, keys, PKCS#12, or credentialsThe uploader accepts one .ovpn/.conf plus up to 15 referenced assets, stores them with restrictive permissions, and uploads them together.Select all bundle files in the file chooser. Interactive auth-user-pass prompts are rejected; include a credentials file or connect manually.
P0Stale VPN PID or another OpenVPN process on the work hostStatus and disconnect operations only act on PID files and command lines created by Pentest Copilot.Manage unrelated VPN processes outside Pentest Copilot.
P0Browser target is only reachable through the SSH host's VPNThe Browser Agent settings warn that the browser runs beside the backend, not on the SSH work host.Connect the VPN in the backend/local work host, or expose an HTTP/SOCKS proxy reachable by the backend.
P0Backend compromise reaches the Docker daemonThe backend no longer mounts the Docker socket or controls work hosts through Docker APIs.No action required.
P1Docker missing, stopped, old, or Compose v1The launcher checks Docker Engine 20+, Compose v2, and daemon connectivity.Install/update Docker Desktop or Docker Engine plus the Compose plugin.
P1Port collisionBefore a first start, the launcher identifies occupied TCP ports and the owning listener where the OS exposes it.Stop the listener, then retry. The standard ports are 3000, 8080, 6080, 9020, 27017, and 6379; Kali adds 4200, 4242, and 5901.
P1Low disk or memoryThe launcher warns below 20 GB free disk or 8 GB RAM.Free disk, increase Docker Desktop resources, reduce concurrent agents, or avoid the built-in Kali desktop.
P1ARM64 hostThe launcher warns because some third-party Kali tools are x86_64-only.Use core mode with an ARM64 work host where possible; install unsupported tools manually or use an x86_64 attack box.
P1Rootless DockerThe launcher warns and blocks built-in Kali, which needs privileged networking.Use core mode with an external SSH work host, or switch to non-rootless Docker. Local OpenVPN also needs NET_ADMIN and /dev/net/tun.
P1Repository or SSH folder permission errorThe launcher checks repository writability; workspace selection performs a real create/write/delete probe. Mounts are read-only where possible.Fix ownership for the clone/workspace. In Docker, use container-visible paths and ensure Docker Desktop can share the directory.
P1SSH config split with IncludeConcrete aliases in common include files and config.d/* globs are discovered. Wildcard-only hosts are intentionally not shown.Select a concrete alias. Set HOST_SSH_DIR before start if .ssh lives somewhere else.
P1Private key outside .ssh, encrypted key, or SSH agent~/.ssh, ~/keys, and ssh-keys/ are supported; a live SSH_AUTH_SOCK is mounted automatically and preferred.Set HOST_SSH_KEYS_DIR, copy a key into ssh-keys/, or run ssh-add before ./run.sh start. Never commit keys.
P1ProxyJump or ProxyCommand SSH profileThe connection test reports that embedded SSH cannot use that profile instead of silently trying the wrong direct route.Create a local SSH tunnel/direct alias reachable by the backend, then select that alias.
P1Non-Debian Linux work hostAutomatic APT-based capability installs stop with a specific distro message. macOS uses Homebrew when supported.Install the capability with the host's package manager, then run capability detection again.
P1Slow package installCapability installation allows up to ten minutes.Watch the terminal output; preinstall very large GUI tools if the network is slow.
P1Corporate proxy or custom CADocker build proxy variables are detected. A valid host NODE_EXTRA_CA_CERTS file is mounted into the backend automatically.Export HTTP_PROXY, HTTPS_PROXY, NO_PROXY, and/or NODE_EXTRA_CA_CERTS before starting. Configure Docker Desktop's own proxy/CA trust for image pulls and builds.
P1Development modeThe launcher checks pnpm, installs locked dependencies, starts only MongoDB/Redis (optionally Kali), and prints the exact three local commands.Use Node 22+ and pnpm 9+. Install Patchright Chromium when prompted if Browser Agent is needed.
P2SELinux enforcing on LinuxDocker may reject or isolate bind mounts even when Unix ownership looks correct.Prefer rootless-safe core mode or label the specific repository bind paths for container access according to your distribution policy. Do not disable SELinux globally.
P2Air-gapped or intermittently connected hostExisting images and installed models continue to work; first builds, browser downloads, package installs, and hosted model tests need their upstreams.Pre-pull/build images and preinstall tools while online, then use a reachable local model endpoint.
P2Multiple clones running togetherThe launcher rejects an existing Compose project owned by another working directory; fixed host ports are also checked.Run one clone at a time unless you deliberately assign unique Compose project names, ports, and frontend/backend URLs.
P2Workspace path contains spacesLocal and SSH work folders are shell-quoted and tested before saving.Select an absolute path (~ is accepted for SSH). Avoid newline/control characters, which are rejected.
P2IPv6-only target or unusual DNSCommand execution uses the work host's network and resolver; individual pentest tools determine IPv6 support.Verify resolution and routing in the workspace terminal, then choose IPv6-capable tool flags.

Normal installation

git clone https://github.com/bugbasesecurity/pentest-copilot.git
cd pentest-copilot
./run.sh start

Open http://localhost:3000, create the installation-owner account, then add and verify an orchestrator under Settings → Models. Open a workspace's Connection page and save a local folder or tested SSH alias.

For subsequent starts, use ./run.sh start -q. Useful diagnostics are:

./run.sh status
./run.sh logs backend
docker compose config

Windows with WSL2

  1. Install WSL2 and a Linux distribution.
  2. Enable that distribution under Docker Desktop → Resources → WSL Integration.
  3. In the WSL terminal, clone under ~/, not /mnt/c.
  4. Run ./run.sh start from WSL and open the printed localhost URL in Windows.

If Docker is unavailable inside WSL, fix Docker Desktop integration rather than installing a second Docker daemon inside the distribution.

SSH checklist

The backend resolves OpenSSH aliases with ssh -G. Confirm the same alias works outside Pentest Copilot first:

ssh-add -l                 # if the key is loaded in an agent
ssh-keygen -F lab-box      # use [host]:port for a nonstandard port
ssh -v lab-box

In Docker, localhost means the backend container. To reach a service on the Docker host, use host.docker.internal. To reach the built-in Kali container, use the generated kali profile/default rather than host port 4242.

Backups and recovery

Run:

./run.sh backup

The timestamped directory under backups/ contains MongoDB and Redis exports, configuration (including secrets), Kali data when present, and backend workspace data in Docker mode. Copy it to encrypted storage. A restore replaces live data, so stop the application and restore with the native mongorestore, Redis dump.rdb, and tar tools after reviewing the archive contents; keep the original backup untouched until the restored stack passes its health check.

Reverse proxy and TLS

The supported default is workstation-local. If remote access is required:

  1. Keep Compose ports on 127.0.0.1.
  2. Put an authenticated TLS reverse proxy on the same host. Start from deploy/Caddyfile.example; do not proxy MongoDB, Redis, Kali SSH/shell, or the unauthenticated noVNC port.
  3. Set deployment = "PROD", base_url_frontend, and cors_origins to the same explicit HTTPS origin in config.toml.
  4. Set NEXT_PUBLIC_BACKEND_URI to that HTTPS origin and NEXT_PUBLIC_DEPLOYMENT=PROD in frontend/.env, then rebuild the frontend.
  5. Restart and verify login, API requests, shell WebSockets, and registration closure from a private browser window.

Production startup fails closed when the frontend URL or CORS origins are not HTTPS or the session secret is shorter than 32 characters.

Updating

./run.sh backup
git pull --ff-only
./run.sh start

Choose the rebuild option after pulling code. Automatic migrations complete before the health endpoint reports ready. Do not use docker compose down -v during a normal update.