Exporting zipped studies from Orthanc to S3

Pushing zipped DICOM study archives from Orthanc to S3 buckets for research sharing or offsite copies, with the project sample as a starting point and controls planned around it.

On this page

Why teams export zipped Orthanc studies to S3

A research group or operations team needs copies of Orthanc studies in a bucket they control, outside the Orthanc server itself. The export packages each study as a zip archive and pushes it to an S3 bucket, which gives the team a portable copy for research sharing, an offsite backup or a hand-off to another group. The orthanc-setup-samples repository includes a sample that exports zipped studies into an S3 bucket, and it is a starting point to adapt rather than a finished product. Its selection logic, credentials handling, error reporting and naming conventions will reflect the assumptions of its authors, so your team must review each one against its own data policy before running it on real patient studies.

The sample is easy to confuse with another Orthanc capability. Orthanc has official S3 object storage plugin support, which lets Orthanc keep its DICOM files in S3-compatible storage as its own storage area. That is a storage back end decision that changes where Orthanc writes every instance. Exporting zipped studies is different: Orthanc remains the system of record, and a separate copy leaves the server on a schedule or on demand. Decide early which of the two you need, because they have different failure modes, restore paths and access controls. Confirm with your Orthanc version and plugin documentation which S3 features are available in your deployment before designing around them.

Before adapting the sample, confirm three points with your data owners: which studies may leave the server, who may read the bucket, and how long copies are kept. Those answers drive the design of selection, encryption and deletion. If you plan to share archives with researchers, the export is usually paired with de-identification, which is covered elsewhere on this page. The sections that follow explain how to build the export, schedule it, protect the archives and verify that what landed in the bucket matches what was exported.

Which export path fits your situation

The orthanc-setup-samples repository includes a sample that exports zipped studies into an S3 bucket. It is the fastest way for a team to see the pattern working in its own environment, but it is a reference to adapt into a finished service, not a service that runs unattended in production.

  • Who builds it: Your team or a partner adapts the sample to your bucket layout, credentials and study selection. Orthanc's own configuration is not replaced by the sample.
  • What it moves: Zipped studies chosen by the script's logic and uploaded to the bucket it targets. Confirm which selection criteria the version you clone uses.
  • What it cannot guarantee: Scheduling, retries, failure alerts or a record of what was sent. A sample demonstrates the pattern and does not provide operations.
  • Security exposure: The Orthanc security FAQ warns that the export route can overwrite files and that the /tools/execute-script route can run system commands, so both should stay disabled while the script runs.

Before relying on the sample, check its Orthanc version compatibility and the S3 client library it uses against your Orthanc release, and test both on a non-production server.

How to set up a zipped study export to S3

This sequence takes a pinned Orthanc server from a reviewed version to a tested export job that writes zipped studies into an S3 bucket, with a check at each stage that confirms the object arrived intact. It gives your team a repeatable pattern before any study leaves the archive.

  1. Pin the Orthanc version and review its NEWS file

    Your engineer selects the exact Orthanc release the export will run on, records it in your change record, and reads the NEWS file for that release and any later releases you plan to adopt. Look for changes to storage-area access, transcoding, REST routes and plugin compatibility, since those are the areas an export script touches. Confirm the chosen version against the release list on the Orthanc download page before installing. The step is done when the version number, the NEWS entries you reviewed and the reviewer's name are recorded together in your change record.

  2. Obtain the sample from the repository

    Clone the orthanc-setup-samples repository and locate the sample that exports zipped studies into an S3 bucket. Read the sample's configuration keys, the endpoint and bucket settings it expects, and how it triggers the export, then compare them with the Orthanc version you pinned. Copy the sample into your own version-controlled repository instead of editing the upstream copy, so changes stay reviewable. The step is done when the sample runs unmodified against a non-production Orthanc instance and the commit hash of the copy you are using is recorded.

  3. Define which studies the export selects

    Write down the selection rule in plain terms, for example which modalities, date ranges, labels or patient groups go to the bucket, and who approves that rule. Translate it into the query the export uses, then run that query against a copy of the archive to confirm it returns the studies you expect and nothing else. Pay particular attention to studies that contain identifiers you do not intend to share, because a selection error becomes a data exposure in the bucket. The step is done when the approved rule, the query, and a list of matched study identifiers reviewed by a second person are stored together.

  4. Configure bucket credentials with least privilege

    Create a dedicated service identity for the export with permission to write objects to the target bucket or prefix and nothing else. Do not grant list, delete or bucket-administration rights unless a documented task needs them, and keep credentials in your secrets store rather than in the Orthanc configuration file. If you use a self-hosted S3-compatible store, confirm which access policy model it supports and which encryption options are enabled on the bucket before the first write. Ask your storage team to confirm the server-side encryption setting in writing. The step is done when a test write succeeds with the export identity and a test delete from the same identity is refused.

  5. Run a test export on a copy

    Run the export against a copy of the archive pointed at a test bucket, not the production target. Keep the Orthanc REST export route and script-execution routes disabled as the Orthanc security guidance recommends, and trigger the export through the sample's supported mechanism. Record the run time, the number of studies sent, and any errors in the log. Then open the bucket listing and confirm that each expected zip object exists under the naming scheme you chose. The step is done when a complete test run produces the expected object count and no unexplained errors in the log.

  6. Verify each exported object arrived intact

    For each zip object, compare a checksum calculated on the source side with a checksum read back from the bucket, and confirm the object size matches. Then extract a sample of archives and confirm that the DICOM files inside open and contain the expected number of instances. Store the checksum manifest alongside the export so a later audit can recheck the same objects. Treat any mismatch as a failed run and do not release the output until the cause is known. The step is done when every object in the test run has a matching checksum, size and instance count recorded in the manifest.

  7. Confirm scheduling, naming and recovery before production

    Ask your platform team to confirm the scheduler that will run the export, the object naming convention that includes study identifiers and export date, and how a failed run is retried without duplicating or overwriting objects. Check that re-running the job on the same selection produces identical object names and checksums. Document who receives failure alerts and how a partial export is cleaned up. The step is done when a deliberately interrupted test run recovers cleanly on retry and the runbook, naming rule and alert recipients are approved by the data owner.

Designing object naming and export schedules

The object key is the first place identifiers leak. An export key built from a patient name, medical record number or accession number carries that value into every listing, access log and bucket inventory, even when the ZIP contents were anonymized. Choose a key scheme that the anonymization step does not have to fight: a random or study-level pseudonym, a date bucket for retrieval, and no patient-derived strings. If researchers need to link a study back to a source case, keep the mapping table inside the hospital network, not in the bucket. Ask the anonymization owner which tags are replaced with consistent pseudonyms, and confirm that the key is generated from the post-anonymization values, not the original ones, before any file is written.

Cron-driven runs are simpler to audit, while event-driven exports react sooner. A scheduled job that selects studies by a stored time window is easy to review, rerun and explain to an ethics committee, and it makes the export set reproducible. An event-driven approach, triggered by Orthanc's stable-study events, reduces lag but needs a rule for when a study counts as complete. In both cases, avoid exporting studies that are still arriving or being edited. Orthanc's stable-study concept, based on a configurable quiet period after the last instance arrives, is the signal to test against your modality and forwarding patterns. Confirm the exact setting names in the Orthanc version you run, and select only studies older than that window, so a late-arriving series does not produce a partial archive.

How an export moves studies from Orthanc to a bucket

The export starts with a scheduler that triggers the export script, which asks Orthanc's REST API for the studies to send. Each study is packaged into a zip archive, passed through an optional anonymization step, encrypted, and uploaded across the trust boundary into the external S3 bucket. A verification step then compares checksums or object counts against what Orthanc holds, so a failed or partial upload is caught before anyone relies on the copy.

Export flow from Orthanc to an external S3 bucket, with the trust boundary around the Orthanc network.

Security controls for exported patient data

Exports move patient images out of Orthanc and into a bucket that someone else may read, copy or restore. The controls below cover the Orthanc side, the bucket side and the people and hosts in between, so that each export stays limited to what the release was meant to contain. Check each one before the first scheduled run, not after the first complaint.

Keep the export route disabled

The Orthanc security FAQ warns that the export route can overwrite files, so it should stay disabled on any server that holds patient images. The S3 sample runs its export through the REST API and job logic that you control, so the route does not need to be open for the script to work. Check the Orthanc configuration on every instance, including staging copies, and confirm the route returns an error from outside the scheduler host.

Orthanc security FAQ

Scope credentials to one prefix

Give the export script an access key that can write only to a single bucket prefix, such as one prefix per release or per project. Deny listing and deleting across the whole bucket, and keep the Orthanc service account separate from the script's storage credentials. Rotate the keys on a schedule you can name, and test that a write outside the prefix fails before the first real export.

Encrypt at rest and in transit

Require TLS for every connection between the scheduler, Orthanc and the bucket endpoint, and reject plain HTTP in the bucket policy. Confirm with your storage vendor how server-side encryption keys are created, stored and rotated, and who holds them. Ask whether the archive is encrypted before upload, since a zipped study that is only protected by bucket settings is still readable by anyone with a valid key.

De-identify before release

A zipped study copied for research should pass through a de-identification step before it reaches the bucket, not after. Use the anonymization and pixel masking workflows in this group, and check the result on sample studies, including burned-in text that tag removal does not touch. Keep the mapping of replacement identifiers in a separate, restricted store, so a shared archive cannot be linked back to patients.

Log access to the bucket

Turn on server access logging or the equivalent audit trail for the bucket, and send the logs to a store the export team cannot edit. Review who read, listed or deleted objects, and alert on reads from unexpected networks. Logs answer the questions auditors ask about a release, so confirm retention periods with your compliance team before enabling them.

Protect the scheduler host

The host that runs the export schedule holds the storage keys and can reach Orthanc, which makes it a high-value target. Limit its inbound access to administrators, patch it on your normal cycle, and store its credentials in a secrets manager rather than in the script or cron file. Remove the host from general user networks, and record who can log in to it.

Configuration options and when each fits

This table compares the main choices when exporting zipped studies from Orthanc to S3: archive format, scope, object naming, encryption and schedule. Read each row for the condition that favors an option and the trade-off you accept. Most of the decisions interact, so settle naming and encryption before the first bucket fills.

OptionWhen it fitsTrade-off to weigh
Compressed zip archiveOffsite copies and transfers where bucket storage cost and transfer volume matter more than export speedExport takes CPU time, and you must confirm the compressed output still opens with your research or restore tools
Uncompressed archiveShort-lived internal handoffs where the receiving pipeline reads DICOM files directly and speed matters moreLarger objects and higher storage and transfer volume in the bucket
Full study exportRestore-oriented copies where the receiver needs every series to rebuild the studyLargest objects per export and more data to move on each run
Selected series exportResearch sharing where only certain modalities or series are approved for releaseNeeds a reliable selection rule, and a mistake can leave out data the recipient expects
Study-based object key namingPredictable lookup by study identifier when each archive maps to one studyIdentifiers may need de-identification first if keys are shared outside your organization
Date and batch key namingScheduled runs where you want to see what each run produced and trace it to a time windowTwo runs can produce the same study under different keys, so duplicate handling must be designed
Server-side encryptionBuckets managed by your cloud or storage team where the provider's key management meets your policyWhoever can read the bucket and the key service can decrypt, so access control carries the protection
Client-side encryption before uploadShared or third-party buckets where the storage operator should not hold readable copiesKey distribution, rotation and recovery become your responsibility, and loss of the key loses the archive
Scheduled exports on a fixed cadenceRoutine offsite copies where a known recovery point matters more than immediacyFailed runs must be detected and retried, or gaps go unnoticed until someone needs the archive
Event-driven or on-demand exportsResearch requests that arrive one at a time and need release on approvalEach request needs a documented approval step, and the process can become manual if volume grows

Limits to confirm before you rely on exports

An export job that finishes and uploads files can still leave you with an unusable copy. The cards below cover the sample's fit with your Orthanc version, the maintenance status of the MinIO tooling many teams pair with it, and the gap between a completed upload and a restorable archive.

Sample compatibility with your Orthanc version

The S3 export sample lives in the orthanc-setup-samples repository, and it was written against a particular Orthanc release and plugin set. Before you build on it, confirm which Orthanc version it targets, whether the REST routes and job options it calls still exist in the version you run, and whether your Orthanc release notes list changes to storage access that affect archive generation. Pin the Orthanc version in your test environment and re-run the sample after every upgrade.

Sample repository

MinIO repositories are archived

The minio/minio, minio/operator and minio/mc repositories are archived and read-only, and the minio/minio README says the project is no longer maintained. The last tagged community release is RELEASE.2025-10-15T17-29-55Z, published October 16, 2025. Community builds are distributed as source code only, so you would compile and patch them yourself. Treat any MinIO-based target as a system you must maintain, and check the README alternatives before you commit.

Last tagged release
Oct 16, 2025
MinIO README

AGPLv3 obligations for the server

The MinIO community server is released under the GNU AGPL v3.0, and its README says commercial or proprietary use must be checked against those obligations. Ask your legal or compliance team whether running, modifying or offering the server to internal or external users triggers source disclosure duties. Commercial licensing is available only through the vendor's AIStor editions, so get the licensing position in writing before you choose the endpoint.

Long-term support for the S3 endpoint

Your S3 endpoint is the system that will hold copies for years, so its support model matters as much as its API compatibility. The MinIO README says community support is best effort through GitHub and Slack, and SLA-backed support is offered only through AIStor. Ask any object storage vendor or operator for its support window, security patch policy, upgrade path and exit plan, and confirm that the endpoint you pick will still accept your bucket layout and credentials after its next major release.

Upload success is not archive completeness

A zero exit code and a matching object count do not prove that every study arrived intact. Confirm that each zip contains all instances you intended to export, that file sizes and checksums match what was written, and that a failed or partial upload is detected and retried rather than silently skipped. Record the expected instance count per study alongside each object so a later audit can compare the two.

Test restore before trusting exports

An export is only useful if someone can open it. Restore a sample of archives into a separate Orthanc instance on a schedule, confirm that the DICOM files parse, that patient, study and series identifiers match the source, and that the images display in your viewer. Repeat the test after each Orthanc or endpoint upgrade, and document who runs it and how often.

Choosing the S3 endpoint when MinIO is archived

The MinIO community repositories are no longer a safe default for a new export target. The minio/minio README says the repository is no longer maintained and points to AIStor Free, a standalone edition under a free license, and AIStor Enterprise, a distributed edition with commercial support. The minio/minio, minio/operator and minio/mc repositories are archived and read-only, and the last tagged community release is RELEASE.2025-10-15T17-29-55Z. The community server is AGPLv3, and the README says community support is best effort through GitHub and Slack, with SLA-backed support only through AIStor. Before you pick MinIO, ask MinIO in writing which edition you would run, who patches it and what their AGPLv3 obligations mean for your deployment, and read the minio/minio README for the current position.

Three endpoint options remain. A managed cloud bucket moves patching, durability and availability to the cloud provider, but recurring storage, request and egress charges depend on how often you pull archives for research sharing. Ceph, or another S3-compatible store, fits sites that already run storage they control, but someone must own its upgrades, failure domains and backups. A MinIO-based setup is viable only if you buy AIStor support or accept best-effort community support and carry the maintenance yourself. Whichever you choose, confirm which S3 API operations the Orthanc S3 plugin and the sample in the orthanc-setup-samples repository need, including multipart upload, object lock and server-side encryption, and test each against the endpoint before go-live.

Ask each vendor for the same written answers: supported S3 features, certificate and TLS requirements, encryption key ownership, retention and deletion behavior, the upgrade and end-of-life policy, and the support tier and response commitments. For a managed bucket, quote the storage class, request and egress costs for your expected retrieval pattern. For Ceph or MinIO, price the people who will run the cluster as a recurring cost, along with any AIStor subscription. Record the answers in the design record so the choice can be reviewed when a platform or license changes.

Questions teams ask before exporting Orthanc studies to S3

How much effort does an Orthanc to S3 export build take, and what drives it?

The effort depends mostly on how many export paths you need, not on the S3 call itself. The orthanc-setup-samples repository includes a sample that exports zipped studies into an S3 bucket, so the starting point exists, but a production build still has to decide which studies qualify, how archives are named, when jobs run, how failures are retried and how credentials are stored. Each additional destination bucket, research recipient or de-identification step adds design and testing work. DeployOpen plans and quotes this work from a written scope, so the cost follows from the agreed list of exports, environments and deliverables rather than from a standard price.

Can an internal team build Orthanc S3 exports without outside help?

Yes, a team with Orthanc administration and scripting experience can build this in-house, starting from the sample in the orthanc-setup-samples repository. The skills that matter are Orthanc REST API use, handling of asynchronous jobs, S3 access control and a clear picture of what the exports contain. The harder part is usually governance: confirming which data may leave the hospital or research environment, who approves it and how the decision is recorded. Teams that lack spare capacity for testing, security review and ongoing upkeep often choose a fixed-scope engagement for the build and keep operations in-house.

What does the export project need from our team before work starts?

Before work starts, you need three things in writing. First, read access to the Orthanc instance and a test environment that matches production, with the REST API enabled only for the accounts that need it. Second, a named bucket owner who can create buckets, set policies and approve access keys in the storage platform you use. Third, sign-off from data governance or the privacy office on which studies may be exported, whether they must be de-identified first and where the archives may be stored. Those decisions shape the design more than the code does, so collecting them early avoids rework.

How long does an Orthanc S3 export project take, depending on scope?

Duration follows scope. A single scheduled export of one study type to one bucket is a smaller job than a build with several destinations, approval gates, encryption requirements and a verification report. The project plan should separate design, build, testing in a copy of your data, cutover and handover, and each phase depends on the approvals listed above arriving on time. No duration is fixed in advance. DeployOpen agrees timelines in the written scope, so ask for a phased plan that shows which deliverables are tied to which approvals.

How do we verify that exported zip archives are complete and correct?

Verification should compare what Orthanc holds with what reached the bucket. For each export, record the study identifiers, the number of instances and the archive size at creation, then check the uploaded object's size and checksum and confirm that the archive opens and contains the expected DICOM files. Keep a manifest per run so a missing or truncated archive is detected rather than assumed. Test restores from the bucket into a separate Orthanc instance on a sample of studies. Also confirm that the export route is handled safely, since the Orthanc security FAQ warns that the export route can overwrite files and should stay disabled.

What recurs after go-live, such as credential rotation and version upgrades?

Several items recur after go-live. Access keys for the bucket need scheduled rotation, and any key stored in configuration or a script needs a documented owner. Orthanc itself is released on a regular cycle, with 1.13.0 following 1.12.11 on 2026-04-14, so the export script and the S3 plugin should be retested against each planned upgrade. Storage costs grow with each archive, so retention rules and lifecycle policies need periodic review. Finally, the object storage product itself needs a support decision: the MinIO community repositories are archived and the community server is distributed as source only, so confirm your support and licensing path before choosing it.

Is MinIO a safe choice as the S3 target for these exports?

It depends on your support and licensing requirements, so check them before you commit. The minio/minio, minio/operator and minio/mc repositories are archived and read-only, and the README says the community repository is no longer maintained. The community server is under AGPLv3, and the README says commercial or proprietary use must be validated against those obligations. The README also says support for the community software is best effort through GitHub and Slack, with SLA-backed support only through its commercial edition, AIStor. Ask whether your organization accepts that support model, and compare it with other S3-compatible options such as Ceph.

How should exported archives be encrypted and named in the bucket?

Encrypt archives in transit with HTTPS to the bucket and at rest using the storage platform's server-side encryption or encryption applied before upload, and confirm which key holds the data. Naming should carry enough detail to locate a study without exposing patient identifiers, for example a date, a project code and a random study reference, with the mapping kept in a controlled system. Avoid putting patient names or accession numbers in object keys, because bucket listings and logs often reach more people than the archive itself. Agree these rules with your governance team before the first export runs.

How DeployOpen scopes and delivers S3 exports for Orthanc

DeployOpen plans, builds and documents zipped study exports from Orthanc to S3 buckets inside your own infrastructure, so your team can review the export path before any data leaves the archive. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.

How we scope

  • Confirm which studies, filters and export triggers the written scope covers, such as research cohorts or offsite copies
  • Record the target S3 endpoint, buckets, lifecycle rules and whether the storage is self-hosted or cloud-hosted
  • Agree how encryption keys, bucket credentials and object naming conventions are owned and documented

How we build

  • Adapt the orthanc-setup-samples S3 export sample to your Orthanc version, bucket layout and credential handling
  • Configure scheduling, retries and failure alerts so a missed export is visible to operators rather than silent
  • Test exports against a copy of your data, including zip integrity, object naming and access permissions

How we hand over

  • Deliver the configuration, scripts and runbook needed to rebuild the export job in your environment
  • Document how to verify an export by comparing object counts, checksums and sample study contents with the source
  • Walk your engineers through restore and re-export steps, and record the decisions made during the build

How we support

  • Offer ongoing support, upgrades and continuous testing as retainers when your export job needs to follow Orthanc and storage changes
  • Review export logs and failures on a recurring basis if your team agrees that scope in writing
  • Re-test the export path after Orthanc, plugin or S3-compatible storage upgrades before your team relies on the new version

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.