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 --buildIf you see pull access denied for datahub-backend, build the API image first:
docker compose build api
docker compose up -d --buildAccess the console
| Surface | URL | Notes |
|---|---|---|
| Console | http://localhost:4300 | Sign in with admin and your ADMIN_PASSWORD |
| REST API | http://localhost:4400 | Health check: GET /api/health |
| Swagger UI | /api/docs on your API host | Interactive try-it UI |
| Public API reference | /docs/reference/api | Generated 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
- Sign in to the console or call
POST /api/auth/loginwith your credentials - Copy the JWT from the response
- Use it as
Authorization: Bearer <token>on protected routes
Try the same token in Swagger (/api/docs → Authorize) 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_CURRENTfires periodically, creating alarms and test HTTP actions
Verify telemetry
- Open Operations Center in the console
- Navigate to UNS Explorer (
/uns) and browse live tag values - 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:
| Environment | Value |
|---|---|
| Local | http://localhost:4400 |
| Behind nginx on one host | https://your-domain.example |
See System Requirements for production deployment notes.
Next steps
- Architecture overview
- REST API reference
- Plants, machines, and devices
- Edge gateway — or use the console setup wizard (
/setup) to create a plant, machine, simulator, and optional gateway - Rules and alarms
