Could someone please post a copy of their Config file with PostgreSQL enabled?


I am having some issues configuring the PostgreSQL option after an install of:


Could someone post an example of the contents of their config file (if that's OK)?

I wanted to try the PostgreSQL option as a test but I can't seem to get it working.

I have installed Postgresql on Windows7x64 already and configured a DB and a User/Password.



Very bad idea to use PostgreSQL on Windows, neither for testing, PostgreSQL was designed to be run on POSIX compliant systems, and Windows its not.

Either way … if you insists, you need to install PostgreSQL, setup the pg_hba.conf file and restart the SQL service before you try to setup OrthanC to comunicate with it.

Ok, thanks.

Could someone show me where/what I add to the config file after I have done the db setup?

That's what I wanted to see, an actual config file with the PostgreSQL entry in it.

Thank you,

The following configuration is running properly in production, both the
Orthanc server and the PG server are in Docker containers.

"Name": "REDACTED Orthanc PACS",
"StorageDirectory": "/var/lib/orthanc/db",
"Plugins": ["/usr/share/orthanc/plugins"],
"DicomModalities": {
"RemoteAccessAllowed": true,
"PostgreSQL": {
"EnableIndex": true,
"Host": "orthanc-pacs-db",
"Database": "postgres",
"Username": "postgres"

If you know how Docker works, you'll trust there is absolutely nothing
special going on. You can reproduce this easily for testing with Docker
for Windows if you'd like:

[docker-compose.yml snippet]
build: orthanc-pacs
ports: ["4242:4242", "80:8042"]
volumes: ["orthanc-pacs-storage:/var/lib/orthanc/db"]
restart: unless-stopped
depends_on: [orthanc-pacs-db]
image: postgres:9.5
volumes: ["orthanc-pacs-db:/var/lib/postgresql/data:Z"]
restart: unless-stopped

FROM jodogne/orthanc
COPY orthanc.json /etc/orthanc/

This setup only uses PG for the Orthanc index. In another deployment we
use PG for both the Orthanc index and Orthanc storage:

"Name": "REDACTED",
"Plugins": ["/usr/share/orthanc/plugins"],
"DicomAet": "REDACTED",
"DicomModalities": {
"RemoteAccessAllowed": true,
"PostgreSQL": {
"EnableIndex": true,
"EnableStorage": true,
"Host": "orthanc-db",
"Database": "postgres",
"Username": "postgres"

[docker-compose.yml snippet]
build: orthanc
depends_on: ["orthanc-db"]
restart: unless-stopped
ports: ["104:4242"]
image: postgres:9-alpine
restart: unless-stopped
volumes: ["orthanc-db:/var/lib/postgresql/data:Z"]

FROM jodogne/orthanc-plugins:1.2.0
COPY orthanc.json /etc/orthanc/

It would help if you would provide actual symptoms of the problem
(short description, Orthanc logs, network logs).

I think perhaps you are looking at it from too high a level (lol).

I wanted to know where I add the PostgresQL information into the config file.

I have attached the config file that I am currently running.

I haven't used PostgresQL before so I was going to do the following for a test/self education:

1. Install Orthanc in a fresh VM (WINDOWS7x64)
2. Install PostgreSQL on the same VM (WINDOWS7x64)
3. Configure the PostgreSQL DB
4. Mod the Orthanc Config file to connect it to the PostgreSQL DB
5. Archive some test studies to it to make sure I have it working correctly
6. Roll it into production once I am comfortable with it

The reasons: My department wants to use Orthanc as an ancilliary PACS system, purely for DICOM images that were acquired in other practices.

I am planning ahead for the future as I have read that the SQLite default DB that comes with Orthanc can have issues after 50,000 archived studies.

If required I can build a VM offsite (at home) and install Postgre in Ubuntu. I need Orthanc running on Windows as I amusing a FQDN and my IT department doesn't want to put my Ubuntu install on the domain.


Orthanc_Config_File.txt (13.5 KB)

You don’t need the *nix VM’s to be linked to the domain to work.
Either way, I don’t see any of the needed config statements on you file, that are needed to link OrthanC to a PostgreSQL database.

Hi Raul,

Even though it's not part of my question, you are indeed correct. I don't need my ubuntu server to be on the domain for Orthanc to function.

The reason I have installed Orthanc on Windows is because I want to use a FQDN. At some stage the server will be moved, or migrated and the structure of my Hospital network is not conventional. I have a mix of switches and VLANs and they don't all provide the same IP range.

Currently the Orthanc server is on 10.55.95.XX If I were to move it to my Radiology server room it would have to have an IP of 10.55.195.XX and the shortcuts to the server I have pushed out would all need to be fixed BUT --> Having an FQDN on a Windows box means I don't need to worry, as my users can navigate to the HOSTNAME:PORT and If the Orthanc server changes IP it won't matter.

Back to the question though:

**I wanted to know where I add the PostgresQL information into the config file**

Could you or anyone just show me where and what I type into the config file, because I am having difficulty with this. I went to the Orthanc book and tried to use the example there without much luck. After making the changes, the website would not work.

Perhaps, If you, or someone else is kind enough to post an example of where/what I type and just assume I have my PostgreSQL server setup it would help me understand.

For example: If you asked

"what do I type in the config file to add a DICOM modality to Orthanc?

I would type this:

"Under the Network Topology section you need to put in your DICOM modality details"

please see the details from the Network topology section from my config file:

   * Network topology

  // The list of the known DICOM modalities
  "DicomModalities" : {
     * Uncommenting the following line would enable Orthanc to
     * connect to an instance of the "storescp" open-source DICOM
     * store (shipped in the DCMTK distribution) started by the
     * command line "storescp 2000".
    // "sample" : [ "STORESCP", "", 2000 ]
"GEPACS" : [ "LIV108GEPACS", "", 4100 ],
"RA600-LIV" : [ "AE_LIVW5804", "", 104 ],
"RA600-CTN" : [ "AE_CTNW2918", "", 104 ],
"Terarecon-LIV" : [ "LIVERPOOLTR_AE", "", 105 ],
"Terarecon-CTN" : [ "AQNETC", "", 105 ],
"Terarecon-BNK" : [ "AQNET32900249_AE", "", 105 ],
"XEIR-SCP" : [ "ECSWSCROSS_SCP", "", 4000 ],
"RADIANT-LIVW9145" : [ "RADLIVW9145", "", 11112 ],
"RADIANT-LIVW7179" : [ "RADLIVW7179", "", 11112 ],
"RADIANT-LIVW9140" : [ "RADLIVW9140", "", 11112 ],
"RADIANT-LIVW7170" : [ "RADLIVW7170", "", 11112 ],
"MEDINRIA-LIVW7170" : [ "MEDLIVW7170", "", 11112 ],
"ClearCanvas-LIVW7170" : [ "LIVW7170", "", 104 ],

So, if someone would help me in this way, that would be awesome.

Thanks again,


Have you read the documentation in the Orthanc Book, that contains sample configuration?


It will matters, as DICOM protocol relies on IPs, not hostnames, if you move your OrthanC from one place to another at it changes IP, you will have to update all of your sending/receiving DICOM modalities. Apart of other problems related with DICOM not being a firewall/routing friendly protocol.

Doesn’t matter, getting back to the PostgreSQL question, on the OrthanC online book you have the needed entries on the .json file to enable the PosqreSQL pluging and it’s options.

Either way, this is my config section of OrthanC for PostgreSQL, it will not help you, as is over Linux, but only the plugin paths changes.


“Plugins” : [


“PostgreSQL” : {
“EnableIndex” : true,
“EnableStorage” : false,
“Host” : “localhost”,
“Port” : 5432,
“Database” : “orthanc”,
“Username” : “orthanc”,
“Password” : “orthanc”,
“Lock” : false


I don’t storage images on the DB, only index.

Eitherway … I have another OrthanC instance, with SqliteDB with about 450.000 studies on it, so don’t bother to put more than 50.000, it works.