Docker (Local Build)
This guide walks you through building and running recon-web from source using Docker Compose. This approach gives you the full stack — API server, web UI, and CLI — built from the code on your machine.
Prerequisites
Section titled “Prerequisites”- Docker Engine 20+
- Docker Compose v2+ (the
docker composeplugin, not the legacydocker-composebinary)
Getting started
Section titled “Getting started”-
Clone the repository:
Terminal window git clone https://github.com/brunoafk/recon-web.gitcd recon-web -
Create your environment file:
Terminal window cp .env.example .envEdit
.envto add API keys or enable authentication. See Configuration for all options. -
Start all services:
Terminal window docker compose up -dDocker builds the images from source on first run. Subsequent starts reuse the cached images unless the source changes.
-
Open the web UI at http://localhost:8080 and run your first scan.
Services
Section titled “Services”| Service | Port | Description |
|---|---|---|
api | 3000 | Fastify API server — runs all handlers, stores scan history |
web | 8080 | Nginx-served frontend — proxies API requests to the api service |
cli | (none) | CLI container (on-demand, activated via Docker Compose profiles) |
Custom ports
Section titled “Custom ports”Override the default ports with environment variables:
API_PORT=4000 WEB_PORT=9090 docker compose up -dOr set them in your .env file:
API_PORT=4000WEB_PORT=9090Running CLI scans
Section titled “Running CLI scans”The CLI service uses a Docker Compose profile and only runs when explicitly invoked:
docker compose run --rm cli scan https://example.comdocker compose run --rm cli ssl https://example.comdocker compose run --rm cli scan --json https://example.com > results.jsonData persistence
Section titled “Data persistence”Scan history is stored in a SQLite database inside a Docker volume called scan-data. This volume persists across container restarts and rebuilds.
Backup
Section titled “Backup”docker compose cp api:/app/data/recon-web.db ./backup-recon-web.dbRestore
Section titled “Restore”docker compose cp ./backup-recon-web.db api:/app/data/recon-web.dbdocker compose restart apiRebuilding images
Section titled “Rebuilding images”If you pull new source code or make changes, rebuild the images:
docker compose builddocker compose up -dStopping
Section titled “Stopping”Stop all services but keep volumes (scan history preserved):
docker compose downStop all services and delete volumes (scan history deleted):
docker compose down -v