Quick start — demo plant
This walks through the demo plant: a simulated factory (rw-sim) that drives a CNC cell
over Modbus and OPC UA plus three plain-MQTT “retrofit sensor” emulators, so you can see
signals flow end to end without any real hardware.
Prerequisites
Section titled “Prerequisites”- Docker with Compose v2 (
docker compose version) - A clone of this repository
uvto run therwcommand-line tool
1. Bring up the demo stack
Section titled “1. Bring up the demo stack”From the repository root:
docker compose --profile demo up -d --wait rw-broker rw-historian rw-sim rw-edge rw-ingestThis starts the message broker, the historian database, the simulated plant, the edge
reader (Modbus + OPC UA + MQTT), and the ingest service that writes validated samples into
the historian. --wait blocks until every container reports healthy.
2. Migrate the database and load the demo site
Section titled “2. Migrate the database and load the demo site”uv run rw db migrate --dsn "$RW_DSN"uv run rw site load deploy/demo/site.yaml --dsn "$RW_DSN"rw db migrate applies the schema and the row-level-security policy. rw site load upserts
the demo site’s areas, lines, cells, assets and signal registry — this is what lets the
operator app show named assets instead of raw topic strings. Both commands are safe to
re-run.
3. Start the app
Section titled “3. Start the app”docker compose --profile demo up -d --wait rw-appOpen http://localhost:4441 (or 127.0.0.1:4441). The app binds to 127.0.0.1 only by
default — it is not exposed to the network unless you change RW_APP_BIND.
4. Optional: camera feed and local inference
Section titled “4. Optional: camera feed and local inference”A synthetic camera feed and the local inference server are separate profile services, each
with their own setup step documented at the top of the relevant compose fragment
(deploy/compose/vision.yaml, deploy/compose/infer.yaml). They are not required to see
the core sensor/detector flow above.
Tearing down
Section titled “Tearing down”docker compose downWhat you just proved
Section titled “What you just proved”Three different OT protocols (Modbus, OPC UA, MQTT) landed in one historian under one
signal registry, through the same read-only edge path a real site uses. The only thing that
changes for a real plant is what rw-edge’s config points at — see
Adapters and Install.