Part 2 — run this after completing Explorer Installation (Preparation): configuration, secrets, DNS, and storage.
1. Create the Compose File
In /data/openscan/docker-compose.yml:
services: postgres: image: postgres:16 restart: unless-stopped environment: POSTGRES_USER: explorer POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_DB: explorer_db volumes: - pgdata:/var/lib/postgresql/data
indexer: image: ghcr.io/openscanai/indexer:latest restart: unless-stopped depends_on: [postgres] env_file: .env
api: image: ghcr.io/openscanai/api:latest restart: unless-stopped depends_on: [postgres] ports: - "127.0.0.1:4000:4000" env_file: .env
frontend: image: ghcr.io/openscanai/frontend:latest restart: unless-stopped depends_on: [api] ports: - "127.0.0.1:3000:3000" env_file: .env
volumes: pgdata:Ports are bound to localhost — the reverse proxy (step 5) exposes them publicly.
2. Pull Images and Start the Database
cd /data/openscandocker compose pulldocker compose up -d postgres3. Initialize the Database
docker compose run --rm indexer ./bin/migrate4. Start the Full Stack
docker compose up -ddocker compose logs -f indexerThe indexer begins backfilling immediately. On an established chain this runs for hours to days — the API and UI come up right away and fill in as history lands.
5. Put TLS in Front
Follow TLS / HTTPS Setup to serve the explorer on your domain with automatic certificates.
6. Verify
Run the full Explorer Verification checklist:
curl "http://127.0.0.1:4000/api/v2/blocks"Then check the UI at http://127.0.0.1:3000 (or via SSH tunnel) before and after TLS is live.
7. Finish the Setup
- Branding & Configuration — apply your logo, colors, and chain metadata
- Monitoring — dashboards and alerts
- Persistent Storage & Backups — schedule backups now, not after the first incident
- Explorer Audit — the pre-launch review