Skip to content

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.

  • Docker Engine 20+
  • Docker Compose v2+ (the docker compose plugin, not the legacy docker-compose binary)
  1. Clone the repository:

    Terminal window
    git clone https://github.com/brunoafk/recon-web.git
    cd recon-web
  2. Create your environment file:

    Terminal window
    cp .env.example .env

    Edit .env to add API keys or enable authentication. See Configuration for all options.

  3. Start all services:

    Terminal window
    docker compose up -d

    Docker builds the images from source on first run. Subsequent starts reuse the cached images unless the source changes.

  4. Open the web UI at http://localhost:8080 and run your first scan.

ServicePortDescription
api3000Fastify API server — runs all handlers, stores scan history
web8080Nginx-served frontend — proxies API requests to the api service
cli(none)CLI container (on-demand, activated via Docker Compose profiles)

Override the default ports with environment variables:

Terminal window
API_PORT=4000 WEB_PORT=9090 docker compose up -d

Or set them in your .env file:

Terminal window
API_PORT=4000
WEB_PORT=9090

The CLI service uses a Docker Compose profile and only runs when explicitly invoked:

Terminal window
docker compose run --rm cli scan https://example.com
Terminal window
docker compose run --rm cli ssl https://example.com
Terminal window
docker compose run --rm cli scan --json https://example.com > results.json

Scan history is stored in a SQLite database inside a Docker volume called scan-data. This volume persists across container restarts and rebuilds.

Terminal window
docker compose cp api:/app/data/recon-web.db ./backup-recon-web.db
Terminal window
docker compose cp ./backup-recon-web.db api:/app/data/recon-web.db
docker compose restart api

If you pull new source code or make changes, rebuild the images:

Terminal window
docker compose build
docker compose up -d

Stop all services but keep volumes (scan history preserved):

Terminal window
docker compose down

Stop all services and delete volumes (scan history deleted):

Terminal window
docker compose down -v