MDMbox Docs

Configuration reference

MDMbox is configured through environment variables.

License

MDMbox requires a license to start. There are two ways to activate it:

  1. Environment variable. Sign in to the Aidbox portal, open the MDMbox project, copy the license JWT, and pass it to the MDMbox container as MDMBOX_LICENSE. Recommended for production and CI.
  2. Browser activation. Leave MDMBOX_LICENSE unset and start MDMbox. Open http://localhost:3000, click Continue with Aidbox account, sign in to the portal — a development MDMbox license is generated and stored in the database automatically. Useful for local development.
VariableDescriptionRequired
MDMBOX_LICENSELicense JWT copied from the Aidbox portalNo — falls back to browser activation

Authentication

Authentication is enabled by default. When enabled, MDMbox protects both API endpoints and the Admin UI:

  • API endpoints require a valid Authorization header.
  • The Admin UI uses browser session authentication and redirects unauthenticated users to /login.
  • Health checks, Swagger UI, and the OpenAPI specification remain public.
VariableDescriptionDefault
MDMBOX_AUTH_ENABLEDEnable authentication for API endpoints and the Admin UI. Accepted values: true or false.true
MDMBOX_ADMIN_IDAdmin User id to bootstrap for browser login. Must be set together with MDMBOX_ADMIN_PASSWORD.unset
MDMBOX_ADMIN_PASSWORDPassword for the bootstrapped admin User. Must be set together with MDMBOX_ADMIN_ID.unset
MDMBOX_API_CLIENT_IDAPI Client id to bootstrap for Basic auth. Must be set together with MDMBOX_API_CLIENT_SECRET.unset
MDMBOX_API_CLIENT_SECRETSecret for the bootstrapped API Client. Must be set together with MDMBOX_API_CLIENT_ID.unset

Match operation

VariableDescriptionDefault
MDMBOX_MATCH_DEFAULT_COUNTDefault maximum number of $match results when the request omits count.10

Database

MDMbox uses the standard Aidbox database environment variables:

VariableDescriptionRequired
BOX_DB_HOSTPostgreSQL hostYes
BOX_DB_PORTPostgreSQL port (default: 5432)No
BOX_DB_DATABASEDatabase nameYes
BOX_DB_USERDatabase userYes
BOX_DB_PASSWORDDatabase passwordYes

MDMbox Connection Pool

MDMbox maintains its own connection pool separate from the embedded FHIR engine. Both pools connect to the same database but are sized independently.

VariableDescriptionDefault
MDMBOX_DB_MAX_POOL_SIZEMaximum pool connections10
MDMBOX_DB_MIN_IDLEMinimum idle connections1

HTTP Server

VariableDescriptionDefault
MDMBOX_HTTP_PORTHTTP port3000

Last updated: