Using PostGreSQL on a windows platform

I have tried every possible thing I can think of to get the PostGreSQL to operate on my windows platform and nothing works.

It fails every time. I used the --upgrade command and it can’t find the PostGreSQL instance. I am only trying to use the indexing and it fails miserably.

Obviously I am either missing something or this just does not work.

I followed every piece of information I can find in the book and none of it helps. Please, for the love of God, someone explaain how this is supposed to work and explain it for idiots like me who will never touch a Linux server.

I am running the most recent 64 bit version of Orthanc 18.x.x. which supposedly comes with 64 bit .dlls for the SQL stuff. I tried using MySQL with the same results. something is drastically wrong.


share your config file


  • Configuration to use PostgreSQL instead of the default SQLite
  • back-end of Orthanc. You will have to install the
  • “orthanc-postgresql” package to take advantage of this feature.
    “PostgreSQL” : {
    // Enable the use of PostgreSQL to store the Orthanc index?
    “EnableIndex” : true,

// Enable the use of PostgreSQL to store the DICOM files?
“EnableStorage” : false,

// Option 1: Specify explicit authentication parameters
“Host” : “localhost”,
“Port” : 5432,
“Database” : “orthanc”,
“Username” : “orthanc”,
“Password” : “orthanc”,

// Option 2: Authenticate using PostgreSQL connection URI
// “ConnectionUri” : “postgresql://orthanc:orthanc@”,

// Optional: Disable the locking of the PostgreSQL database
“Lock” : true

What says your log file in “–verbose” mode?

I ran this according to the instructions (See attached). One using my orthanc.json and the other against the PostgreSQL json. Not sure if there is a difference.
The dated log file is the production log when attempting to use PostGreSQL using the Index only.

Orthanc_Postgre.log (4.68 KB)

Orthanc.log (4.75 KB)

Orthanc.log.20180901-084036.2488 (11 KB)

Your “Orthanc.log.20180901-084036.2488” file contains the following error:

E0901 08:40:39.133726 PluginsManager.cpp:164] PostgreSQL error: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host “localhost” (::1) and accepting
TCP/IP connections on port 5432?

As a consequence, this is not an issue in Orthanc. Please review the configuration of your PostgreSQL server:


Yes. It is all on the localhost. I understand that means it is not affected by the firewall settings.

My question would then be what server is it trying to connect to? PostGre SQL or Orthanc. And if this error is referring to Orthanc, why is it not the default of 4242? That it is on a different port would seem to indicate it is a different service it is trying to authenticate to (aka PostGreSQL). Maybe I am just thick or just stupid, but I am not following your logic here.

Before trying to combine Orthanc and PostgreSQL, you should first learn how to use PostgreSQL alone.

There are plenty PostgreSQL tutorials available, e.g.:

In a nutshell, “5432” is the TCP port PostgreSQL is listening for SQL commands (among which those issued by Orthanc), whereas “4242” is the TCP port Orthanc is listening for DICOM commands.