Multi-tenancy
Integrators often host one CONTEXUS stack for many end customers. Multi-tenancy separates organisations, sites, and credentials without running a container per client.
Hierarchy
Platform (host)
└── Tenant (integrator org)
└── Site (building or campus)
└── Device / PointUsers belong to exactly one tenant unless they are platform operators. Role templates include tenant admin, site engineer, and read-only occupant.
Data isolation
- Every IoT and CMS row carries
tenant_id; APIs reject cross-tenant IDs. - PostgreSQL connection pooling sets
app.tenant_idper request for RLS policies. - Attached assets paths are namespaced:
/attached_assets/{tenantId}/...
# Inspect tenant-scoped sessions (self-hosted)
psql "postgresql://user:pass@localhost:5433/contexus" \
-c "SELECT id, tenant_id, email FROM users LIMIT 10;"SSO and domains
Map custom domains to tenant themes (customer.integrator.com). SAML/OIDC metadata is configured per tenant; fallback local accounts remain for break-glass access.
API tokens
Service tokens are minted in the admin console with scopes such as devices:read or telemetry:write. Tokens cannot escalate across tenants. Document token rotation in your runbook — see REST API.
LoRaWAN and MQTT namespaces
Topic prefixes and application IDs include tenant slugs to prevent cross-publish accidents. Review LoRaWAN and MQTT conventions before bulk provisioning.
Commercial notes
White-label and redistribution rights depend on partner tier — see licensing. Optional proprietary modules (tenant portal, visitor management) may be licensed per end customer.
Deployment
Single compose stack on localhost:9001 can host multiple tenants for demos; production separates at least database backups per tenant SLA. Logs aggregate in docker-compose logs with tenant tags when structured logging is enabled.
Next steps
Explore a running stack, review the open source repositories, estimate ROI for a deployment, or talk with the CONTEXUS team about integration and licensing.
Module licensing details are summarised on /licensing. Browse reference dashboards in the gallery.