Unearth DocsUnearth Docs

Installation

Install with Docker Compose

Build and run the web app, API, worker, PostgreSQL, Redis, and database migrations on your own host.

You need Docker Engine, Docker Compose with --wait support, persistent disk space, and a reverse proxy that provides HTTPS. The current application repository requires access while public release preparation continues.

  1. Get the application

    git clone https://github.com/UnearthHQ/unearth-chat-app.git
    cd unearth-chat-app
    cp .env.example .env.production
    chmod 600 .env.production
    
  2. Configure your installation

    Edit .env.production using the configuration reference. Set unique database and Redis passwords, an authentication signing secret, public HTTPS origins, AI credentials and a model, and SMTP or Resend email.

    Generate each secret separately:

    openssl rand -hex 32
    
  3. Build and start the services

    docker compose --env-file .env.production -f compose.production.yaml up -d --build --wait
    

    Compose starts PostgreSQL and Redis, runs migrations, and then starts the API, worker, and web app. The migration container exits after success. The image is built locally; no published container image is required.

  4. Configure HTTPS routing

    Route your app hostname to http://127.0.0.1:3000 and your API hostname to http://127.0.0.1:4000. These are the default host ports.

    Set WEB_ORIGIN and API_BASE_URL to the corresponding public HTTPS origins. For sibling hostnames, set AUTH_COOKIE_DOMAIN to their shared parent domain. See configuration for same-origin routing.

    If the proxy runs in a container, give it access to the application network or host ports. Its own 127.0.0.1 does not refer to the Docker host.

  5. Verify the installation

    docker compose --env-file .env.production -f compose.production.yaml ps
    curl --fail http://127.0.0.1:4000/ready
    curl --fail http://127.0.0.1:3000/api/ready
    

    Open the public HTTPS app URL, create an account, verify email delivery, and complete onboarding. Readiness checks do not prove that external AI providers or ingestion are working; verify the research flows you enable.

Troubleshooting startup

docker compose --env-file .env.production -f compose.production.yaml logs --tail=100 api worker web

Check the migration service separately if the API or worker is waiting to start:

docker compose --env-file .env.production -f compose.production.yaml logs migrate

Keep PostgreSQL, Redis, and artifact volumes across updates. Do not delete volumes to resolve an application startup error.

For development without the production stack, follow the application local development guide.

Unearth DocsUnearth Docs

Search documentation

8 pages to explore

Guide / Get startedResearch with the source in viewFind properties, research owners, and compare markets with Unearth. Start with the product or run your own installation.Guide / Get startedResearch with UnearthAsk focused questions, inspect the evidence, and build on results in your workspace.Self-hosting / InstallationInstall with Docker ComposeBuild and run the web app, API, worker, PostgreSQL, Redis, and database migrations on your own host.Self-hosting / InstallationConfigurationConfigure origins, storage, authentication, AI, email, and optional research providers for your installation.Self-hosting / OperationsDatabase migrationsApply pending schema changes before starting a new application release.Self-hosting / OperationsData ingestionEnable automated acquisition and publication for the datasets and geographic coverage your installation needs.Project / About UnearthArchitectureUnderstand the boundary between the public website, documentation, and application runtime.Project / About UnearthProject statusCurrent implementation boundaries, public-release preparation, and planned integrations.