DataHub

Docker Quick Start

Deploy DataHub with Docker Compose and connect your first simulated device in minutes.

This guide gets a local DataHub stack running with the seeded demo plant streaming simulated telemetry.

Prerequisites

  • Docker Engine + Compose v2 (docker compose)
  • Host ports 4300 (UI) and 4400 (API) available
  • ~4 GB RAM recommended for first build

Start the stack

cd deploy
cp env.example .env
docker compose up -d --build

If you see pull access denied for datahub-backend, build the API image first:

docker compose build api
docker compose up -d --build

Access the console

SurfaceURLNotes
Consolehttp://localhost:4300Sign in with admin and your ADMIN_PASSWORD
REST APIhttp://localhost:4400Health check: GET /api/health
Swagger UI/api/docs on your API hostInteractive try-it UI
Public API reference/docs/reference/apiGenerated docs with playground (no login)

The default demo password is set in deploy/.env via ADMIN_PASSWORD. Change it before any shared deployment.

API access for integrators

  1. Sign in to the console or call POST /api/auth/login with your credentials
  2. Copy the JWT from the response
  3. Use it as Authorization: Bearer <token> on protected routes

Try the same token in Swagger (/api/docsAuthorize) or browse endpoints in the public API reference. Download the Postman collection from /devs when signed in.

What happens on first boot

  • PostgreSQL schema is applied and seed data is loaded (demo plant, devices, tags, rules)
  • The adapter orchestrator starts simulator devices
  • Telemetry flows through NATS to the telemetry worker and rule engine
  • The seeded rule MOTOR_HIGH_CURRENT fires periodically, creating alarms and test HTTP actions

Verify telemetry

  1. Open Operations Center in the console
  2. Navigate to UNS Explorer (/uns) and browse live tag values
  3. Open Alarms — you should see alarms from the demo rule within a few minutes

Configure API URL for production

NEXT_PUBLIC_API_URL is a build-time argument for the frontend. Set it before building:

EnvironmentValue
Localhttp://localhost:4400
Behind nginx on one hosthttps://your-domain.example

See System Requirements for production deployment notes.

Next steps