Mirrored Orthanc servers for disaster recovery: when your archive needs a second copy
If your imaging team holds patient studies on a single Orthanc and cannot afford to lose access to them, the Orthanc Book documents how to replicate the content of one instance to another to create a mirrored DICOM server. This page covers that replication, the ongoing sync between the two copies, how to verify that the mirror is complete, and how to fail over viewers and modalities when the primary is unavailable. A mirror is not a backup. A mirror is a second live copy that follows the primary, so a bad deletion, a corrupted index or a faulty script can reach both copies within minutes. A backup is a point-in-time copy you can restore from after such an event. Most archives that need protection need both, and the decision about which one to build first depends on what failure you are protecting against.
The Orthanc Book describes replication for two purposes: upgrading between database schema versions and creating mirrored DICOM servers. The same mechanism therefore serves a planned upgrade and a standby site, which is why the replication procedure deserves a test run before you rely on it for either. Before you design the mirror, confirm with your own environment what the primary must keep serving during a failure, which modalities and viewers point at it by hostname or AE title, and whether those clients can be repointed without reconfiguring every workstation. Ask your Orthanc Team contact or your internal platform owner which Orthanc version and database back end both sites will run, because the mirror must match the primary's behavior. Record how long the mirror may lag behind the primary and who decides when failover happens. Those answers set the scope of everything that follows.
Which sync method fits which archive
The Orthanc Book describes replicating the content of one Orthanc instance to another, and it documents this route for two purposes: upgrading between database schema versions and creating mirrored DICOM servers. For a disaster recovery mirror, this is the method that most directly matches the goal of a second, complete copy of the archive. It is a bulk copy between two instances, so it suits a mirror that is built, verified and then kept current, rather than a stream of new studies arriving in real time. Your team controls when the copy runs and which instance is the source.
- What it moves: the stored content of the source instance, as described in the replication page of the Orthanc Book.
- Direction: one way, from the source instance to the target instance.
- Trigger: an operator or script starts the replication. Confirm whether it runs continuously or as a one-off job in your version.
- Best fit: a mirror that must match the source closely at a known point, such as before a planned cutover.
- Limit to plan for: the gap between the last replication and a failure is the data you may need to recover from elsewhere.
Before relying on this method, confirm the exact behavior, options and any version constraints against the replication page for the version you run.
DICOM peers are configured destinations that an Orthanc instance can send to over the DICOM network protocol. Once a peer is defined, Orthanc can forward received studies to it, which makes peers a natural way to keep a second instance supplied with new content as it arrives. The trade-off is that forwarding is driven by the flow of incoming studies, so the mirror only holds what passed through the forwarding rule, and gaps from outages must be found and closed by your own checks.
- What it moves: instances sent to the peer, typically new or routed studies, depending on how forwarding is configured.
- Direction: from the sending instance to the peer, set per configured destination.
- Trigger: arrival of new data or a call to send studies to the peer. Confirm which events trigger forwarding in your version.
- Best fit: a mirror that must stay close to real time for newly received studies.
- Limit to plan for: failed sends during an outage need a retry and a reconciliation step, and the peer configuration and TLS settings must be reviewed as part of the design.
Confirm the forwarding triggers, retry behavior and TLS options for your version against the DICOM networking pages of the Orthanc Book before you rely on peers as the sole mirror mechanism.
The Transfers Accelerator is a separate Orthanc plugin for moving studies between sites faster than DICOM or plain peers. It supports push and pull modes and includes MD5 validation and atomic study transfers. It is covered on its own page, so this section only places it in the choice. Its value for disaster recovery is speed and integrity checking on long-distance or large moves, which matters when the mirror sits across a slow or high-latency link.
- What it moves: studies between Orthanc sites, with validation of transferred content.
- Direction: push from the source or pull from the target, depending on which mode your design uses.
- Trigger: a transfer request or job, set up by your team. Confirm how jobs are scheduled and retried in your version.
- Best fit: a mirror across sites where bulk transfer speed and per-study validation are the main constraints.
- Limit to plan for: the plugin is an additional component to install, license-check, secure and monitor, so the operating model grows with it.
Before choosing it, read the separate Transfers Accelerator page and confirm its modes, validation behavior and routing through load balancers against the version you run.
Configuration options and when each fits
This table compares the main choices a team makes when building a second Orthanc copy of an archive: what is replicated, which way data flows, how the copy stays in sync, and how each side stores its index and files. Read each row as a decision to settle before building, and use the confirm column to check the exact behavior in the replication documentation for your Orthanc version.
| Decision | Options and when each fits | What to confirm before building |
|---|---|---|
| Replication scope | Full archive suits a disaster recovery copy that must hold everything. Selected studies (by modality, site, or patient group) suit a partial copy for a branch or a research subset. | Whether your retention and privacy rules allow the full archive to exist in a second location. |
| Transfer direction | Push from the primary suits a site that controls the outbound link. Pull from the mirror suits a secondary site behind a firewall that only allows outbound connections. | Which side can open connections through your firewalls, and whether the DICOM or HTTP port must be reachable from the other side. |
| Ongoing peer forwarding | Ongoing forwarding fits a mirror that must stay close to current. Each new instance is sent to the peer as it arrives, so the mirror lags only as far as the link and queue allow. | How queued sends behave after a link outage, and how you will detect a backlog. |
| One-time replication | A one-time copy fits a migration or an initial seed before ongoing sync is switched on. It does not keep the mirror current on its own. | Whether the replication tool can resume an interrupted run and how it reports what was skipped. |
| Index engine on each side | The PostgreSQL plugin is the option the Orthanc docs recommend for large datasets. SQLite suits small archives, but the docs advise moving to an enterprise database engine at several hundred thousand instances. | That both sides run compatible plugin and schema versions for the release you deploy. |
| Storage backend on each side | Local disk is simplest for one site. S3, Azure and Google Cloud object storage suit a mirror in another region or cloud account, and their plugins are official Orthanc plugins. | Whether the chosen backend plugin version supports the replication path, and how file paths are mapped between the two stores. |
| Authentication for the peer link | Dedicated peer credentials suit a point-to-point link. DICOM TLS suits inter-site DICOM traffic, available from Orthanc 1.9.0 onward. | Certificate lifecycle, who rotates credentials, and which peer and user settings the mirror requires in its configuration file. |
How to build the mirror step by step
This sequence takes two Orthanc instances from separate installs to a verified mirror, where the second copy holds the same studies and can take over viewer and modality traffic. Each step ends with a check so the team knows it can move on.
Confirm matching Orthanc and plugin versions
The engineer responsible for the platform checks the Orthanc core version and the database plugin version on both the primary and the mirror, and records them in the change ticket. Both instances should run versions that the Orthanc Book documents as compatible for replication, and the team should confirm the exact pairing against the release notes for the installed version. Done means both servers report the same core and plugin versions and the record is signed off by the platform owner.
Secure the remote access path
Before any cross-instance traffic is allowed, the team turns on AuthenticationEnabled, defines the service account in RegisteredUsers on each instance, and places a reverse proxy with HTTPS in front of the REST API if access crosses a network boundary. Credentials for the replication account should be stored in the team's secrets manager, not in plain configuration files. Done means an unauthenticated request to the REST API is refused on both instances, and the service account can authenticate over HTTPS.
Configure the peer or replication link
The engineer adds the mirror as a peer on the primary, or the reverse depending on the replication design chosen, using the configuration keys listed for the installed version in the Orthanc Book replication page. If DICOM TLS is required between sites, it is configured at this step as well. Done means the peer appears in the peer list, a test call returns a successful response, and the connection is logged on both sides.
Run the initial replication
The team starts the first full copy of the archive from the primary to the mirror, ideally in a window when viewers and modalities are not writing heavily. Progress is watched through the Orthanc job queue and logs, and any failed jobs are retried or investigated before the run is closed. Done means the job queue is empty of errors and the mirror reports no pending transfers from the initial run.
Set ongoing synchronization
The engineer configures the mechanism that sends new and changed studies to the mirror after the initial copy, following the approach in the replication documentation for the installed version. Alerts are set on failed replication jobs so that a broken link does not go unnoticed for days. Done means a test study sent to the primary appears on the mirror without manual action, and the alert fires when the test link is deliberately interrupted in a controlled check.
Verify completeness with study and instance counts
The team compares study counts and instance counts between the primary and the mirror, using the REST API on each side and a sample of studies checked by accession number or patient identifier. Counts should match after synchronization has caught up, and any gap is traced to a specific job or transfer before sign-off. Done means the counts match, the sample checks pass, and the discrepancy log is empty or explained.
Test failover of viewers and modalities
The team repoints a test viewer and a test modality to the mirror in a controlled exercise, confirming that they can query, retrieve and display studies. The DNS or configuration changes needed for failover are written down and tested in both directions. Done means the test viewer and modality work against the mirror and the team has a documented, rehearsed failback procedure.
How primary and mirror Orthanc servers exchange content
The flow starts where modalities and viewers send studies and open images on the primary Orthanc, which keeps its index in its own database and its DICOM files in its own storage. A replication link, run under admin credentials, copies content to the mirror Orthanc, which has a separate database and storage. Before relying on the mirror, check that both sides hold the same studies and that the admin credentials and the link sit inside the trust boundary.
Primary and mirror Orthanc servers, the replication link and the failover path.
How to verify the mirror is complete before you trust it
A mirror is only useful for disaster recovery if you can show it holds what the primary holds, so verification comes before you rely on it. Start with counts. Compare the number of patients, studies, series and instances on the primary with the same counts on the mirror, using the REST API on each server (for example, the statistics and find endpoints) and record the results with a timestamp. Counts alone can hide gaps that cancel out, so repeat the comparison per modality, per source AE title and for a recent date window. Where you replicate by peer or transfer, check the logs for the replication jobs themselves. Confirm that failed transfers are retried and that each failure is recorded with enough detail to find the affected study later. A job that quietly stops is the most common way a mirror falls behind without anyone noticing, so alert on job failures and on the age of the newest instance received.
Counts do not prove the pixel data is intact. For a sample of studies, chosen at random and weighted toward recent and high-acuity cases, compare the stored files or the retrieved DICOM instances with checksums or with a pixel-level comparison of decoded images, and treat any mismatch as a stop condition. Then check the handling of changes on the primary. If recycling, deletion or patient protection is configured there (see the page on controlling disk usage), decide whether the mirror should follow those deletions or keep the data on purpose, and write that decision down. A mirror that keeps deleted studies can be a retention issue, while one that follows every deletion can lose the only copy of data someone still needs.
Finally, define the acceptable lag between the primary and the mirror with your clinical and operational owners. Replication is never instantaneous, and a mirror that silently lags is a risk because a failover may present an older archive without any warning to the people reading images. Set a maximum lag in writing, alert when it is exceeded, and rehearse a failover against that number. Confirm with your own team which version of Orthanc both servers run during replication, since the Orthanc Book replication page covers replication for both upgrades and mirrored servers and your procedure should match the version you actually operate.
Failing over viewers and modalities to the mirror
Keeping a mirror is only useful if clients can reach it when the primary fails. The four items below cover the modality configuration, the viewer and DICOMweb addressing, the transfers caught mid-switch, and the return to the primary, and each one depends on how your sites are wired.
Repointing modality AE configuration
Each modality, PACS or workstation stores a remote AE title, host and port for Orthanc. Plan a second entry for the mirror with its own AE title, and decide whether the switch is a manual change on every device or a pre-staged configuration that operators select. Confirm with the modality vendor how it handles a changed destination, whether it queues failed store requests and how long it retries before alerting. Test the switch with one device before changing a whole site.
Replication docsRepointing viewer and DICOMweb URLs
Viewers and DICOMweb clients usually hold a fixed base URL. You can change the address in a reverse proxy or DNS record so clients keep one name, or publish a separate mirror name that users switch to. DNS changes are limited by cached TTLs, so measure how long clients take to follow a change. Confirm that the viewer's authentication and token handling work against the mirror, because Orthanc's security settings must match on both sides.
Handling in-flight transfers during a switch
Studies that were partly stored or partly replicated when the primary failed may exist on one side only. Decide which instance is authoritative for each study, and have a rule for resending studies that a modality believes were delivered. Check whether the mirror already holds a study before a retry creates a duplicate. Confirm the behavior of your Orthanc version and any transfer plugin in a lab before relying on it in an incident.
Failing back and re-syncing the primary
When the primary returns, it holds an older state than the mirror, so it must not be put back in service as a writable source before it is reconciled. Plan a sync from the mirror to the primary, compare study counts and instance identifiers, and only then repoint clients. Keep the mirror serving until the comparison passes. Rehearse this sequence in a test environment, since the exact steps depend on your Orthanc versions and replication method.
Questions teams ask before building a mirror
What does it cost to build a mirrored Orthanc server?
The cost is set by the written scope, not by a list price, and DeployOpen does not publish one. The main drivers are the size of the archive, the number of sites that receive copies, the storage backend on each side, how much verification you want, and how many failover tests you need. Each of these changes the hours of engineering and the hardware or cloud capacity you pay for. Some costs are one-time, such as the initial build and first full sync. Others recur, such as the second server's storage, network links, monitoring and periodic failover tests. Ask any provider for a quote that separates build work, infrastructure you already pay for, and ongoing support, and that states what the verification and failover tests cover.
Can our internal team build an Orthanc mirror without a partner?
Yes, if your team has the skills to run the parts involved. The build touches Linux administration, Docker, PostgreSQL for the index, DICOM networking, certificate handling for DICOM TLS and HTTPS, and enough knowledge of Orthanc configuration to set up replication and peers. The Orthanc Book explains how to replicate the content of one instance to another to create mirrored DICOM servers, so the method is documented. The harder part is operational: proving the copy is complete, rehearsing failover of viewers and modalities, and keeping the setup patched through Orthanc upgrades. Assess those gaps honestly before deciding. An internal team with a clear owner, a test plan and time for rehearsals can build it. A partner is most useful when those skills or hours are missing.
How long does it take to build a mirrored Orthanc archive?
Duration depends on the work, not on a fixed template, so no build time is stated here. The biggest factors are the initial data volume that must reach the second server, the network path between sites, the number of modalities and viewers that need to fail over, and how many verification and failover rounds you run. Approvals and change windows often take longer than the engineering. Ask for a timeline in the written scope that lists the phases: design, build, initial replication, verification, failover testing and handover. Ask which phases depend on your change windows or on access you must grant, because those dependencies usually decide the calendar.
What do we need to provide for a mirror project?
Plan to provide access and decisions, not just servers. You will need archive access for testing, meaning a non-production sample or a supervised way to confirm that studies match. You need network paths between the primary and mirror sites, with firewall rules for DICOM and HTTP ports, and agreed DNS or routing for failover. You need change windows for cutovers and failover drills, and named owners who can approve them. Clinical and operational leaders must agree in writing how far the mirror may lag behind the primary and what happens to studies still in transit during a failover. Without that sign-off, the design cannot be finished.
Does a mirrored Orthanc server replace a backup?
No. A mirror keeps a second copy that follows the primary, so an error, deletion or corruption that replicates to the mirror is copied there too. Backups protect you against that case by keeping restorable points in time. Keep both. Back up the index and the DICOM files together, and test restores on a schedule. Mirroring helps with site loss and fast failover of viewing and modalities, while backups help with recovery from bad data or accidental changes. Your recovery plan should name which system holds the authoritative copy during each type of incident.
How does DeployOpen scope and price a mirror engagement?
DeployOpen works on most engagements as fixed scope. Before work starts, the scope, deliverables and timelines are agreed in writing, and a quote follows from that written scope. DeployOpen does not publish a price list. A typical scope would name the systems and sites in the design, the replication and peer setup, the verification method for completeness, the failover runbook and its rehearsals, and the handover documentation. Ongoing support, upgrades and retesting are available as retainers, and they are quoted separately. Ask for the written scope to list what is excluded, such as application changes to modalities or viewers, so the quote can be compared fairly with other options.
How DeployOpen scopes and delivers an Orthanc mirror
DeployOpen plans, builds, tests, documents and supports self-hosted open-source platforms inside your own infrastructure, including a second Orthanc copy of your archive. Each engagement starts from a written scope that sets out which instances, storage and sync paths are covered, so your team knows what it is getting before work begins.
How we scope
- Inventory the primary Orthanc instances, database back end, storage location and study volumes that the mirror must hold.
- Agree in writing which replication method, peers or transfers are in scope, and how the mirror will be kept in sync.
- Define the failover runbook scope, including which viewers and modalities must be repointed and who approves the switch.
How we build
- Install and configure the secondary Orthanc instance in your environment, matching the version and plugins used on the primary.
- Set up the replication or transfer job, then check that the mirror receives new studies and deletions as designed.
- Test completeness by comparing study and instance counts and sampling retrieved images on both sides before sign-off.
How we hand over
- Deliver configuration files, network and credential notes, and a record of every test run with its results.
- Provide a written failover and failback procedure that your operations staff can follow without the DeployOpen team present.
- Walk your administrators through monitoring, alerting and the steps for rerunning a completeness check after an incident.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, scoped separately from the initial build.
- Plan upgrades of the mirror alongside the primary so that both copies stay on compatible Orthanc versions.
- Schedule periodic failover drills and completeness checks, and confirm the results with your team after each one.

