Read-only public access to Orthanc for a demo or teaching archive
A team that wants outside users to browse sample studies in Orthanc without uploading, editing or deleting anything needs a public view that cannot change the archive. The Orthanc Book describes a demo server behind nginx with an admin user, a public user and a Lua script that grants only read-only access to external users. The admin account keeps full control on the server, while the public account reaches the browser through the proxy, and the script limits that account to read requests. This pattern fits a demo or teaching archive that holds non-clinical data, such as public sample datasets, synthetic images or course material used in training sessions. Confirm with your own tests that the script blocks every write route your installed Orthanc version exposes, since the filter is only as complete as the routes it checks. The setup is documented in the Orthanc Book's nginx FAQ.
The pattern is not a substitute for a production access design. A proxy script decides which requests reach Orthanc, but it does not give you per-study permissions, a record of who viewed which study, or separate roles for clinical staff, researchers and students. Those controls need their own design, and a shared public account will not supply them. Any archive that holds identifiable patient images, including a training copy made from clinical cases, should be governed by the production controls your compliance team requires, and the demo configuration should not be copied into it. Before you publish, confirm in writing who owns the demo data and that it contains no patient identifiers.
Test the setup as an outside user would before anyone else sees it. Load a test study, then try every upload, delete, modify and script route from the public account and confirm that each one returns an error. Keep the script execution route and the export route disabled, because the Orthanc Security FAQ warns that the first can run system commands and the second can overwrite files. Browse with each viewer your audience will use, since some query operations may be sent as POST requests and an overly strict rule can break browsing. Finally, plan how you will remove a study that was loaded by mistake, and recheck the public account's access after each Orthanc upgrade, because route behavior can change between releases.
Which access pattern fits a public Orthanc archive
This table compares four ways to publish an Orthanc archive for browsing without edits. Read each row for the pattern's best fit, what it leaves reachable and how much ongoing work it adds. The main takeaway is that RegisteredUsers alone gives every login full read-write access, so a read-only layer in front of Orthanc is what limits what visitors can change.
| Pattern | When it fits | What stays exposed | Upkeep it adds |
|---|---|---|---|
| RegisteredUsers only | A closed lab or intranet where every login is a trusted staff member | Full read-write access for every user unless a layer in front limits them | Low setup, but it cannot tell public visitors apart from editors on its own |
| nginx and Lua read-only filter | A demo or teaching archive that public users browse without changing content | Only the routes and methods the filter allows, plus any admin path nginx forwards by mistake | Medium: Lua rules and proxy config need review after each Orthanc upgrade or route change |
| Advanced authorization plugin with an external service | Per-study or per-user rules that a service you run can decide | Only what the external service approves on each REST request, with denied requests returning HTTP 403 | High: you build, host and test the decision service and its token handling |
| Separate public instance with copied sample data | Teaching or demo content kept apart from clinical archives | Only the copied dataset and the public server's own hardening gaps | Medium: a second server to patch and back up, refreshed from a copy checked for patient identifiers |
How the Lua filter decides which requests reach Orthanc
The Lua filter sits in nginx between visitors and Orthanc, and every request passes through it before Orthanc sees it. Its job is to forward read requests from the public user, such as loading the viewer and browsing studies, while keeping administrative access on a separate path that visitors cannot reach. The exact rules come from the Orthanc Book nginx example, which describes a demo server with an admin user, a public user and a Lua script that grants only read-only access to external users. Use that example as the starting point, then check every rule against your Orthanc version before the archive goes public.
A read-only filter has to cover more than GET requests. Walk through every Orthanc REST route that can change data and confirm the filter refuses it for the public user, including routes that accept POST. Uploads, deletions and modifications all change the archive, and some of these routes are POST requests, so a rule that only inspects the HTTP method is not enough on its own. Two route families need explicit denial. The Orthanc Security FAQ warns that /tools/execute-script can let a malicious user run any system command, and that the export route can overwrite files, so both should stay disabled. Keep them disabled in Orthanc and block them in nginx as well, so one misconfiguration does not expose them.
Before go-live, turn the rules into a test matrix with one row per route, HTTP method and expected result for the public user, and run it against the deployed stack, so the results reflect the live proxy and the live Orthanc version. Include the admin path, to confirm administrators keep full access, and requests with no credentials or a malformed header, to confirm the filter refuses them. Retest after every Orthanc upgrade. The Orthanc NEWS file records that the 1.13.0 release, dated 2026-08-15, rewrote storage-area access and DICOM parsing, so any rule that touches storage or file reads should be checked again. Ask the team responsible to confirm which Orthanc version the rules were written for and who signs off on changes to the filter.
Reads reach Orthanc only after the Lua filter approves them
The diagram starts with a visitor or an admin sending HTTPS requests from the public network. nginx sits at the edge of the Orthanc host, and HTTPS ends there, so the Lua filter receives the request inside the host. The filter passes read requests to the Orthanc REST API, which serves them from its storage and index, and it refuses write requests from public users. Check that the host boundary is the only route in, that Orthanc does not listen on a public address, and confirm in your own configuration where the certificate is installed before you rely on this layout.
Requests from visitors and admins pass nginx and the Lua filter before reaching Orthanc.
Setting up read-only public access to Orthanc behind nginx
This sequence builds a demo archive that anyone can browse and no one can change. Orthanc keeps its own authenticated users, nginx terminates HTTPS, and a Lua filter lets only read requests reach Orthanc from the public account. Each step closes with a check you can rerun after changes.
Install Orthanc in a non-production environment
The team installs Orthanc on a test host or container that holds no patient data, using a package or Docker image suited to your platform. Keep the default configuration for now, so the server answers only on localhost. Load a few sample studies that you can delete and restore freely, because later steps send write requests against them. Done means you can open the local REST API on the server and see the sample studies listed. Confirm the installation method and image tag against the current Orthanc download page before you start.
Enable remote access with authentication
Set RemoteAccessAllowed to true, set AuthenticationEnabled to true, and define an admin account and a public account under RegisteredUsers. Give the public account a long, unique password and keep the admin credentials out of the demo configuration file. Orthanc gives every registered user full read-write access, so the public account can still write at this stage, which is why the later filter matters. Done means a request without credentials receives an authentication challenge, and the public account logs in with its own password. Confirm the key names and defaults for your version in the Orthanc Book security FAQ before editing the file.
Keep script and export routes disabled
Leave the script execution route and the export route turned off for every user, including the admin account. The Orthanc security guidance warns that the script route can let a malicious user run arbitrary system commands and that the export route can overwrite files, so neither should be reachable on a host exposed to the public. Confirm in your version's configuration that both stay disabled, then send a request to each route as the public user. Done means both requests are refused. If either route succeeds, stop and correct the configuration before continuing.
Place nginx in front with HTTPS
Install an nginx build that includes the Lua module, which some distributions ship as a separate package, and confirm the module appears in the build details before you rely on it. Configure nginx to terminate HTTPS with a certificate for the demo hostname and to proxy requests to Orthanc on localhost. Block direct access to Orthanc's port from other hosts so that every request passes through nginx. Done means an HTTPS request to Orthanc Explorer succeeds through nginx, and a direct request to the Orthanc port from another machine fails. Follow the Orthanc Book guidance on running behind nginx for the proxy settings.
Add the read-only Lua filter
Add a Lua script to the nginx request path that inspects each request before it reaches Orthanc. The filter identifies the public account, allows read methods and read-only endpoints, and refuses any request that would create, change or delete data. Before you block POST, confirm which read operations in your Orthanc version use POST, such as query endpoints, and allow those explicitly, because blocking them breaks the viewer. Test the change on a copy of the configuration first. Done means nginx reloads without configuration errors and the filter file is loaded.
Test each route as the public user
Run a set of requests as the public user against every route the demo exposes, and record the status code for each. Read requests, such as listing studies, opening series and loading the viewer, should succeed. Write attempts, including uploading an instance, deleting a study, changing metadata and calling the script route, should be refused by nginx or by Orthanc. Run the same write attempts as the admin account against the test copy to confirm the tests can detect a successful write. Done means every read succeeds, every write is refused, and the results are saved with the configuration.
Rerun the tests after every change
Rerun the full request set after each Orthanc upgrade, nginx change, or edit to the Lua script or RegisteredUsers. Compare the new status codes with the saved results. A write that starts succeeding means the deployment has failed, so roll back and fix the filter before the demo is opened again. Check the release notes for your Orthanc version to see whether authentication or REST behavior changed. Done means the new run matches the saved results, or every difference has been explained and recorded.
Security checks before a public archive goes live
Each card below is a check to run before the public hostname opens. Each pairs a risk with a test and the setting that closes it. The checks depend on one another: a read-only filter is only as strong as the routes it covers, and logs only help if they record the requests that the filter passed or refused.
Write routes a method filter misses
A Lua filter that checks only the HTTP method can pass requests that change data, because some write paths are reached through other verbs or through override headers that the filter never reads. Send every write-capable verb to the public hostname, along with any method override header your proxy might honor, and expect a refusal each time. Check the path as well as the verb against the REST routes you intend to expose. Confirm that the nginx location blocks forwarding to Orthanc all run through the same filter.
Orthanc nginx FAQScript and export routes left enabled
The Orthanc security FAQ warns that the script execution route can let a malicious user run any system command, and that the export route can overwrite files. Both should stay disabled on a public archive, and the proxy should refuse them even if Orthanc were misconfigured. Test by requesting each route through the public hostname with a read-only session and confirming the response is a refusal. Then confirm in the Orthanc configuration that script execution is turned off, and record both results in the go-live checklist.
Orthanc security FAQOrthanc reachable on its own port
If the Orthanc HTTP port accepts connections from the network, a visitor can skip nginx and its Lua filter entirely. From a host outside your internal network, connect directly to that port and confirm the connection fails. Confirm that the firewall or security group allows only the nginx host to reach Orthanc. By default Orthanc accepts HTTP only from localhost, so check that this has not been changed. If remote access is enabled, authentication must also be on with users defined in the configuration.
Shared admin and public credentials
The public account and the admin account must be separate users with different passwords, and the public account must have no permission to write. If the proxy must hold a credential to reach Orthanc, that credential should belong to the public user only. Test this by logging in as the public user through nginx and attempting an upload and a delete, and confirm both are refused. Then search the nginx configuration, container environment files and deployment scripts for the admin password to confirm it does not appear.
DICOM ports closed to the internet
The DICOM listener is a separate service from the web interface, and it accepts storage and query requests from any device that knows its application entity title and network address. The DICOM port should not be published on the public address at all. Run an external port scan from outside your network, with written permission, and confirm the DICOM port is closed. Confirm the list of known modalities contains only your own devices. Orthanc supports DICOM TLS from version 1.9.0, so use it for any peer exchange that crosses a network boundary.
Orthanc security FAQLogs that show public access
A public archive is only as reviewable as its logs. The nginx access log should record each request, its status code and the authenticated user, so public visitors can be separated from admin sessions. Orthanc's own log should show the requests it processes. Test by making a few public requests, including one refused write, and then finding each request in both logs. Confirm the refused write appears with a refusal status, and confirm the log location and retention match your operating policy.
Who uses the public archive and what each group can do
Anonymous visitors open the archive's public address without signing in. The nginx proxy forwards their requests to Orthanc only after a Lua filter has checked the HTTP method and path, so this group reaches the public user's read path and nothing else. The studies they see are whatever the demo owner has loaded and published, so publishing decisions are made before the proxy is involved. The Orthanc nginx FAQ describes the reference pattern of an admin user and a public user behind a read-only Lua script.
- Read: Browse the study list, open series and view images through the viewer or the REST read calls that the proxy allows.
- Cannot change: Uploads, deletions, edits, anonymization and any other method that writes to the archive are refused at the proxy.
- Cannot run or export: Routes such as
/tools/execute-scriptand the export route stay disabled, because the Orthanc security FAQ warns that they can run system commands or overwrite files. - Cannot see credentials: The admin account, the Orthanc configuration file and the filter's internal logic are never served to this group.
- Access removal: There is no account to revoke. The end of a demo means taking the public address offline or unpublishing its studies.
Confirm that a write request sent without credentials through the public address is refused, and that the admin routes cannot be reached from the public network.
Instructors and workshop leaders need a known account so that their sessions can be identified in proxy logs and in Orthanc's own user list. Their account gives them the published studies that anonymous visitors see, plus any teaching sets the operator has loaded for the course. A named account does not make an instructor an administrator, and it should never be used to bypass the write filter for convenience. Confirm how your Orthanc version treats registered users, because a registered user can carry write rights unless the proxy or an authorization layer limits them.
- Read: View the studies assigned to the course, usually the same published set as anonymous visitors plus any course-specific sets.
- Cannot change: Instructors do not upload, edit, delete or anonymize studies through the public path, even when a class asks for it. Changes go through an operator.
- Individual accounts: Each instructor has a separate account, so the logs show who opened which study during a session.
- Credential handling: Operators set passwords and deliver them out of band. Passwords never appear in the Lua script, the nginx configuration or a shared handout.
- Access removal: At course end, the operator removes each entry from the registered user list, reloads or restarts Orthanc as your version requires, and rotates any shared secret.
After removal, confirm that a sign-in attempt with an expired account fails at both the proxy and Orthanc, and keep the session logs with the course record.
Operators hold the admin credentials and are the only group that can change stored studies, configuration, plugin settings and logs. Their access is broad, so the design keeps admin traffic on a network path that the public proxy does not route to. Operators should use admin access to publish and unpublish content, and they should test the public path with an anonymous client, because a test run with admin rights shows what an operator can do, not what a visitor can do.
- Read and write: Full access to every study, the Orthanc configuration, plugin settings and server logs.
- Admin path: Admin requests reach Orthanc over a private network path, and the public address refuses admin routes.
- Credential custody: The admin password stays out of the Lua script, any nginx file that a client can fetch, source repositories and course handouts.
- Configuration controls: Keep the script execution and export routes disabled, keep authentication enabled, and review every change to the proxy filter before it goes live.
- Access removal: At the end of a course or demo, rotate the admin password, remove instructor accounts, take the public address offline or unpublish studies, and record each change.
After each change, confirm that an anonymous client still receives refusals for write methods, and that no file the public can fetch contains admin credentials.
What to confirm in your environment before publishing
Confirm the technical limits before the archive is reachable from outside. First, check that the nginx binary you run includes the Lua module the filter depends on. Build flags differ between distribution packages, Docker images and self-compiled builds, so run nginx -V on the actual host and in the container image, and confirm that the module is loaded in the running configuration. Second, compare the filter's route and method rules with the REST routes of the Orthanc version you run. The Orthanc Book example is written against the routes it describes, so list every endpoint your viewer calls, confirm each one is allowed for public users, and confirm that write methods, the /tools/execute-script route and the export route are denied. Each of these checks is yours to run, because the example does not verify them for your deployment.
Retest the filter after every upgrade. Orthanc 1.13.0, released on 2026-08-15, included a complete rewrite of storage-area access and DICOM parsing and transcoding, which changes how stored files are read and served to users. A filter that behaved correctly on 1.12.11 can therefore behave differently on 1.13.0 even when its route list still looks right. Read the Orthanc NEWS file for each release you plan to take, and rerun a scripted check of anonymous access after every change to Orthanc, the nginx build, the Lua script or the viewer. Keep the results with the change record so that the next person can see which version was verified and what passed.
Settle the data and the regulatory position before publishing. Start by listing what is in the archive. Patient identifiers in DICOM headers, free-text fields, burned-in text in pixel data and private tags can all identify a patient even when the study is hidden from search. Public teaching cases should be anonymized and checked by someone who knows the source data, and the archive should hold nothing the institution could not show to the public. Your compliance lead must confirm whether any regulation applies to the images and to the access logs, such as HIPAA or GDPR, and which jurisdiction governs the host. Treat the Orthanc Book example as a starting point only, and confirm each control yourself, including that unauthenticated requests cannot reach admin routes and that admin credentials never pass through the proxy.
Questions teams ask before publishing read-only public access to Orthanc
What drives the cost of a read-only public Orthanc demo?
The cost follows the scope of the work, and nginx configuration is only one part of it. The main drivers are the number of user roles you define, how many request types the Lua filter must handle, which viewer and Orthanc Explorer features the demo exposes, and how much testing you need to prove that every write path is blocked. Expect one-time work to design, build and test the proxy and filter, and recurring work to patch Orthanc, nginx and the filter and to rerun tests after each upgrade. Ask for a quote that lists each deliverable, the test cases used to prove read-only behavior, and the upgrade terms. Orthanc Team sells deployment and configuration services and pre-paid dedicated support hours valid for 12 months, quoted on request, so request that option alongside your own quote.
How long does a read-only Orthanc demo take to publish?
This pattern does not come with a fixed duration, so ask for a timeline built from a written scope. The main factors are the number of roles and test cases, whether the Orthanc host, domain name and TLS certificate already exist, whether the Lua filter needs changes for the viewers you publish, and how long your change approval and security review take. Confirm the Orthanc version first. Orthanc 1.13.0 was released on 2026-08-15, and a new release can change how storage-area access and parsing behave, so the filter should be tested against the exact version you deploy. Ask the provider to split the timeline into design, build, test and go-live, with the dependencies on your side named for each phase.
What does our internal team need to provide for this work?
Your team provides the decisions, access and people that the build depends on. Expect to supply:
- A named owner for the public domain, the DNS record and the TLS certificate.
- A Linux host or container platform with a network path from the internet to nginx and from nginx to Orthanc.
- Read access to the current Orthanc configuration, including the
RegisteredUserslist, the admin account and any plugins already loaded. - A decision on which studies the demo will hold and who approves that dataset.
- A change window and an approver for the firewall and proxy rules.
- Someone who can test the viewers your users will open, because a broken workflow is often found by the user first.
Can our own team set up read-only public Orthanc access without a partner?
Yes, a capable team can build this without a partner if it already runs Orthanc and has working knowledge of nginx and Lua. The Orthanc Book nginx FAQ describes a demo setup behind nginx with an admin user, a public user and a Lua script that grants read-only access to external users, so it is a natural starting point. Your team should be comfortable with:
- Writing and debugging Lua filters that inspect HTTP methods, paths and authorization headers.
- Configuring nginx upstreams, TLS and access logs on the public edge.
- Testing that every write route returns a denial, including
/tools/execute-scriptand the export route, which the Orthanc security FAQ says should stay disabled.
Plan time for that testing. A demo that loads cleanly but still lets an outside user upload or delete a study has not met its purpose.
Can a public Orthanc demo safely hold patient data?
Only if the data is de-identified or synthetic and your privacy and compliance owners have approved it. Read-only access blocks changes, but it does not make images anonymous. Anyone with the URL can view every study the demo holds, and DICOM headers or burned-in pixel text can carry names, dates and record numbers. Check the tags and pixel content of every study before publishing. Confirm with your privacy officer whether the demo's logs, caches and backups count as a disclosure path. If the archive holds real patient images, treat the public address as a disclosure channel and plan the controls described in the production question. Ask the provider to include a de-identification check in the scope and to name who signs off the dataset.
Is nginx with a Lua read-only filter enough for production Orthanc?
For a demo or teaching archive, the pattern can be enough. For a production archive that clinicians use, it is only one control among several. Production needs authentication for every user, roles that limit each user to the studies they should see, HTTPS on every path, encryption and access logging, and tested backups. Orthanc's security FAQ recommends that AuthenticationEnabled be true whenever RemoteAccessAllowed is on, and it recommends HTTPS and a reverse proxy for Internet exposure. For per-study rules, the advanced authorization plugin forwards each request's token to an external web service that returns HTTP 403 when access is denied, so the decision lives in a service you can test and audit. Plan a security review before any production exposure.
When should we bring in a partner for public Orthanc access?
Bring in a partner when the demo will face the internet and no one on your team owns nginx, Lua and Orthanc in production, or when you need a written scope, testing evidence and a retest before go-live. Bring one in too when you want ongoing upgrades. DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms in your own infrastructure, runs security testing, and works from a written scope with agreed deliverables and timelines before work starts. Ongoing support, upgrades and continuous testing are available as retainers. DeployOpen does not publish a price list, so a quote follows from the scope. For Orthanc-specific help, Orthanc Team sells pre-paid dedicated support hours valid for 12 months, quoted on request. Ask both for a written scope before you choose.
How DeployOpen scopes and delivers read-only Orthanc access
DeployOpen treats a public, read-only Orthanc archive as a scoped change to a self-hosted server inside your infrastructure. The written scope names the admin and public users, the nginx routes, the Lua filter rules and the tests that prove write requests fail. Build, testing, documentation and handover follow that scope, and ongoing support is available as a retainer.
How we scope
- Written scope lists which Orthanc routes the public may read, and which admin routes stay closed.
- Scope covers the admin and public user accounts, their access level and where credentials are kept.
- Deliverables and timelines are fixed in writing before any build work starts.
How we build
- Deploy Orthanc with an nginx reverse proxy in front, keeping admin access off the public path.
- Write the Lua filter to pass read requests and reject any request that would store, modify or delete studies.
- Keep the /tools/execute-script and export routes disabled, as the Orthanc security FAQ advises for any exposed server.
How we hand over
- Test that anonymous users can browse studies and that every write attempt through the public path fails.
- Documentation covers the nginx configuration, Lua rules, account setup and the retest steps for future changes.
- Handover includes the written test results and a list of items to confirm with your team before go-live.
How we support
- Ongoing support, Orthanc upgrades and repeat access testing can be covered by a retainer.
- Re-test the public path after each upgrade, since Orthanc 1.13.0 rewrote its storage-area access code.
- Confirm response times, support hours and escalation paths in the written agreement before you sign.

