Deep-diveopen sourcedigital twinself-hosted

Open source digital twin software: the stacks behind a building twin

Open source digital twin software for buildings: map engines, IoT platforms and twin frameworks, their licences, and where an MIT, self-hosted app fits in.

8 min readPublished By Spatial Map team
A warehouse digital twin in Spatial Map: racks, docks, walled rooms and live worker and safety markers in 3D

What “open source digital twin software” usually means

Spatial Map is an indoor mapping and digital twin app for facilities, and its open-source edition is the same app under the MIT licence, self-hosted with Docker. It is one option among many. When people search for open source digital twin software, they rarely find a single product that does everything. They find parts: a map or 3D engine, an IoT platform that holds device state, and an application on top that people actually use.

This guide sorts those parts into categories, notes the licence of each well-known project, and says where each one fits a building or operations twin — a live model of a warehouse, plant, campus or venue, as opposed to an engineering simulation.

Layer 1: map and 3D engines

The scene is where the twin is drawn: floors, walls, racks and the markers your data moves around. Four families cover most building twins.

EngineLicenceGood atWhat you still build
MapLibre GL JSBSD-3-ClauseVector maps in the browser, real-world coordinates, extruded 2.5D shapes; a community fork of Mapbox GL JS v1Indoor data model, floors, editor, data binding
Mapbox GL JSNot open source since v2 (Mapbox terms of service; needs an access token)Polished vector maps, 3D terrain and buildings, a large ecosystemThe same as MapLibre — and you accept Mapbox’s terms and pricing
CesiumJSApache-2.0A 3D globe, terrain and streaming 3D Tiles; large sites, campuses, outdoor and indoor togetherIndoor editing, floor logic, operational UI
three.jsMITAny 3D scene you can model: equipment, machines, interiorsGeography, floors, picking, data binding — almost everything

Two more names come up in building projects. iTwin.js (MIT) is Bentley’s open platform for infrastructure twins and fits teams already working with engineering models. xeokit is a capable BIM viewer, but its SDK is licensed under the AGPL-3.0 with a commercial licence on offer — fine for some uses, ruled out by many company policies. If your source is IFC or Revit, read indoor map vs BIM before you pick a BIM viewer as the base of an operations map.

Layer 2: IoT platforms and twin state

The data layer receives readings and events, keeps the current state of each thing and usually some history. This is where licences need the most care.

ProjectLicence (checked November 2026)What it gives you
Eclipse DittoEPL-2.0A “digital twin” framework in the literal sense: each thing’s state as JSON, with APIs, search and change events. No map, no UI for operators.
ThingsBoardCommunity Edition was Apache-2.0 up to the 4.3 line; from 4.4 the editions were merged into a source-available productDevice management, rule chains, dashboards. Check which version and licence you are installing.
OpenRemoteAGPL-3.0, with commercial licences availableAn IoT platform with assets, rules and a map-based UI.
Node-REDApache-2.0Flow-based wiring between devices, protocols and APIs — often the glue between a gateway and everything else.
Eclipse MosquittoEPL-2.0 / EDL-1.0A lightweight MQTT broker.
GrafanaAGPL-3.0 (since 2021)Time-series dashboards. Charts and panels, not a spatial model.

Layer 3: the application people use

Engines and platforms do not draw your building or tell a shift lead which cold room is drifting. Someone has to build the editor that turns a floor plan into rooms, walls, doors and racks; the floor stack; the link between a database row and a shape; the viewer, the share links and the reports. In most open-source stacks that work is yours, and it is usually the largest part of the project.

  • Floor plan import — PDF, DWG or images, placed at true scale and real-world coordinates.
  • An indoor data model — floors, rooms, walls, doors, stairs, lifts and racks as objects, not pixels.
  • Data binding — rows matched to shapes by name, code or coordinates, coloured by rules.
  • Access — roles, read-only links for people without accounts.
  • Reports — the counts, tables and exports managers ask for.

Where Spatial Map’s MIT edition fits

Spatial Map’s open-source edition covers layer 3 and much of layer 2 for building operations. Its repository describes it as the same app as the cloud version, without plans or billing — self-hosted means everything is unlocked. What it includes:

  • A facility editor: import PDF, DWG and image floor plans, then draw areas, walls, doors, stairs, lifts, racks, markers, labels and 3D models, with snapping, bulk editing and undo.
  • A live 3D viewer with floors stacked, data coloured and labelled by your own rules, and read-only share links.
  • Built-in tables with CSV/XLSX import and a REST API per table, plus pulls from REST APIs; rows link to shapes by name, code or coordinates.
  • A report builder with KPIs, charts, tables, filters and full-map layouts.
  • Workspaces with owner, admin, editor and viewer roles; six languages including Arabic (RTL); light and dark themes.
  • An optional AI floor-plan worker, started with its own Docker Compose profile.
A warehouse twin in the 3D viewer
Crestline Fulfillment Center in Spatial Map: racks coloured by stock status, dock doors, staging lanes and live device markers in 3D
Crestline Fulfillment Center in Spatial Map: racks coloured by stock status, dock doors, staging lanes and live device markers in 3D

Be clear about what it is not. The stack is TypeScript and Go on PostgreSQL/PostGIS, and the map runs on Mapbox GL JS, so you need a free Mapbox access token and accept Mapbox’s terms — the map engine itself is not open source. It is not a physics or process simulator. It has no MQTT broker; devices reach it over HTTP, usually through a gateway or a flow tool such as Node-RED. And it does not compute positions from radio signals — your RTLS or middleware does that and writes positions to a table. The open source indoor mapping software page has the Docker quick start and a side-by-side of the self-hosted and cloud editions.

Choosing a starting point

If you need…Start with
A twin of a single machine or product line, with engineering modelsthree.js or a BIM/engineering viewer, plus Ditto or your own state store
A campus or city-scale model with terrain and outdoor contextCesiumJS with 3D Tiles
Device management, rule chains and dashboards, no floor plansAn IoT platform — check its licence for your version
A live map of a building people run day to day: floors, racks, sensors, stock, reportsAn application that already does indoor mapping — self-hosted or cloud
A fully open map engine with no vendor tokenMapLibre GL JS, and budget for building the indoor layer yourself
  1. 1
    Write down the questions the twin must answer

    For example “which cold room is out of range?” or “where are the forklifts?”. Questions decide the layers, not the other way round.

  2. 2
    List your data sources

    Sensor vendors, RFID middleware, a WMS, spreadsheets. Note how each one can deliver data: HTTP, MQTT, file export.

  3. 3
    Check every licence against your policy

    Including the version you will deploy and the dependencies it pulls in.

  4. 4
    Count the build work honestly

    Editor, floors, data binding, roles, reports and upgrades. Then compare it with adopting an app that already has them.

The longer checklist is in how to choose digital twin software.

Self-hosted or cloud

Self-hosting gives you control of the data and no subscription, and asks for someone to run Docker, backups, TLS and upgrades. If you would rather not, the same app runs as digital twin software for buildings in the cloud: a 7-day free trial with up to five facilities and no card, then Pro at $60 a month or $600 a year for up to four facilities. Either way the facility you build looks the same — walls, floors, racks and live data on one map.

Try the platform your data belongs on.

Spatial Map turns spreadsheets, sensor streams, and CAD drawings into one live 3D facility view — nothing to install, seven-day free trial.

Keep reading