Integration of Keycloak with build version of Orthanc


I would like to find out how exactly we can integrate Keycloak authentication with a build version of Orthanc. I have noticed the instructions on github GitHub - orthanc-team/orthanc-auth-service: Web service to run next to orthanc to handle sharing of studies are tied to a Docker setup.

But how exactly can the same be done for the build version of Orthanc that I have on my computer without using Docker but only using Keycloak and Orthanc.


You can just run each component (Keycloak, PostgreSQL server, python authorization service + Orthanc) natively. They will all be accessible on a different HTTP port on localhost.



Hello thank you for the suggestion, and I have tried connecting it to Orthanc but I am having challenges with connecting the Orthanc application to Keycloak. When I start Orthanc, I access it using “localhost:80425/app/explorer.html”. But I want it to display the login form for Keycloak then once I login, it should redirect me to “localhost:80425/app/explorer.html”.

I am not sure on how exactly to go about with the configurations.

I would appreciate a detailed tutorial of integrating orthanc with keycloak/auth-plugin and postgresql. Many on this board are doctors or non-techies :).Thanks.


Don’t take it bad @zman but deploying Orthanc with Keycloak is something for techies, not doctors. As a techie, I would not give surgery a try :wink:

Maybe @bcrickboom can share his slides from the Orthanc Conference…

Best regards,



I do not take it bad at all :). Since you have two sets of plugins: one for docker another one for lsb. I would appreciate that the document (the BOOK) instruction can be clearer for the two scenarios rather than mixing them together. The instruction actually is very confusing. Thank you very much for your hard work for the open source community.

Best Regards,


Hi Zman,

This could be helpful:

Hi, bcrickboom:
This pdf shows exactly what I need. So wonderful! Thank you!
One thing I would like to ask is: I am at testing stage and does not have a domain name. Could I skip the 8-14 (no encript etc.) and start with page 15?


Hi, bcrickboom:
I encountered a strange error at the very beginning:

while running the following command:

docker compose up -d

I got an error message:

   Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /data/install/orthanc-con-2023/secrets/SECRET_KEY

yet the file does exists:

   $ls -l /data/install/orthanc-con-2023/secrets/SECRET_KEY
   -rw-r--r-- 1 root root 228 Nov  3 20:16 /data/install/orthanc-con-2023/secrets/SECRET_KEY

BTW, I’m using ubuntu 22.04 and running as root.


Hi, bcrickboom:
On page 5 of your slide, LVM is mentioned and highlighted.
But I didn’t have LVM on my ubuntu server. Could that be a potential problem? And if it is essential, how it is involved in setting up the Orthanc? (I didn’t see LVM being mentioned in the rest of the pdf file.)