Configuring Orthanc in Docker with environment variables and secrets: when teams need it
Teams need configuration as code for Orthanc once the same server image runs in more than one place, or once changes to its settings must be reviewed, tested and traceable. If you are running Orthanc in containers and cannot rebuild a test environment from version-controlled files, or if a database password is sitting in an image layer or a Compose file committed to Git, this topic is for you. The goal is a container image that stays generic while environment-specific settings and credentials arrive at start-up from outside the image.
Orthanc reads its configuration from a JSON file, and the Docker images also accept overrides through environment variables. Each variable follows the ORTHANC__ naming rule, so a setting nested in the JSON document maps to a variable that a container runtime can set. That split is what makes the approach practical: the image is identical across development, test and production, and only the environment changes. It matters most when you run CI pipelines that spin up disposable instances for testing, when you operate several sites with different storage or authentication settings, and when change control requires a record of exactly what each instance was started with. Regulated teams should expect auditors to ask where those values come from and who can change them.
Confirm three things before you design this. First, check the variable naming rule and the handling of lists and booleans against the Orthanc Book for the image tag you plan to run, since the exact mapping is version-specific. Second, decide which values are secrets, such as database passwords and the credentials in RegisteredUsers, and which are safe in version control. Third, confirm the current release line you will standardize on. Orthanc 1.13.0 was released on 2026-08-15, following 1.12.11 on 2026-04-14, so pin the tag you test and promote rather than tracking a moving label. The sections on configuration files and Docker images cover the mechanics that follow from these decisions.
Which configuration method fits which setting
This table compares four ways to supply Orthanc configuration in a container: JSON files, ORTHANC__ environment variables, Docker secret files and a mixed approach. Read each row as a decision: the best use, the main risk and what to confirm in your own environment before choosing. The main takeaway is that non-sensitive, environment-specific values suit variables, while passwords belong in files or a secrets store.
| Method | Best use | Risk | What to confirm |
|---|---|---|---|
| Plain JSON configuration file | Stable, non-sensitive settings such as plugin lists, storage layout and logging that rarely change between environments | Passwords or tokens committed to version control or copied into images by mistake | That the file contains no credentials and is mounted read-only into the container |
| ORTHANC__ environment variables | Per-environment values such as hostnames, ports, feature toggles and log levels set by the orchestrator | Values appear in container inspection output, process listings and shell history when typed on the command line | Which keys your Orthanc version reads from variables and that no secret is passed this way |
| Docker secret files | Database passwords, admin passwords and API credentials that the container reads from a file at startup | Secret files left with broad permissions on the host, or values copied into logs by custom scripts | Which settings your image version can load from a file path and the file ownership inside the container |
| Mixed approach | Base settings in a JSON file, overrides through variables and credentials supplied as secret files | Precedence between sources is easy to misread, so a value may come from an unexpected layer | The order in which Orthanc applies sources and a rendered configuration check before each deployment |
| Settings safe to expose as variables | Ports, dataset names, log verbosity and plugin enable flags | Low, provided the value carries no credential or patient-identifying detail | Your change control rules for each variable and where your compose or orchestrator files are stored |
| Settings that must never appear in logs or shell history | Database passwords, admin credentials, token signing keys and storage access keys | Exposure through docker inspect, CI logs, debug output or pasted commands | Whether your logging pipeline redacts these values and who can read container metadata on the host |
Setting up a containerized Orthanc configuration step by step
This sequence takes an Orthanc container from an unpinned image to a configuration that is pinned, version-controlled, free of plaintext passwords, and checked against the running server. Each step produces an artifact or a test result that the next step depends on.
Pick and pin the image tag
Choose the Orthanc image tag your team will run, using either the default or full image variant, and record the exact tag in your deployment repository. Read the release notes for that version before writing any configuration, because option names and default behavior can change between releases. Recent core releases include 1.12.10, 1.12.11 and 1.13.0, so confirm which one your plugins and database back end support. Done when the tag is pinned in your Compose file and not set to a floating label.
Write the base JSON configuration
Create the baseline configuration file that holds settings that are the same in every environment, such as the storage path, the index database choice, and the DICOM AET. Keep this file in version control and avoid putting passwords or environment-specific hostnames in it. Mount it into the container at the path the image reads. Done when the container starts and the logs show the file was loaded without parse errors.
Move passwords into mounted secret files
Store each password in its own file outside the repository, then mount those files into the container through Docker secrets or a bind mount with restricted permissions. Point the configuration at the mounted file paths instead of literal values, so the secret never appears in the image history or in the Compose file. Confirm with your platform team how secrets are issued and rotated in your environment. Done when
docker inspectshows no plaintext password in environment variables.Map non-secret settings to ORTHANC__ variables
Translate per-environment values such as hostnames, ports and feature switches into ORTHANC__ environment variables, following the naming rule in the official documentation for the version you pinned. Keep the mapping small so that the JSON file remains the single source for stable settings. Recheck the variable names after every version change, since a misspelled key is silently ignored. Done when the effective value of each variable matches what you intended.
Enable the plugins the image provides
Enable only the plugins your workflow needs, and confirm that the chosen image actually bundles them, since the default and full variants differ. Database back ends and the viewer plugins must match the core version you pinned. Record each enabled plugin and its version in the repository so the set can be reviewed. Done when the plugin list reported by the running server matches the list in your configuration.
Set the watched Lua script directory
If you need automation, mount a dedicated Lua script directory read-only and point the configuration at it, then keep the script files under review like any other code. Keep the execute-script and export routes disabled unless you have a documented need, because the security FAQ warns they can run system commands or overwrite files. Done when a test script runs on a test study and the script is logged as loaded.
Verify the effective configuration and authentication
Read the effective configuration from the running container through the system endpoint or logs, and confirm that the values match your files and variables. Then send an anonymous REST request and confirm that it is rejected once authentication is enabled with users defined in your registered user list. Repeat the test with a valid user to confirm access works. Done when anonymous requests return an error and the reported configuration shows no secret values.
How configuration reaches the running Orthanc container
Configuration starts in a Git-managed JSON file and in the container definition that the compose file or orchestrator holds. Two hand-offs matter: secret values are mounted into the container as files, while plain settings arrive as ORTHANC__ environment variables, and the Orthanc process reads both at startup. The trust boundary sits around the secret store and the container runtime, so check that secret values never appear in the Git repository, the image, or the environment listing that operators can print.
Configuration sources and hand-offs from Git and secrets to the Orthanc process.
Enabling plugins and watching Lua scripts safely
Plugins and Lua scripts change what an Orthanc container does with patient data, so they belong in the same review process as the rest of the configuration. The cards below cover how to switch plugins on, confirm the image contains them, keep versions aligned with the core, and control the scripts that can alter storage or routing.
Enable plugins through configuration
Official plugins such as PostgreSQL, S3, DICOMweb and the advanced authorization plugin are loaded from the configuration, not from a separate install step. In a container, the plugin's settings are usually supplied through ORTHANC__ variables or a JSON file mounted into the container, so each plugin's switch and connection settings belong in the same versioned repository as the rest of the server configuration. Check the plugin's own section in the Orthanc Book before you change a default, because a plugin can read keys that look similar to core settings. Start with one plugin per change so a failed start is easy to trace.
Confirm the image bundles the plugin
Not every Orthanc image includes every plugin, so enabling a plugin in configuration does nothing if the container does not ship it. Before you write the configuration, check which plugins the image you pull contains, and whether the image you chose matches the database or storage back end you plan to use. Treat a missing plugin as a startup failure to fix in the image choice, not as a reason to copy a plugin binary into a running container. Record the image tag next to the plugin list so the next reviewer can see both in one place.
Keep plugin versions matched to the core
Orthanc plugins are built against a specific core release, so a plugin left at an older version after the core is upgraded can fail to load or behave unpredictably. Pin the core and every plugin to versions that were tested together, and change them in one reviewed change. When you move to a newer core, such as 1.13.0 released on 2026-08-15, read the release notes for plugin compatibility before you edit the image tag. Confirm the exact pairing with the vendor release notes rather than assuming that the latest tag of each component matches.
Point to a default Lua script directory
Lua scripts run inside the Orthanc process and can react to events such as stored instances, so the script directory is part of the server's behavior. Set the directory explicitly in the configuration, mount it read-only into the container, and make it a known path that the team monitors. When a script changes, the file change should appear in version control and the container should be restarted or reloaded under a controlled deployment. An empty or unexpected script directory should be treated as a configuration error to investigate, not as a harmless default.
Review scripts that change storage or routing
A Lua script that alters where instances are stored, how they are deleted, or where they are forwarded can change patient data flow without any change to the core configuration. Require a named reviewer for any script that writes to storage, calls the REST API, or sends instances to another peer or modality. Scripts that expose execution or export routes should be avoided altogether, because the Orthanc security FAQ warns that /tools/execute-script can let a malicious user run any system command and that the export route can overwrite files, so both should stay disabled. Test every reviewed script against a non-production instance with synthetic studies before it reaches the clinical server.
Questions teams ask before configuring Orthanc in Docker
Can our team configure Orthanc in Docker without an outside partner?
Yes, many teams do. Orthanc is open source, its Docker images are published, and configuration is driven by environment variables, JSON files and optional secrets. The work becomes harder when several environments must stay in step, when passwords and certificates must be handled under your security policy, or when the database and authentication choices are still open. Your own team is well placed to do this if it has someone who owns the Docker configuration, can read the Orthanc Book settings, and can test changes before they reach clinical systems. A partner is useful when you want the configuration reviewed, hardened and documented against your controls in a fixed scope.
What does our side need to provide for a Docker configuration project?
Plan for four things before work starts. First, a container platform you operate, such as Docker Engine or Compose on hosts you control. Second, a secret store or a secure way to hand Docker secrets to containers, so passwords are not written into files or images. Third, a named owner for configuration review who can approve changes to users, plugins and network exposure. Fourth, test environments that mirror production closely enough to prove that a configuration works before release. Ask the provider to list these dependencies in the written scope so you know what your team must supply and when.
What makes the effort for Orthanc configuration go up?
The main drivers are the number of environments, the plugins you enable, the authentication model and the database back end. Each environment needs its own values and secrets, and each plugin adds settings, dependencies and tests. Token-based or external authorization adds integration work with your identity provider. A database plugin such as PostgreSQL changes how instances start, connect and store state, and that affects the test plan. Multiple Orthanc instances sharing one database add further checks. Ask for a quote that counts each environment, each enabled plugin and each authentication path separately.
How long does a Docker configuration project take?
No duration is given here, because the time depends on the scope you agree in writing. The number of environments, plugins, authentication paths and back-end choices sets the length of the build, testing and handover. Fixed-scope engagements are agreed with a defined list of deliverables and timelines before work starts, so ask for the timeline as part of that written scope. If your schedule depends on a clinical go-live date or a change window, state it early so the plan can be fitted to it.
Does DeployOpen publish prices for Orthanc configuration work?
No. DeployOpen does not publish a price list. A quote follows from the written scope, which lists the environments, plugins, authentication model, database back end, testing and handover work. Ask for the quote to show who does each task, which items are one-time and which recur, and what is excluded. Orthanc Team SRL, the company that sells deployment, configuration and development services for Orthanc, also quotes on request. It offers pre-paid dedicated support hours valid for 12 months, so you can compare that option with a scoped project when you collect quotes.
Is there a paid edition of Orthanc that includes support?
No. There is no paid edition of Orthanc. The core is licensed GPLv3 or later, and the scalability and cloud plugins, such as PostgreSQL and the web viewer plugins, are licensed AGPLv3 or later. Support and services are bought separately. Orthanc Team SRL sells pre-paid dedicated support hours valid for 12 months, quoted on request. Check the Orthanc Book licensing FAQ with your legal team before you rely on a plugin in a product or in a commercial setting.
What breaks most often when configuration moves into Docker?
Common failures include a password left in a compose file or image layer, an environment variable name that does not map to the setting you meant, and a JSON file and environment variable that disagree about the same option. Plugins can be enabled without their matching version or dependencies. Remote access can be opened without authentication users defined. The security FAQ also warns that the script execution route and the export route should stay disabled unless you have a specific need, because they can run system commands or overwrite files. A written review of the final configuration, tested in a non-clinical environment, catches most of these before go-live.
Should configuration review and security checks happen before go-live?
Yes. Review the effective configuration after all environment variables, secrets and JSON files are merged, not just the files themselves. Confirm that remote access is off unless required, that authentication and registered users are defined when it is on, and that HTTPS sits in front of any internet-facing service. Check that the risky routes are disabled and that secrets come from Docker secrets or your secret store. Keep a record of the review so your compliance team can see how the configuration was approved. DeployOpen can run security testing on the deployed setup, but it does not issue audit reports or certifications.
What to confirm in your environment before production
Configuration passed through environment variables and secrets is easy to get subtly wrong, and the errors often appear only at runtime. The six checks below connect the naming rules, secret delivery, image contents, precedence, logging and rollback, and each should be verified against the Orthanc Book and in a test environment that mirrors production.
Exact ORTHANC__ mapping for your image
Confirm how the ORTHANC__ prefix, section names and nested keys translate into the configuration file for the exact image tag and Orthanc version you deploy. Nested objects, lists and boolean values can be mapped differently from plain strings, so a setting that looks correct may be silently ignored. Run the container with a known value and read back the effective configuration through the REST API or startup log before you trust the mapping. Check the result against the Orthanc Book for plugin settings.
Secret mounting in your orchestrator
Confirm how your runtime delivers Docker secrets or equivalent files to the container, where they appear inside the filesystem, and which user owns them. A file that is readable by the host but not by the Orthanc process will fail only when the database connects or the first remote user logs in. Test the password path with the service restarted, after a node reschedule, and after a secret rotation, since each of these can behave differently.
Plugins bundled in the image tag
Confirm which plugins the chosen image tag includes, since a plugin missing from the image cannot be enabled by configuration alone. Some tags bundle database back ends, viewers or cloud storage plugins while others are minimal. Check that the plugin versions match the core version, and that a tag change does not drop a plugin your configuration already depends on. Record the image digest you tested so the production image is the same artifact.
Precedence when a variable and JSON key conflict
Confirm which source wins when an environment variable and a key in a mounted JSON file set the same option. The answer determines whether a change in the file takes effect, and an unexpected override can hide a credential or endpoint change from the team reviewing the file. Write one deliberate conflict into your test environment, start the container, and confirm the effective value. Document the rule in your runbook so later edits follow it.
Log redaction of configuration values
Confirm whether startup logs, debug output and error messages print configuration values, including database connection strings and passwords. Container logs are often collected into central systems with wider access than the Orthanc service itself. Start the container with debug logging in a test environment, search the captured output for each secret, and adjust logging levels or log collection rules where a value appears. Repeat the check after every image upgrade.
Rollback of configuration changes
Confirm that you can return to the previous configuration within your change window. Keep configuration files and environment definitions in version control, tag each release, and store the matching image digest with it. Test a rollback in staging, including any database schema change that the new configuration triggered, because reverting the file does not reverse changes already written to the index. Assign an owner who can execute the rollback without the original author.
Orthanc security FAQWhere to verify configuration names and plugin behavior
Check every ORTHANC__ variable name, JSON key and plugin toggle against the Orthanc Book before you rely on it. The plugins page at Orthanc Book: Plugins lists the official plugins and their roles, and the security FAQ at Orthanc Book: Security FAQ explains which settings change exposure, such as remote access, authentication and the /tools/execute-script and export routes. Use these two pages to confirm that a setting you map from an environment variable has the effect you expect, especially for authentication and routes that can write files or run commands. Record the page version you read so your Compose file and your review notes match.
Image choice affects which names and plugins exist in the container. The Orthanc downloads page describes the Docker images and the other packages Orthanc publishes. Before you write the configuration, confirm which image variant and tag you will pull, which plugins that variant bundles, and whether the plugin you need is present or must be added. Then read the release notes for that exact tag in the Orthanc NEWS file, since renamed options, changed defaults and deprecated settings are version-specific. Pin the tag in your deployment and repeat this check whenever you change it.
DeployOpen does not replace vendor documentation. The Orthanc project, and the Orthanc Team for paid services, remain the authoritative sources for configuration behavior. Treat this page as a starting structure for a team, and confirm each setting, default and security consequence against the documentation for your release before a change reaches a clinical environment. Where your organization has its own change control or validation process for medical imaging systems, record which documentation version the configuration was verified against.
How DeployOpen scopes and delivers Orthanc container configuration
DeployOpen plans and delivers Orthanc container configuration inside infrastructure you control, from the ORTHANC__ variable map to Docker secrets and plugin settings. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts.
How we scope
- We inventory which settings your Orthanc containers need, including plugins, authentication and storage back ends.
- The written scope lists which settings move to environment variables, which stay in JSON files and which secrets are handled.
- We confirm the Orthanc version and image tag your environment will run before any configuration is written.
How we build
- We write the compose or orchestration definitions, environment variable map and secret mounts for each environment.
- We test that every setting loads as intended, checking the container startup log and the REST system endpoint.
- We confirm Lua scripts and plugin activation behave as designed, and that debug routes such as execute-script stay disabled.
How we hand over
- You receive the configuration repository, a variable reference mapped to each setting, and the secret rotation steps.
- The documentation covers how to add a plugin, change a password and roll a version upgrade without exposing values.
- We walk your platform and security teams through the configuration and the test results before handover closes.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- Retainer work can cover image upgrades, new plugins and periodic checks that configuration still matches policy.
- Orthanc Team SRL also sells pre-paid support hours, which you can ask about alongside any DeployOpen engagement.

