Medplum server configuration and secrets management

A planning guide to configuring a self-hosted Medplum server, covering required URLs, config sources, secret handling, trusted CA overrides and change control.

On this page

Medplum server configuration and secrets management: what your team must decide

Your team needs to settle the server configuration and secrets approach before a self-hosted Medplum server takes its first production start. The server configuration controls the public URLs the platform advertises, the PostgreSQL and Redis connections it depends on, identity settings, and the credentials that let it reach those services. Two settings are mandatory: baseUrl, which points at the API server, and appBaseUrl, which points at the web app. Medplum uses them to build links, redirects and sign-in flows, so a wrong value tends to surface as broken logins or emails rather than as a clear startup error. Any self-hosted install needs this work, whether it runs on AWS, Kubernetes, Ubuntu or edge hardware, because the same settings exist in every layout even when the way they are supplied differs.

Medplum is released under the Apache 2.0 license, and the server is built on Node.js and TypeScript with PostgreSQL as its database and Redis as its cache. Your team decides how each of these connections is defined, where the values come from and who may read them. Under the shared-responsibility model described in Medplum's compliance documentation, Medplum provides the software, but your organization owns the hosting account, the choice of configuration source, the handling of database and signing credentials, and the review of changes to them. Decide early whether values live in JSON config files, environment variables or a parameter store, and who approves a change.

Plan the secrets path before you write any configuration. Confirm which values Medplum treats as secrets in the version you are installing, where your platform stores them (for example, encrypted parameters or a managed secrets service), and how the service retrieves them at startup. Decide whether any trusted certificate authority must be added for internal identity providers or databases, and record who owns that override. Finally, put configuration files under version control with review, and set a rule that every change is tested in a non-production environment and logged before it reaches production. Confirm the exact keys and their behavior against the self-hosting documentation for your chosen deployment path.

Configuration sources and when each fits

This table compares the three configuration sources a self-hosted Medplum server can read: JSON config files, environment variables and AWS Parameter Store. Read each row as a decision question, then check the exact key names and override order against the release you install, since the self-hosting docs are the authority for them. The main takeaway is that the source you choose sets where secrets live, who can change them and how changes are audited.

FactorJSON config fileEnvironment variablesAWS Parameter Store
Where it fitsSingle host or VM where one file is easy to place and reviewContainers and Kubernetes, where the orchestrator injects values at startAWS-hosted deployments where the server reads settings from the account
How values are overriddenEdit the file and restart; confirm which file and key names your release readsSet per process or per pod; confirm precedence over file values in your releaseChange the parameter, then redeploy or restart so the server picks it up; confirm the load path for your install
Keeping secrets out of the repositoryKeep the file outside version control or template it from a secret source at deploy timeInject from a secret store rather than writing values into manifests or compose filesStore sensitive values as SecureString parameters and reference them, not plain String values
Secret exposure riskHigh if the file is world-readable or copied into images or backupsModerate: values can appear in process listings, logs or container inspection outputLower when values are SecureString and IAM limits who can read them
Change controlRelies on file permissions and your repository or config management reviewRelies on the deployment tool's history and review of manifestsParameter versions and IAM policies give an auditable record of changes
Operational trade-offSimple to read and diff, but drift between hosts is easy to createPortable across environments, but many scattered values are hard to auditCentral and auditable, but adds AWS permissions, region lookups and a dependency on the account
What to confirmExact file location, key names and whether the server reads one file or severalVariable names and whether any value needs a restart to take effectParameter path convention, IAM read scope and how the server authenticates to the store

How to set up server configuration in order

This sequence takes a self-hosted Medplum server from an unconfigured install to one that starts cleanly, serves its web app and API on the intended public origins, and is ready for exposure to users. Each step ends with a check so that configuration errors surface before traffic arrives.

  1. Confirm the target version and release notes

    Before editing any configuration, the platform team confirms which Medplum version will run and reads its release notes for changes to configuration keys, required settings or migrations. Self-hosted Medplum must be upgraded through each minor version in sequence, so the team also checks the version it is moving from. Confirm the version against the Medplum releases page and the upgrading guide. The step is done when the team has written down the version, the prior version, and any configuration changes listed for it, and that record is stored with the change ticket.

  2. Set baseUrl and appBaseUrl to public origins

    The platform engineer sets baseUrl to the public origin of the API and appBaseUrl to the origin where the web app is served, using the exact hostnames and schemes that users and browsers will see. These values feed redirects, email links and sign-in flows, so mismatches cause failures that look like authentication problems. Record both values in the configuration file and confirm that the DNS records and TLS certificates for both hostnames exist before continuing. The step is done when both values match the hostnames in the load balancer or ingress and the team can resolve each name from the network where users sign in.

  3. Connect PostgreSQL and Redis

    The platform engineer points the server at the PostgreSQL database and the Redis cache, using the hostnames, ports, database names and TLS settings set for this environment. The database should be provisioned and reachable from the server subnet, and the database role should have the privileges the installer documents for the schema it manages. Confirm the connection parameters with the database and cache owners rather than copying values from another environment. The step is done when the server process connects to both services during startup without connection errors in its logs.

  4. Load secrets from the chosen store

    The platform engineer moves database passwords, signing keys and other sensitive values out of plain configuration files and into the secrets store the team has selected, such as AWS Systems Manager Parameter Store with SecureString parameters or the equivalent in another cloud or on-premises vault. The runtime identity is granted read access only to the parameters it needs, and the configuration file references those parameters rather than containing the values. Confirm with the security team how rotation, access logging and break-glass access work for that store. The step is done when the server resolves its secrets at startup and a search of the configuration files and container images finds no plaintext credentials.

  5. Add trusted CA overrides for internal certificate authorities

    If the database, cache, identity provider or other internal services use certificates issued by an internal certificate authority, the platform engineer adds that root or intermediate certificate to the server's trusted CA configuration so the Node.js process can verify those connections. Only the certificates the organization operates should be added, and each addition should be recorded with its owner and expiry date. Confirm with the PKI team how the certificate chain is distributed and renewed. The step is done when outbound TLS calls to each internal service complete without certificate verification errors.

  6. Validate startup and health before exposing the service

    The platform engineer starts the server with the new configuration on a non-production or staging environment and watches the startup logs for configuration errors, missing secrets and failed migrations. Once the process is running, they call the health endpoint and load the web app from appBaseUrl in a browser, then run a test API request against baseUrl using the expected hostname and TLS certificate. Confirm that login redirects return to the intended origin. The step is done when the server starts without errors, the web app loads from appBaseUrl, and API calls succeed over the expected hostname. Only after this check should the load balancer or ingress route production traffic to the service.

  7. Record the configuration under change control

    The platform team stores the final configuration template, the secret references and the CA override list in version control or the change management system, with secret values kept only in the secrets store. Each later change to a configuration key, secret or certificate goes through the same review and is tested in staging before production. Ask the team's compliance or security lead which approvals and evidence retention apply to configuration changes in the regulated environment. The step is done when a reviewer can trace the running configuration to an approved change and no production setting exists only on the server.

How configuration values reach the running server

A self-hosted Medplum server reads its settings once, at startup, from two places: JSON configuration files and environment variables. Values such as baseUrl and appBaseUrl, database and Redis connection details, and secret references are resolved when the process starts, so the running server only reflects what it read at that moment. Before you deploy, confirm in the documentation for your exact version which source wins when the same key appears in both places, and whether a secret reference is resolved at startup or on demand. Those precedence rules are the part most likely to change between releases, so record them in your own runbook rather than relying on memory.

Because precedence is easy to get wrong, test it rather than assume it. For each environment, write down which file and which variable supply every required setting, then start the server in a non-production environment and confirm the effective values, for example by checking the health endpoint, the login redirect and the links in an invitation email. Repeat this check after any change to a file, a variable or a parameter store entry. Ask your vendor or internal platform team how the deployment method you chose (AWS, Kubernetes, Ubuntu or edge hardware) injects these values, since a value set in a container image, a Helm values file and a host file can all look correct in one place while another source overrides it at runtime.

A change to a URL, a signing secret or a CA setting usually needs a restart before it takes effect, and a restart alone does not prove the change is correct. Plan each change as a short procedure: record the current values, apply the change through your normal change control, restart the service, then verify sign-in, API access and outbound links from a clean browser session. A changed baseUrl can break existing redirects and tokens issued under the old address, and a rotated secret can invalidate active sessions. Schedule these changes in a window where you can roll back to the recorded values quickly.

How secrets and settings reach the Medplum server

The diagram starts in the change-controlled repository and the parameter store, which sit on the secrets side of a trust boundary. Config files and environment variables cross into the runtime, where the Medplum server reads them at startup. From there the server connects to PostgreSQL and Redis, which sit in their own boundary. Check that secret values never land in committed files and that each boundary has a clear owner.

Settings and secrets flow from controlled sources into the server, then to its data stores.

Security risks in secrets handling and how to contain them

A self-hosted Medplum server reads its database credentials, signing material, email settings and trust configuration from several places, and each one is a point where a secret can leak or a change can go unnoticed. The cards below pair each risk with the control that contains it, so the platform, security and compliance teams can agree on ownership before the first production deployment.

Secrets committed to source control

Database passwords, client secrets and signing keys placed in a JSON config file or a Helm values file can end up in a repository, and git history keeps them even after deletion. Keep the config repository free of real values, store only references to Parameter Store or Key Vault, and run secret scanning on every push. Check the history of any repository that once held a Medplum config, not only the current branch.

Self-hosting docs

SecureString values readable by broad roles

Parameter Store SecureString values are encrypted, but any principal allowed to call the decrypt path with the key can read them, so a broad IAM role can expose production secrets to unrelated workloads. Scope read permissions to the specific parameter paths the Medplum server needs, and restrict use of the KMS key to the task or instance role that runs the server. Review who holds administrative rights over both the parameters and the key.

Shared credentials across environments

When development, staging and production share a database user, a Redis password or a client secret, a weakness in a lower environment becomes a path into patient data. Give each environment its own credentials and parameter paths, and avoid copying production values into test stacks for convenience. Ask your team to name the owner of each credential and to confirm how it is replaced when staff change roles.

Unsafe CA trust overrides weakening TLS

Trusted CA overrides let the server accept certificates signed by authorities you add, which is sometimes needed for internal services or proxies. A broad or unreviewed override can make the server trust certificates it should reject, weakening TLS on connections that carry clinical data. Limit overrides to the specific internal CA bundle, record who approved it, and verify that connections to external services still validate certificates against public roots.

Unreviewed configuration changes

A single edit to baseUrl, appBaseUrl, a Parameter Store value or an environment variable can break sign-in, redirect users to the wrong host or disable a protection without anyone noticing. Put configuration files and parameter definitions under version control, require a second reviewer for production changes, and record the reason for each change. Confirm with your platform team how a change is rolled back if the server fails to start afterward.

Secrets exposed in logs and CI output

Build pipelines and server logs can echo environment variables, print a rendered config during a failed deployment or record a request that carries a token. Mask secret variables in CI, avoid echoing configuration in deployment scripts, and check that application logs redact authorization headers and connection strings. Test a failed deployment in a non-production environment and inspect what the pipeline printed before relying on it.

Questions teams ask before configuring self-hosted Medplum

What does Medplum server configuration work cost, and what drives it?

Cost depends mostly on the people doing the work and how much of the environment they must build. Medplum itself is open source under the Apache 2.0 license, so the spend is labor, cloud and secrets tooling, and any support contract. The main drivers are the team's skills with your chosen install path (AWS with CDK, Kubernetes with Helm, Ubuntu, Azure or Google Cloud), the number of environments that each need their own settings, whether you already run a secrets platform such as AWS Systems Manager Parameter Store or a Kubernetes secret store, and how complex the identity setup is. Ask any partner for a written quote that separates initial configuration, per-environment work, secrets platform setup, identity integration and recurring tasks such as rotating secrets and reviewing config changes.

How long does it take to configure a self-hosted Medplum server?

The timeline depends on what the configuration depends on, not on the configuration files alone. Required settings such as baseUrl and appBaseUrl must match the domains you finally use, so DNS, certificates and email sending need to be settled first. Identity integration, trusted CA handling for internal services, and the secrets store each add their own approval and testing steps. Environments multiply the work, because staging and production should share one configuration structure with different values. Your own change approval windows often set the pace more than the technical steps do. Confirm these dependencies in your environment before accepting any duration in a proposal.

What must our internal team provide before configuration starts?

Your team supplies the decisions and access that the configuration cannot invent. Typically that includes the public domain names for the API and the web app, TLS certificates or a certificate process that matches them, a cloud account with a defined owner and IAM boundaries, access to create and read parameters in your secrets store, and database access for the team doing the setup. Email sending, usually through Amazon SES or an SMTP relay, needs a verified sender domain and DNS control. If the server must trust an internal certificate authority, the CA bundle and its owner must be identified. Ask the partner to list these inputs in writing, with an owner and a date for each, so gaps surface before the build starts.

Can our team configure Medplum alone, and what does external help cover?

A team with strong infrastructure, secrets and identity skills can usually configure Medplum without outside help, since the project's documentation covers each install path and the configuration keys. The harder parts are usually the ones that touch security and operations: keeping SecureString values out of files and logs, separating environments cleanly, wiring identity providers, and building a change process that records who changed what. External help is most useful for a fixed-scope configuration review, a secrets and identity design, or a hardening pass with written evidence for your compliance team. DeployOpen plans, implements, hardens and documents self-hosted platforms inside your own infrastructure, and most engagements are fixed-scope with deliverables agreed in writing before work begins.

How do configuration changes relate to Medplum upgrades?

Configuration and upgrades are linked because a new version can add, rename or change settings, and the server must start with the configuration it expects. Medplum recommends upgrading through each minor version in sequence, and skipping versions can cause startup failures, so a configuration change made for one version may need to be revisited at the next step. Keep configuration in version control, record which Medplum version each change was tested against, and test every change in a non-production environment first. Check the upgrading guide and release notes for each version you pass through, and confirm with the Medplum team how any post-deploy data migration will affect the window you plan for.

What should we ask a partner to include in a written quote?

A useful quote states the scope in terms your team can check. Ask for the list of environments covered, the install path and cloud services in scope, the exact configuration and secrets items to be built, and how SecureString values and trusted CA overrides will be handled. Request the identity integrations included, the email and branding items included, and whether change control and a configuration runbook are deliverables. Ask which tasks are one-time, such as the initial build, and which recur, such as secret rotation support, retesting after upgrades, or retainer support. Confirm who holds the cloud accounts and secrets at handover, what evidence will be provided for audits, and what is excluded, such as application development or data migration.

How should we store secrets for a self-hosted Medplum server?

Keep sensitive values in a dedicated secrets store and reference them from configuration, rather than writing them into JSON config files or committing them to repositories. Options include AWS Systems Manager Parameter Store with SecureString parameters, a Kubernetes secret store, or a vault product your organization already operates. Restrict read access to the server's runtime identity, log access to the secrets store, and rotate values through a documented process. Keep non-sensitive settings such as domain names in version-controlled files, so reviewers can see every change. Confirm the exact parameter names and the loading behavior for your chosen install path against the self-hosting documentation before you finalize the design.

Change control for configuration after go-live

Configuration on a self-hosted Medplum server should change only through a reviewed, versioned and staged path. Every change to the JSON config file, the environment variables, or the Parameter Store entries that feed the server should start as a pull request in the infrastructure repository that holds them, be approved by someone other than the author, and be applied first to a non-production environment that mirrors production's baseUrl, appBaseUrl, database and identity settings. Keep SecureString values out of the repository entirely. Track only their names, owners and rotation dates, so a reviewer can see that a secret changed without seeing its value. Confirm with your own platform team which of these settings the deployment tooling reads at startup, because a change that looks cosmetic can still require a restart of the server to take effect.

Configuration changes must be sequenced against the Medplum upgrade path and the patch cadence, not scheduled independently. Medplum ships patch versions weekly and must be upgraded through each minor version in order, so a configuration change that depends on a new setting should land in the same release window as the upgrade that introduces it, never before it. Security patches carry their own clock: Medplum's policy targets fixes within 7 days for critical vulnerabilities and 14 days for high ones, so a pending configuration review should not delay a security patch. Ask Medplum's versioning and upgrade documentation which settings change between versions, and add that check to every upgrade runbook before the change window opens.

Keep records that let an auditor or compliance reviewer reconstruct who changed what, when and why. For each change, retain the pull request, the approver, the environment where it was tested, the deployment identifier, the Medplum version running at the time, and the rollback step. Record secret rotations and access grants to Parameter Store or your secrets manager as separate events. Under the shared-responsibility model described in Medplum's compliance documentation, Medplum supplies the software and its controls, while a self-hosting organization owns its configuration, secrets, change process and evidence. Confirm with your compliance lead which of these records your assessor will request, and retain them for the period your own policies and applicable regulations require.

How DeployOpen configures and secures self-hosted Medplum

DeployOpen plans and implements self-hosted Medplum inside your own cloud accounts, data centers or private networks, and it works from a written, fixed scope that both sides agree before any configuration work starts. For the server configuration and secrets topic, that scope normally names which settings are being set, where each value is stored, who may change it, and how changes are tested before they reach production. Because the Medplum server depends on a small set of required values, such as baseUrl and appBaseUrl, the scope also states which environments need their own values and which values are secret. Nothing is changed outside the agreed list, and any addition goes through a written change request.

Our configuration work follows the layers the platform actually uses: JSON config files, environment variables, and a parameter store where your cloud provides one. Secrets such as database credentials, signing material and mail credentials are placed in encrypted stores with access limited to the services that need them, and trusted certificate authority overrides are documented with their source and renewal owner. We document each setting, its location, its owner and the procedure for rotating it, so your security and operations teams can review the configuration without reverse-engineering the deployment. Where a platform component changes behavior between releases, we record the expected values alongside the upgrade plan.

DeployOpen also offers retainers for ongoing work after the initial build: upgrades that follow Medplum's required minor version sequence, periodic review of configuration and secret handling, and continuous security testing of the deployed environment. Ask for the written scope, the list of documented settings and secrets, the change-control process and the retainer terms before you compare proposals. Pricing follows from the agreed scope, so a quote can be prepared once your requirements, environments and infrastructure are described in writing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.