Orthanc security hardening

Orthanc is safe to expose only after remote access, authentication, transport encryption, dangerous routes and storage protection are set deliberately. This page covers the decisions, build order and checks.

On this page

Why Orthanc security hardening is a decision, not a checkbox

Orthanc is local-only by default, so exposing it to users, modalities or other sites is a deliberate choice that has to be made, configured and reviewed. A team holding patient images should decide in advance what is reachable, by whom, and under which authentication, with HTTPS in front of any remote access and dangerous routes disabled. The baseline reference for those settings is the Orthanc Book security FAQ, which should be read before any network rule is opened.

The work is harder than it looks because Orthanc is not one surface. The REST API, the DICOM network listener, scripting and the storage area each have their own settings, and a control on one does not protect another. Enabling RemoteAccessAllowed moves the server beyond the local machine, and the FAQ advises turning on AuthenticationEnabled with users defined under RegisteredUsers at that point. Authentication on the REST side does not by itself secure DICOM connections, file storage or the scripting routes, so each must be reviewed separately.

Before changing anything, the team should write down an inventory: which modalities, workstations, viewers and integrations connect, from which networks, and which routes each one needs. Then confirm which settings are still at their defaults, which plugins are loaded, and whether the storage directory and database are readable by anyone beyond the service account. This inventory is the input to every later decision, and it is also the evidence an internal security or compliance reviewer will ask for.

Which Orthanc surfaces need hardening

An Orthanc server exposes several surfaces at once: the REST API and web interface, the proxy that fronts it, DICOM network connections, powerful administrative routes, the scripting layer, and the storage and database behind them. Each one needs its own settings and checks, because a closed door on one surface does not protect the others.

REST API and Orthanc Explorer 2

By default Orthanc accepts HTTP connections only from localhost. Enabling RemoteAccessAllowed opens the REST API and Orthanc Explorer 2 to the network, so authentication must be turned on with AuthenticationEnabled and every account defined under RegisteredUsers. Check that no anonymous path remains and that the list of users matches who should still have access.

Orthanc security FAQ

HTTPS reverse proxy

Orthanc's own HTTP service should not face the Internet directly. The security FAQ recommends HTTPS and a reverse proxy for any Internet exposure, so the proxy handles certificates, transport encryption and request filtering. Confirm that the proxy blocks administrative routes you have not approved and that Orthanc cannot be reached around it on its native port.

DICOM TLS for modality links

DICOM traffic from modalities, workstations and other sites travels over a separate port and protocol from the REST API. Orthanc supports DICOM TLS for inter-site exchanges starting with version 1.9.0. Decide which peers must use TLS, record which certificates each side trusts, and confirm that legacy modalities without TLS support are isolated on a controlled network segment.

Dangerous export and script routes

The /tools/execute-script route can let a malicious user run any system command on the host, and the export route can overwrite files. The security FAQ says both should stay disabled. Search the configuration and any reverse proxy rules for these paths, and treat an enabled route as a finding that needs an owner and a documented reason.

Lua scripting engine

Orthanc's scripting layer runs event handlers that can read, change and forward studies as they arrive. Scripts run with the server's privileges, so anyone who can edit a script or the files it loads can change how patient data is handled. Review each script, restrict write access to the configuration directory, and log changes through your normal change control.

Storage area and database

Images sit in the storage area and metadata sits in the index database, which is SQLite by default. Both need file-system permissions, encryption at rest where your policy requires it, and backups that are tested for restore. If you move to the PostgreSQL plugin or an object storage plugin, the credentials and network paths to those services become part of the attack surface too.

Orthanc plugins list

Choosing how Orthanc is reached and authenticated

This table compares three ways to reach an Orthanc server and control who can use it: localhost or VPN-only access, built-in RegisteredUsers over HTTPS, and delegated authorization through the advanced authorization plugin. Read each row as a decision: the fit column says when the option makes sense, and the operations column shows the ongoing work it creates. The main takeaway is that the more users and per-study rules you need, the more you trade simple configuration for a service you must run and keep available.

OptionWhen it fitsOperational costWatch for
Localhost or VPN-only accessSingle site, small set of trusted users who connect through a managed VPN or a jump hostLow: no user store to maintain, but network access lists and VPN accounts must be reviewedRemote access is off by default, so the server is unreachable until the network path is designed deliberately
Built-in RegisteredUsers with HTTPSSeveral named users with the same level of access, and a reverse proxy already terminates TLSModerate: each user is added and removed by hand in the configuration, and password changes need a controlled processRemoteAccessAllowed should be paired with AuthenticationEnabled and a reverse proxy, as the security FAQ recommends
Delegated authorization via the advanced authorization pluginPer-study or per-role decisions, integration with an identity provider such as Keycloak, or many users who change oftenHigh: an external token-checking service must be built, patched, monitored and kept available, and its outage can block accessEach REST request's token is forwarded to that service, which must return HTTP 403 when access is denied, so test denial paths as well as grants
Identity provider single sign-onOrganizations that already run central identity management and need joiner, mover and leaver processesModerate to high: identity provider configuration, token lifetimes and group mapping are ongoing tasksConfirm the identity provider and plugin versions against the Orthanc release you run before committing
Audit and access reviewAny option, when an assessor will ask who accessed which study and whenRecurring: periodic review of accounts, roles and access logsConfirm which events your chosen option records, since each option logs access differently
Exposure to the InternetRarely appropriate for patient images; usually only as a controlled, proxied pathHigh: requires HTTPS, hardening of the proxy, rate limiting and continuous testingDisable dangerous routes such as /tools/execute-script and the export route, which the security FAQ says should stay disabled

How to harden an Orthanc server in sequence

This sequence moves an Orthanc server from its default local-only state to a configuration where remote access is deliberate, authenticated, encrypted in transit, and limited to the routes and links the archive needs. Each step closes with a check the team can repeat after every change.

  1. Confirm the default local-only access posture

    Start from a fresh install with the configuration file open and confirm that RemoteAccessAllowed is not enabled, so Orthanc accepts HTTP connections only from localhost. The team running the server does this, and the check is a request to the REST API from another host that fails to connect. Record the configuration file version alongside the Orthanc release in use, because defaults should be verified against the release notes rather than assumed from memory. Done means the baseline is documented and remote access is confirmed closed.

  2. Enable authentication and define named users

    If remote access is required, set RemoteAccessAllowed to true only together with AuthenticationEnabled set to true, then define each account in RegisteredUsers. Use one account per person or service, avoid shared credentials, and store passwords outside version control. The check is an unauthenticated REST request from a remote host, which must be refused, followed by a successful request using a defined account. Confirm that no account exists with a default or empty password.

  3. Place HTTPS behind a reverse proxy

    Put a reverse proxy such as nginx or Apache in front of Orthanc, terminate TLS there with a certificate issued by your internal or public authority, and bind Orthanc only to the loopback or private interface the proxy uses. The security FAQ recommends HTTPS and a reverse proxy for any Internet exposure. The check is that plain HTTP to the public address is refused or redirected, the certificate chain validates from a client, and a direct request to the Orthanc port from outside the proxy host fails.

  4. Enable DICOM TLS only for links that need it

    Identify each modality, peer archive or remote site that exchanges images with Orthanc over an untrusted network, and configure DICOM TLS for those links only, since TLS is supported from Orthanc 1.9.0 onward. Exchange certificates with each partner through an agreed channel and restrict accepted peers by AE title and address. The check is a C-ECHO or C-STORE over TLS that succeeds, and a connection from an unlisted peer or without TLS that is refused. Local modalities on an isolated segment may stay on plain DICOM if your risk review accepts that.

  5. Disable the execute-script and export routes

    The 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 must stay disabled in production. Confirm in the configuration that the relevant options are off, and remove any Lua or Python scripts that call these routes. The check is a request to each route that returns an error instead of executing, and a review of the script directory that finds no unexpected callers. Keep a written record of who may approve any future change to this setting.

  6. Review plugins, scripts and exposed routes

    List every plugin loaded by Orthanc, such as the database back end, object storage, DICOMweb, viewers and the authorization plugin, and remove any that the archive does not use. Review each Lua or Python script for network calls, file writes and credential handling. Map which REST routes are reachable through the proxy and block those that viewers and integrations do not need. The check is a diff between the loaded plugin list and the approved list, and a proxy test that confirms only the intended paths respond.

  7. Protect the storage area and database

    Restrict filesystem permissions so only the Orthanc service account can read and write the storage directory and database files, and confirm the same for any object storage bucket or PostgreSQL role used by the plugins. Encrypt storage at rest through the layer your platform provides, and keep backups under the same controls. Test a restore into a separate environment before relying on it. The check is a permission audit showing no world-readable patient data, and a successful restore whose study count matches the source.

  8. Verify the result with a port and request scan

    Run a network scan from a host outside the trusted segment and confirm that the only open listener is the reverse proxy HTTPS port, plus any DICOM TLS port you intentionally exposed. Repeat unauthenticated and authenticated requests against the public endpoint and confirm the expected 401 or 403 responses. Save the scan output and configuration as evidence for the change record, and repeat this sequence after each Orthanc upgrade, including moves between releases such as 1.12 and 1.13.

Why the script and export routes stay off

The script and export routes should stay disabled on any Orthanc server that holds patient images. The Orthanc security FAQ warns that /tools/execute-script can let a malicious user run any system command on the host, and that the export route can overwrite files. On a server that is reachable from a clinical network or the Internet, either capability turns a compromised login or a single exposed API into control of the machine that stores the archive. Treat these routes as administrative functions that no ordinary user, viewer or integration account needs.

To confirm they are off, check the server configuration file and the running instance rather than assuming the defaults match your build. Look for the script and export settings in the configuration, confirm that the Orthanc REST API does not answer to these routes from a test client using a low-privilege account, and repeat the check after every upgrade, since a new package or a copied configuration file can change what is enabled. Then search the local scripts, cron jobs, Lua or Python hooks, viewer configurations, and any integration code or middleware for calls to /tools/execute-script or export endpoints. Ask the teams that own each integration to confirm in writing whether they depend on these routes, because a silent failure after you disable them is a common surprise.

If a team genuinely needs a related function, such as scripted file output or a bulk export to a folder, do not re-enable the risky route. Write down the business need, then design a narrower path: a fixed export job run by the service account with a locked destination directory, a DICOM or DICOMweb transfer to a known modality, or a plugin that performs one defined action. Have the security team review that design and test it with the same low-privilege account. Confirm the exact configuration keys and route behavior against the Orthanc Book version you run, since the details differ across releases.

How hardening changes by deployment model

A single Orthanc instance on a hospital network usually has one application host, one local index database and direct modality connections over DICOM. Remote access is the first decision. The default configuration only accepts HTTP from localhost, so any browser or viewer on another workstation requires RemoteAccessAllowed to be enabled, with AuthenticationEnabled set to true and users defined under RegisteredUsers. Because this model often has no dedicated ingress, the reverse proxy and its TLS certificate usually become a new component that someone must own.

  • Proxy location: Place the HTTPS reverse proxy on the same host or on a dedicated front-end host, and confirm which one your network team prefers.
  • Certificate handling: Decide who issues, renews and stores the server certificate, and whether DICOM TLS is needed for inter-site exchanges.
  • Database exposure: The built-in SQLite index stays local, so confirm no separate database port is opened.
  • Backup encryption: Confirm whether the backup job encrypts archives before they leave the host.
  • Dangerous routes: Keep /tools/execute-script and the export route disabled.

Confirm with the hospital network team who owns the host, the certificate lifecycle and the firewall rules for DICOM ports.

Controls that protect patient images at rest and in transit

Orthanc holds identified patient images that move across the network, reach clinicians through a browser, and sit on disk or object storage for years. The controls below work together: encryption in transit, controlled credentials, narrow network exposure, protected storage, traceable access and limited database rights. Each one needs a decision and a check before the server holds real studies.

TLS for the proxy and DICOM

Browser traffic should reach Orthanc only over HTTPS, normally terminated at a reverse proxy in front of the server. DICOM TLS is a separate setting that protects exchanges with other sites and modalities, and it needs its own certificates and trust lists. Confirm which certificate authority your organization uses, how certificates are renewed, and that both the proxy and each DICOM peer reject outdated protocols.

Orthanc security FAQ

Secrets for passwords and database access

User passwords in the RegisteredUsers list and the database credentials in the configuration file are the keys to every study. Keep them out of version control and shared configuration files, and load them from a secrets store or protected environment variables at startup. Confirm who can read the configuration on the host and how credentials are rotated when staff leave.

Network segmentation of the DICOM port

The DICOM listener should accept connections only from modalities, workstations and partner sites that have a documented need. Place the server in a segment that the imaging network can reach but general office and internet traffic cannot. Confirm the allowed source addresses, the AE titles configured on both ends, and whether firewall rules are reviewed when a device is replaced.

Encryption at rest for storage

Study files are stored on local volumes or in object storage, and encryption at rest is usually provided by the volume, the object store or the platform rather than by Orthanc itself. Confirm with your storage or cloud provider whether encryption is enabled, who holds the keys, and how backups and replicas are protected. Also confirm which object storage plugin, if any, your design uses before you rely on its encryption options.

Audit logging of access

Orthanc records activity in its logs, but a clinical audit trail needs to show who opened, exported or deleted which study and when. Decide where logs are shipped, how long they are kept, and who reviews them. Confirm that authentication events are logged and that log storage is protected from the users whose actions it records.

Least-privilege database accounts

The Orthanc service should use a database account that can read and write only the schema it needs, not an owner or administrator account. Keep schema changes for upgrades under a separate, controlled account. Confirm the grants with the database administrator, and test that a compromised application account cannot drop tables or read other databases on the same server.

How to test that hardening holds

Test the failure modes, not just the settings. A hardened Orthanc server is only as good as its behavior when someone tries to get around it. Run a short, repeatable set of checks from a machine outside the server's trusted network and from inside it. Confirm that unauthenticated REST calls are refused when AuthenticationEnabled is true, that remote access is blocked when RemoteAccessAllowed is false, and that the server does not respond to plain HTTP on any port where HTTPS is the required entry point. Confirm that /tools/execute-script returns an error and that the export route is also disabled, since the Orthanc security FAQ identifies both as high-risk. For DICOM TLS, attempt associations with no client certificate and with a certificate the server does not trust, and expect the handshake to fail. Record the exact request, the response code and the time of each test.

Scan the ports the server actually exposes. Configuration files can say one thing while the container, firewall or load balancer allows another. Run a port scan from the networks that should and should not reach the server, covering the HTTP port, the DICOM port and any database or object storage port that should stay private. Compare the results against an approved list of open ports and treat any difference as a failed test. Ask the team that owns the network controls to confirm which rules apply, because the scan proves what is reachable, not why.

Repeat the tests and keep the evidence. Run the full set after every Orthanc upgrade, plugin update, reverse proxy change and configuration change, because a new release or a changed default can reopen a path that was closed. Store each run with the Orthanc version, the configuration file version, the date, the tester and the pass or fail result for each check. This record is what an assessor or security reviewer will ask for, and it also shows your team which control broke when a test fails. Confirm the exact expected responses for your Orthanc version against the Orthanc Book before you write the pass criteria, since some routes and defaults change between releases.

What to monitor, back up and document after hardening

This table lists the recurring checks an Orthanc owner should keep after hardening, with the owner and cadence the team sets for each one. Use it to turn a one-time hardening project into routine operations, and agree the cadence with your security and clinical stakeholders before go-live.

CheckWhat to doOwner and cadence
TLS certificate expiryTrack expiry dates for the reverse proxy HTTPS certificate and any DICOM TLS certificates used for inter-site exchange, and renew before expiry.Platform team sets the cadence and alert lead time.
User account reviewCompare RegisteredUsers entries, or identities in the authorization service if one is used, against current staff and partner access, and remove stale accounts.Security owner with the system owner sets the review interval.
Orthanc and plugin upgrade trackingFollow the Orthanc NEWS file for releases such as 1.12.10, 1.12.11 and 1.13.0, and record which core and plugin versions run in each environment.Platform engineering sets the review cycle and test window before upgrades.
Dangerous route statusConfirm that /tools/execute-script and the export route remain disabled after each configuration change or upgrade.Platform team checks at every change and during the scheduled review.
Backup and restore testRestore an encrypted backup into a separate environment, verify study counts and image readability, and record the result.Operations owner sets the test cadence and retention period.
Access log reviewReview REST access and authentication events for unexpected sources, failed logins and access to large study sets.Security team sets the review interval and escalation path.
Configuration baselineKeep orthanc.json, reverse proxy configuration and plugin settings in version control, with changes reviewed before deployment.Platform team owns the baseline and reviews drift on a set schedule.

Questions teams ask before hardening Orthanc

How much effort does an Orthanc security hardening review take?

The effort depends mainly on how the server is exposed and how many systems surround it. A review of a single server reached only from a trusted network is usually much smaller than one covering remote access, a reverse proxy, DICOM TLS to several modalities and a storage backend. Ask for the effort to be broken into the areas that apply to your setup: authentication and remote access settings, HTTPS through a reverse proxy, DICOM TLS for each connected site, review of REST routes, scripting and storage encryption, and verification after the changes. Each added connection point, plugin or external system adds configuration and test work. Ask the provider to state which of these areas are included in the written scope and what evidence will be delivered at the end.

Can our own team harden Orthanc without a partner?

Yes, if your team has administrators who know Linux or Windows service configuration, reverse proxy settings and DICOM networking. The Orthanc Book security FAQ documents the main settings, including RemoteAccessAllowed, AuthenticationEnabled, RegisteredUsers and the routes that should stay disabled, so the configuration itself is not secret. The harder parts are testing the result against your real modalities and viewers, confirming that no route still exposes data or allows command execution, and documenting the controls for your own compliance team. Teams with limited security testing experience often bring in an outside reviewer for an independent check of the final configuration. Decide early which of these tasks your staff can own over time.

What does a hardening review need from security and radiology IT?

The review needs input from two groups. Security teams should provide their standards for authentication, TLS certificates, logging, network segmentation and any identity provider that must be used. Radiology IT should provide the list of modalities, workstations, viewers and referring systems that send or retrieve images, along with the AE titles, IP addresses and ports each one uses. Both groups should confirm which users and departments need access, whether any external sites exchange studies with the server, and what the change window and rollback plan look like. Without the connection inventory, DICOM TLS and access rules cannot be tested properly, so ask for this list before the review starts.

Is Orthanc licensed for security work and changes to the code?

Yes, the Orthanc core is licensed under GPLv3 or later, and the scalability and cloud plugins, such as the PostgreSQL and web viewer plugins, are licensed under AGPLv3 or later. These licenses allow you to run, configure and modify the software, and the security FAQ settings are ordinary configuration, not licensed features. Your legal team should still review what they must do when they distribute modified code or offer a modified plugin to users over a network, since AGPLv3 has network-use obligations. Note that UCLouvain contributions made since September 1, 2021 cannot be dual licensed, so the license terms do not change depending on who performs the work. Confirm the license terms with your legal team before you rely on them.

Does Orthanc Team offer paid support hours, and how are they quoted?

Orthanc Team SRL sells deployment, configuration and development services, including pre-paid dedicated support hours that are valid for 12 months. There is no paid edition of the Orthanc software itself. Pricing for support hours and services is quoted on request, so you should send a written scope and ask for a quote that states the number of hours, what each block covers, what happens to unused hours after 12 months, and how urgent requests are handled. Keep in mind that hardening work and recurring support are separate purchases, and a quote for one does not include the other.

Is username and password authentication enough for an Orthanc server exposed to the Internet?

No. Authentication is one control among several. The Orthanc Book states that by default Orthanc only accepts HTTP connections from localhost, and when RemoteAccessAllowed is enabled, AuthenticationEnabled should be true with users defined in RegisteredUsers. The Orthanc docs also recommend HTTPS and a reverse proxy for Internet exposure. Even with those in place, you still need to disable the routes that can execute scripts or overwrite files, restrict network access to known modalities with DICOM TLS where sites exchange data, review who can reach the administrative interface, and log access. A RegisteredUsers list also has limits for larger teams, so consider whether a token-checking service is needed for per-study access.

What should we do if our Orthanc server already has the script route enabled?

Treat it as an incident to investigate first, then disable it. The Orthanc security FAQ warns that the /tools/execute-script route can let a malicious user run any system command, and that the export route can overwrite files, so both should stay disabled. Start by restricting network access to the server so that no untrusted user can reach it while you work. Then review the server logs, file system changes, scheduled jobs and recently added users for signs of misuse. Disable the route in the configuration, restart under a change window, and confirm the route no longer responds. If you find evidence of misuse, involve your security incident process and, where patient data may have been exposed, your privacy and legal teams.

How requests and trust boundaries fit together

Requests start in two places: a user browser and a modality. Browser traffic reaches a reverse proxy that terminates HTTPS, then passes to Orthanc, which should only accept remote REST access once authentication is on. Modalities connect to a separate DICOM TLS listener. Both paths end at the database and storage area. Check that /tools/execute-script is refused before the request reaches Orthanc, and confirm that every edge crossing the network boundary is encrypted.

Remote and modality traffic cross the edge boundary into the Orthanc host.

How DeployOpen scopes and hands over Orthanc hardening

DeployOpen hardens Orthanc inside the client's own infrastructure, starting from a written scope that names each control to be configured and tested. The work covers access settings, HTTPS, DICOM TLS, dangerous routes and storage, and ends with documented evidence the client's security and compliance teams can review.

How we scope

  • Inventory current Orthanc version, plugins, network exposure and who connects to the server
  • Agree which access, HTTPS, DICOM TLS, REST route and storage controls are in the written scope
  • Confirm the hosting model, including cloud accounts, data center or air-gapped network
  • Record out-of-scope items such as SSO build, migration or viewer changes before work starts

How we build

  • Apply authentication, remote access and reverse proxy settings in a staging copy first
  • Disable script execution and file overwrite routes, then test that they return denied responses
  • Configure DICOM TLS only for the peers that need it, and verify each connection path
  • Test access with valid and invalid users, and confirm encryption at rest for the storage area

How we hand over

  • Deliver a configuration record listing each setting, its value and the reason for it
  • Provide test results showing which controls passed, failed or were accepted with a stated risk
  • Document the upgrade steps so later Orthanc releases can be checked against the same controls
  • Walk the client's operations team through the runbook and the evidence set

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts
  • Ongoing support, upgrades and continuous testing are available as a retainer
  • Retesting after configuration changes or a core upgrade can be included in the written scope
  • Ask any partner to confirm which controls they will test and what evidence they will hand over

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.