Upgrading Orthanc clusters that share one database

Several Orthanc instances on one PostgreSQL database cannot be upgraded one at a time when the schema changes. This page covers the risks, the lock and restart behavior, and a planned shut-down, upgrade, restart runbook.

On this page

How to upgrade an Orthanc cluster that shares one database

A rolling update is not a safe default when several Orthanc instances read and write one PostgreSQL index and the new release changes the database schema. Plan the cluster as one unit: every instance moves to the same Orthanc version, the schema is upgraded once, and no instance runs against a schema it does not expect. Upgrades matter here because the index and the storage code change between releases. Orthanc 1.13.0, released on 2026-08-15, rewrote storage-area access and DICOM parsing and transcoding to improve caching and reduce memory use, and it followed 1.12.11 (2026-04-14) and 1.12.10 (2025-11-26). Your cluster will eventually face a release like this, so the runbook should exist before you need it.

Multi-instance sharing has been supported since Orthanc 1.9.2 with PostgreSQL plugin 4.0, which is why many hospital archives run several instances against one database for scale or availability. That sharing is what makes the upgrade a coordinated event. Start by testing the target version against a copy of the production database on a separate environment, and confirm which plugin revision it requires. Next, take a database backup that you have restored at least once, and record the current versions of every instance. Then stop all instances, run the upgrade step once, confirm that the schema is at the expected revision, and start the instances on the new version. Confirm the exact upgrade command, plugin pairing and any startup checks against the release notes for your target version before you schedule the window.

What changes between Orthanc releases and what each change means for a cluster

This table lists the release changes that matter when several Orthanc instances share one PostgreSQL database, and what each one means for rollout order and testing. Read each row before choosing a target version, since a change that looks local to one node can affect every node that reads the same index. Confirm exact release contents in the Orthanc NEWS file before you plan.

ChangeImpact on a shared-database clusterAction needed
Orthanc 1.13.0 storage-area and DICOM parsing rewrite (released 2026-08-15)Changes how each node reads files from storage and transcodes images, with caching and memory behavior different from 1.12. Nodes on mixed versions may behave differently on the same study.Confirm the rewrite details in the NEWS file. Test reads, transcoding and memory use on a copy of the cluster before any node runs 1.13.0.
Orthanc 1.12.11 (released 2026-04-14) and 1.12.10 (released 2025-11-26) point releasesPoint releases on the same line are the lowest-risk step for a mixed fleet, but each still needs the same version on every node that touches the database.Pin one exact version across all instances. Read each NEWS entry between your current and target version for notes on database or configuration changes.
Split advanced configuration fileNodes configured with the older single file may start with settings that are read differently. A node that keeps old settings can diverge from peers that were moved.Move settings on every node in the same change window. Compare the effective configuration of each node after the change, not only the file you edited.
Stricter startup checks on authentication settingsA node with weak or incomplete authentication settings may refuse to start. In a rolling update, one refused node can leave the cluster with fewer instances than planned.Review authentication settings on each node before the window. Confirm the exact checks in the NEWS file and in the sibling upgrade topic.
Stricter startup checks on OverwriteInstances valuesA node with a value the new check rejects will not start, and a node that starts with a different value can change how duplicate uploads are handled across the cluster.Set one agreed OverwriteInstances value on all nodes and confirm it passes the startup check in a test run.
Database schema changes in a new releaseShared schema changes must run once, against the database, before any instance uses the new version. Starting a newer node first can leave older nodes unable to read the index.Stop all instances, back up the database, run the upgrade step once, then start instances. Confirm the schema requirements in the NEWS file.
PostgreSQL 18 (first released 2025-09-25, supported to 2030-11-14)Only relevant if the database server moves to a new major version. Major upgrades need a dump and restore, pg_upgrade or logical replication, and the database is unavailable to every instance during the cutover window.Plan the server upgrade as a separate change from the Orthanc upgrade. Confirm the method and downtime with your DBA and the PostgreSQL upgrading documentation.
PostgreSQL 18 authentication changes (MD5 deprecated in favor of SCRAM)Instances that connect with MD5 password authentication may fail to log in after a server change, which stops every node at once.Check each instance's database role and password method before cutover. Confirm connection tests succeed from every node.

Why rolling updates are unsafe when the schema changes

A rolling update is safe only when every instance can read and write the database the same way before and after the change. Orthanc instances that share one PostgreSQL database can run different code versions at the same time during a rolling update. If the new version changes the database schema, the old instances still running against that database may fail, write inconsistent data or behave unpredictably. The shared database makes version skew a data risk, not just a service risk, so the upgrade order has to be planned before the first instance is touched.

Schema migrations take locks on the tables they alter, and those locks can block or fail work that other instances are doing at the same moment. A migration started by one instance can wait behind active queries, and queries that arrive during the migration can wait behind it. Restart order therefore matters: the team should know which instance performs the migration, whether it runs at startup, and how long the other instances can safely stay up. Confirm the exact locking and schema-revision behavior for the target release in the Orthanc Book and reproduce it on a copy of your production database before you plan a window.

Orthanc refuses to start when the schema does not match the version it expects, as covered in the sibling topic on database schema upgrades. That protection helps, but it does not replace a plan. Confirm which instances will be stopped, which one will run the upgrade step, and what each old instance does if it is still running when the schema changes. Record these decisions in the runbook and test them on a separate database first, so the shut-down, upgrade and restart sequence is known before it is needed in production.

What to prepare before you stop the first instance

Every card below is a precondition for the shut-down, upgrade, restart sequence. Together they let you roll back to a known state, know exactly which software each node runs, and carry out the change without surprises on a live archive.

Verified backup of database and storage

Take a PostgreSQL backup and a copy of the DICOM storage area, then restore both to a separate host and confirm that Orthanc starts against the restored database and can read a sample of instances. The restore test is the step most teams skip, and a backup that has never been restored is not yet a rollback option. Confirm the backup covers the storage area used by every node, since all instances must agree on the same index and files. The PostgreSQL continuous archiving documentation describes base backups and point-in-time recovery, which lets you return the database to a moment just before the change.

Continuous archiving docs

Version inventory for every node

Record the Orthanc core version, the PostgreSQL plugin version, any other loaded plugins, the Docker image tag or package build, and the PostgreSQL server version on each node. Nodes that drifted apart during earlier maintenance are a common cause of schema errors during a shared-database upgrade. Check the inventory against the running processes, not only the deployment files, because a container may still run an older image than its manifest names.

Customization and authorization inventory

List every Lua, Python or Java script, every custom REST integration and every authorization plugin setting that the cluster depends on. Each one must be checked against the target Orthanc and plugin versions before the window opens. Record the authorization service endpoint and the token configuration as well, because a change in the plugin can silently deny access to Orthanc Explorer 2 or to automated clients.

Staging cluster with matching node count

Run the full upgrade sequence on a staging cluster that has the same number of Orthanc nodes, the same database engine version and a copy of production data of realistic size. A single-node staging test does not exercise the shared-database behavior, and a small dataset hides long migration times. Time each step in staging and record how long the first start on the upgraded schema takes, so the production change window reflects measured numbers.

Change window and communication plan

Agree the window, the people who can stop and start each node, the clinical teams that must be warned about downtime, and the escalation contact if a migration hangs. Ask the clinical and radiology leads which imaging workflows depend on the archive during that window, such as emergency reads or scheduled transfers to other sites. Write the decision point in advance: who decides whether to continue or roll back, and by when.

Tested rollback path

Define the rollback before the first node stops. Decide whether rollback means restoring the database backup, restoring the previous container images or packages, or both, and rehearse that path in staging. Note that a schema change applied by a newer Orthanc generally cannot be reversed by an older binary, so the restore from backup is usually the real rollback. Document the exact commands and the owner who runs them.

The shut-down, upgrade and restart runbook for a shared-database cluster

This sequence moves a group of Orthanc instances that share one PostgreSQL database to a new release without any instance running against a schema it does not expect. It ends with the cluster serving traffic again on matching versions, with a named rollback point at every stage.

  1. Freeze ingestion and routing

    The cluster owner stops new DICOM store traffic, C-MOVE and C-GET jobs, scheduled forwards and any routing rules that write to the cluster, then confirms in each modality or peer configuration that nothing still points at the cluster. Work in progress such as queued jobs and Housekeeper runs should finish or be paused before you continue. The step is done when a recent log window on every instance shows no new incoming writes. Rollback point: traffic can be resumed here with no changes made to the cluster.

  2. Confirm backups and record the restore test

    Take a fresh logical dump of the PostgreSQL database and a copy of the DICOM storage area, then restore the dump into a separate scratch database and open it with the current Orthanc release. Record the backup file names, checksums, the restore date and who performed the test in the change record. The step is done when the scratch restore starts and returns the expected study count. Rollback point: this restored backup is the one you will use if the schema upgrade fails.

  3. Stop every Orthanc instance

    Stop all Orthanc processes or containers in the cluster, including any instance used only for maintenance or read-only access. Confirm that each process has exited and that no reverse proxy or load balancer still forwards requests to it. The step is done when the process list and the load balancer pool both show zero active Orthanc members. Rollback point: restart the stopped instances on the old release, which remains compatible with the untouched database.

  4. Confirm no sessions hold the database

    Query PostgreSQL's activity view for connections from the Orthanc database user or application name, and terminate any idle sessions left by the stopped instances after confirming they belong to this cluster. Check that no long-running transaction or lock remains on Orthanc tables. If you use a connection pooler such as PgBouncer, confirm its pools hold no open server connections to the Orthanc database. The step is done when the activity query returns no Orthanc sessions. Rollback point: if sessions cannot be cleared, keep the cluster stopped and investigate before touching the schema.

  5. Upgrade the first node and run the schema step once

    On one designated node, install the target Orthanc release and matching plugin versions, then run the database schema upgrade step described in the target release notes exactly once. Confirm the exact command, flags and order against those notes before running anything, because they vary by release. Watch the log until the upgrade reports completion, and expect a long run on a large database. The step is done when the process exits cleanly. Rollback point: restore the backup from the earlier step into the production database and reinstall the previous release.

  6. Verify the revision and a sample read and write

    Check the schema revision recorded by the database plugin against the value listed for the target release, then start the upgraded node alone. Store one test instance, retrieve it through the REST API and confirm the study appears in a query, then delete the test data. The step is done when the revision matches, the test store and retrieve succeed and the logs show no errors. Rollback point: if any check fails, stop the node and restore from backup, since other nodes have not yet been touched.

  7. Upgrade remaining nodes to matching versions

    Install the same Orthanc core version and the same plugin versions on every remaining node, and confirm each node's binary or image tag matches the first node. Do not run the schema upgrade step again on these nodes, because the database is already at the new revision. Compare configuration files against the release notes, since settings that changed between releases must match across the cluster. The step is done when a version report from every node shows identical core and plugin versions. Rollback point: nodes that have not started can be reverted to the old release, which is safe only while the database is still on the old schema or fully restored.

  8. Start instances one at a time

    Start the upgraded nodes sequentially, waiting for each to finish its startup checks and report ready before starting the next. Watch the logs for schema or plugin warnings and for any unexpected long first-start activity. Add each node back to the load balancer only after its health check passes. The step is done when all nodes are running, present in the pool and passing health checks. Rollback point: a node that fails to start can be stopped and kept out of the pool while the others continue.

  9. Run health and DICOM echo checks, then resume traffic

    Run the REST health endpoint against every instance, send a DICOM C-ECHO from each configured modality and peer to each node's DICOM port, and perform one end-to-end store and query. Record the results in the change record, then re-enable ingestion and routing in the order you froze them. Watch the first hours of traffic for errors and compare them with the pre-upgrade baseline. The step is done when all checks pass and traffic flows normally. Rollback point: if the checks fail, keep traffic frozen and use the restored backup from the second step.

Stopping all instances before the schema changes, then restarting one at a time

The flow starts with a backup and a freeze of writes, then stops every Orthanc instance so none touches the shared PostgreSQL schema during migration. One upgrade run changes the schema once, after which instances restart in stages. Each stage ends in a check, and a failed check sends the team back to the backup rather than forward into a mixed-version cluster. Confirm each check against your own environment before the window opens.

Phased shutdown, single schema change, staged restart, and rollback paths on failed checks.

How to test the upgrade and roll back safely

Test the full cluster change on a copy of production data before any shared database is touched. The copy should match production in node count, Orthanc version, plugin versions and the PostgreSQL major version, so the rehearsal reproduces the real schema step and the behavior of every instance that will connect to it. Run the upgrade with the same shutdown, --upgrade and restart order as the runbook, then start each node and confirm it reports healthy. Time the schema step separately from the rest, because it is the part most likely to run long on a large index and the figure drives your change window. Confirm the target versions and their release notes with the Orthanc NEWS file before you schedule the rehearsal.

Once the cluster is back, verify the workflows that matter to clinicians and referring sites rather than only the health endpoint. Store a test study through the DICOM port, query and retrieve it from a modality or peer, and open it in the viewer your radiologists use, from a browser on the network where they work. Check that authorization still behaves as expected for each role, especially if you use the advanced authorization plugin or a token service in front of Orthanc Explorer 2. Record each result against the test plan so the sign-off is traceable.

Plan rollback as a restore from a backup you have verified, not as a reversal of the schema. Confirm that the backup of the PostgreSQL database and the Orthanc storage area were taken from the same point in time, and that a test restore into a separate environment completes and opens a sample study. Record how long that restore took, including copying DICOM files, not just the database dump, and use that measured figure to set the window and the go or no-go deadline. Downgrade scripts exist for some plugin schema revisions, but they are a last resort described in the PostgreSQL plugin upgrade topic, and you should not depend on them in a production change.

Whether the PostgreSQL server upgrades in the same window

Many clusters keep the current PostgreSQL major version during an Orthanc upgrade and apply only minor releases. PostgreSQL states that minor releases never change the internal storage format, so updating means replacing the executables and restarting the server. That keeps the database change small and easy to reverse by reinstalling the previous minor binaries, provided no new data format has been written by the upgraded server.

  • Scope of the change: Replace the server packages or container image, then restart the database within the same maintenance window as the Orthanc stop.
  • Compatibility check: Confirm the Orthanc plugin version you are moving to supports the PostgreSQL major version already in use.
  • Support horizon: PostgreSQL 14 is supported to November 12, 2026, so plan a major upgrade for that cluster before the date passes.
  • Restart order: Stop every Orthanc instance first, then restart PostgreSQL, then start Orthanc only after the database accepts connections.
  • Rollback: Keep the previous minor package available so the server can be reverted if the restart fails.

Before the window, ask your DBA or database vendor to confirm the exact minor release, the supported path for your packaging, and whether any extensions need updating.

What makes a cluster upgrade take longer

This table lists the factors that stretch an upgrade of several Orthanc instances sharing one PostgreSQL database, and what each one adds to the work. Use the last column to decide what to measure in your own environment before you set a maintenance window. The main takeaway is that schema revisions and data volume matter more to the window than the number of instances alone.

DriverWhy it adds effortWhat to ask or measure
Number of instancesEvery instance must stop, upgrade and restart in the right order, and any instance left on the old version can conflict with a migrated schema.How many instances share the database, which of them are in front of a load balancer, and whether a shutdown order is documented.
Database sizeLarge indexes and tables make schema migrations and index rebuilds take longer while the database is unavailable to all instances.Current database size, row counts for the main index tables, and a measured restore time on a copy of production data.
DICOM storage sizeStorage volume does not change the schema, but it affects backup duration, restore verification and any housekeeping run that follows the upgrade.Total stored volume, the storage back end in use, and how long a full backup and a test restore take today.
Plugin count and custom scriptsEach plugin and Lua, Python or Java script must be checked against the new core and plugin versions, and a script that depends on an old behavior can block the restart.A list of every plugin, script and its owner, with the version each one is pinned to and the tests that exercise it.
Authentication integrationAn external authorization service, such as one used with the advanced authorization plugin, must accept the new version's requests and tokens, so it becomes part of the same test cycle.Whether the authorization plugin is in use, which external service decides access, and whether that service can be upgraded or tested separately.
Long first starts after schema revisionsA new schema revision can run migration steps on the first start, which can keep every instance offline far longer than a normal restart.Whether the target release has schema changes, the size of the migration on a copy of the database, and how long the first start took in staging.
Backup and restore speedA rollback path depends on a backup that can be restored within the window, so slow restores extend the risk period of the upgrade.Time to take a consistent backup, time to restore it to a separate server, and whether the restore has been tested in the last upgrade cycle.
External integrations and viewersEach DICOM peer, DICOMweb client, worklist provider and viewer must be confirmed against the upgraded API and networking behavior, and some must be informed of downtime.A list of connected modalities, PACS, viewers and API clients, their owners, and the test each one needs after the upgrade.

Questions teams ask before upgrading a shared-database Orthanc cluster

How much does a shared-database Orthanc upgrade cost?

The cost depends on the written scope, not on a list price, and DeployOpen does not publish one. The main drivers are the number of Orthanc instances, the number of plugins and Docker images involved, the size of the PostgreSQL database and whether a schema change is part of the move. Cost also rises with the amount of testing against a copy of production data, the runbook you need written for your own operators, and any work on the PostgreSQL server underneath. Ask for a quote that separates the one-time upgrade work from any recurring support, which is sold as a retainer or as pre-paid dedicated support hours. Orthanc Team SRL sells pre-paid support hours valid for 12 months, quoted on request, so compare those terms against the fixed scope.

How long will the Orthanc cluster be unavailable during an upgrade?

The downtime window is set mainly by how long the first start takes after a schema change and how many instances must stop together. When several instances share one database, the schema change has to finish before any instance serves requests, so the whole cluster is stopped for that stretch. Other factors include the database size, the number of migration steps between your current and target revisions, backup and restore time, and whether the PostgreSQL server itself needs a restart or a major version move. Your team should measure these on a copy of production data in staging. Ask the provider to state the window in the written scope as a range tied to those measurements, and to name the steps that fall inside it.

Can our own team upgrade a shared-database Orthanc cluster?

Yes, if your team has the skills to run the steps in order, and many teams do. The work involves reading the release notes, testing the new version against a separate copy of the database, stopping every instance, backing up, running the schema upgrade once, and restarting in a controlled order. Teams that run PostgreSQL and Docker or Linux services day to day usually have most of the skills required. The gap is often rehearsal and an agreed rollback plan, not the commands themselves. If your team has no PostgreSQL or Orthanc operator on staff, a fixed-scope engagement can cover planning, the runbook, the rehearsal and the cutover, while your staff keep ownership afterward.

What does the upgrade need from our own staff?

Your staff provide access, decisions and the environment knowledge that no outside team has. Expect to name a clinical or imaging owner who can accept a downtime window, an infrastructure owner for the Orthanc hosts and the PostgreSQL server, and a security owner who reviews access and TLS settings before go-live. You will also need access to a staging environment that mirrors production closely enough to test, copies of current backups, change approval paths, and a monitoring or log contact for the cutover period. Ask the provider to list these inputs in the written scope so that a missing contact does not delay the window.

Can we upgrade the Orthanc instances one at a time?

Not safely when the release changes the database schema. Since Orthanc 1.9.2 with PostgreSQL or MySQL plugins 4.0, several instances can read and write the same database, which makes clustering possible, but that does not mean a rolling update is safe. An instance running an older build can read or write rows in a shape the new build no longer expects, and the schema upgrade must run once against the database. For releases that do not change the schema, a staged restart may be possible, but you should confirm that against the release notes for each version. The safe default is to stop all instances, run the upgrade once, and start them again in a planned order.

What happens if the upgrade fails halfway through?

The outcome depends on whether you took a verified backup before the schema step and whether you can restore it within the window. A failed schema change can leave the database in a state that neither the old nor the new build starts from cleanly, so the rollback path must be tested before the cutover. Ask for a written rollback plan that names who decides to roll back, the time limit for that decision, the restore procedure for the PostgreSQL database and the Orthanc storage area, and how you will verify the restored system. Downgrades are not always supported, so the restore from backup is often the realistic exit route. Confirm the details against the Orthanc schema upgrade documentation for your target version.

Do Orthanc Team support hours cover a cluster upgrade?

Only if the upgrade is written into the support scope. Orthanc Team SRL sells deployment, configuration and development services, plus pre-paid dedicated support hours that are valid for 12 months and quoted on request. Those hours can cover questions, troubleshooting or configuration help, but the amount of work a given upgrade needs depends on the cluster and the target release. Before you buy hours, ask whether they include a rehearsal on your data, the cutover itself, and post-upgrade checks. A separate fixed-scope engagement from DeployOpen can cover the upgrade planning, runbook, rehearsal and cutover, and that scope should be agreed in writing before work starts.

How DeployOpen scopes and delivers a cluster upgrade

DeployOpen treats an upgrade of several Orthanc instances on one PostgreSQL database as a coordinated change to the whole cluster, not a rolling update of individual nodes. The work is planned in writing, rehearsed on a copy of your database, and handed over with a runbook your own team can repeat.

How we scope

  • Inventory every Orthanc instance, plugin version, Docker tag and the PostgreSQL server they share.
  • Confirm the target Orthanc release and whether it changes the database schema before any node is touched.
  • Agree the maintenance window, rollback point and acceptable downtime in the written, fixed-scope agreement.

How we build

  • Rehearse the shut-down, upgrade and restart sequence on a restored copy of the production database.
  • Measure first start duration on that copy, then plan how long the cluster stays offline.
  • Take and verify a hot backup of the database immediately before the production change begins.

How we hand over

  • Deliver a step-by-step runbook covering stop order, schema upgrade, restart and post-restart checks.
  • Document rollback steps, including which backup to restore and the version pins to revert.
  • Walk your operations team through one dry run so they can repeat the procedure without us.

How we support

  • Offer ongoing upgrades, testing and runbook maintenance for future Orthanc and PostgreSQL releases as a retainer.
  • Review each new release's schema notes and update the runbook before the next maintenance window.
  • Confirm the support terms, response expectations and included hours with us in writing before work starts.

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.