Installing Orthanc on Synology

1,812 views
Skip to first unread message

drmaestro88

unread,
Nov 17, 2017, 12:30:14 PM11/17/17
to Orthanc Users
Hi,

I am trying to install the new Orthanc Beta on my Synology DS1517+ NAS. I have  very limited experience on installing Orthanc so I wanted to ask if somebody could help me on some questions.

Previously, I have installed Orthanc on a Windows PC following the official tutorial and it is working perfectly. However, some things are different in the NAS setup, as it is a different operating system. 

My first problem was the inability to access the root structure of the NAS system but I have been able to do it using Putty (SSH) and I can now see and modify files on NAS. I tried to locate the installation directory for Orthanc Beta and I assume it is: */volume1/@appstore/Orthanc , as most of the files are installed there. 

As Orthanc actively rejects DICOM queries if the asking viewer isn't defined in configuration.json (in "DicomModalities" section), I needed to find and modify that file. There is a subdirectory called "config" under "/volume1/@appstore/Orthanc", so I thought it would be there. However there are 3 files in that directory:

merge_server_config.json
server_config.json
Orthanc.sc

Which one of those is the file that I have to edit? The content of the json files are quite limited compared to the Windows version's configuration.json file. Here is the content of merge_server_config.json:

{
"Name" : "Orthanc",
"StorageDirectory" : "/volume1/orthanc/OrthancStorage",
"HttpPort" : 8042,
"icomAet" : "ORTHANC",
"DicomPort" : 4242,
"RemoteAccessAllowed" : true,
"SslEnabled" : false,
"AuthenticationEnabled" : true,
"RegisteredUsers" : {
"orthanc" : "orthanc"
},
"PostgreSQL" : {
"EnableIndex" : true,
"Host" : "/run/postgresql",
"Database" : "orthanc",
"Username" : "Orthanc"
},
"Plugins" : [
"/var/packages/Orthanc/target/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so"
]
}

If this is the file that I have to edit, where am I going to add "DicomModalities" and also where should it be located between accolades?

And last question: In Windows we needed to stop the associated service before making changes to the configuration.json file. Do I have to stop the Orthanc service in the NAS (there is an option to stop it) before modifying the json file? Do I have to reboot the NAS after modifying the json file or is it ok to just restart the service.

Any help would be greatly appreciated.


Marco Barnig

unread,
Nov 18, 2017, 6:35:27 AM11/18/17
to Orthanc Users
You are right, Orthanc Beta is located at /volume1/@appstore/Orthanc. 
A look at the Orthanc logs in the subdirectory /log confirms that the configuration file 'merge-server-config.json' is used. (see figure).
Default values are used for the missing parameters in the limited content of the Synology Orthanc configuration file. 
You can add all the parameters of the Windows version, with the same syntax. 
I suggest to add the DicomModalities after the line with the closing accolade and comma of "Registered Users", as follows:

"DicomModalities" : {
"myaet" : [ "AET name", "IP Address", port number]
},

Finally stop and restart the Orthanc server in the Synology Package Center to apply the changes.

Marco Barnig

-------------------------------------
synology_orthanc_logs.png

drmaestro88

unread,
Nov 18, 2017, 11:46:43 AM11/18/17
to Orthanc Users
Thank you very much for the information. I'll try it monday. I also would like to mention a probable error in the default configuration file: In the line 4 of the default configuration file the following expression is used:  " "icomAet" : "ORTHANC", " Shouldn't it be "DicomAet" : "ORTHANC", Wouldn't the lack of the letter "D" prevent the configuration from working? Maybe this has been omitted but I don't know who to contact to tell about it.

18 Kasım 2017 Cumartesi 14:35:27 UTC+3 tarihinde Marco Barnig yazdı:

drmaestro88

unread,
Nov 18, 2017, 11:54:17 AM11/18/17
to Orthanc Users
And a bonus question: Which software do you use to edit the merge_server_config.json? I used vi command on Putty but I find it to be a little bit old-school and impractical. Are there other editors, that can access root? And which software did you use to access the log file on Synology itself?

Marco Barnig

unread,
Nov 18, 2017, 6:46:29 PM11/18/17
to Orthanc Users
I use the Syno Web Console developed by MissileHugger which has an integrated editor or the Config File Editor created by Remco Schellekens.

The first package is no longer available on the Internet and the second is no longer maintained by its author. Here is the link :


I suggest you to stay with putty and vi to edit the config file and to view the logs. It's better to use an old-school tool that you know than to loose your time and take risks by installing third party tools on your Diskstation that are not supported by Synology.

You are right that the character D for DicomAET in the Orthanc configuration file on Synology is missing. I will send a bug report to Synology.
The error doesn't prevent Orthanc from working, but it has an impact on the communication with another AET.

Marco Barnig

-----------------------------------------------------

drmaestro88

unread,
Nov 20, 2017, 10:04:22 AM11/20/17
to Orthanc Users
Hi,

Today I have tried your suggestion about editing the configuration file. I have edited merge_server_config.json with my viewer's parameters, stopped Orthanc service and restarted it but it didnt work on the first try. When I checked the config file, I saw that it reverted to its original form, even tough  it was modified , saved and verified. As there is another configuration file on the same directory (server_config.json) which is very similar to merge_server_config.json, I decided to edit it this time. To my surprise, it worked. I assume that, while merge_server_config.json is the main config file used by Orthanc, it is created by the information present in server_config.json, so this is the file that needs to be edited.  

Thanks for the help...

Marco Barnig

unread,
Nov 25, 2017, 5:36:26 AM11/25/17
to Orthanc Users
Hello drmaestro88,

Thanks for the feedback.
Good to know that server_config.json is copied to merge_server_config.json at the restart of the Orthanc server.
The term merge_  makes me think that other config.json files in the same folder are also used to create the merged configuration file.
I will do some trials in the coming days to check if this assumption is correct.

kind regards,
Marco Barnig

Marco Barnig

unread,
Jan 19, 2018, 8:07:33 AM1/19/18
to Orthanc Users
The configuration bug in Orthanc on Synology has been redressed in the the recent update to version 1.3.0-0005.

drmaestro88

unread,
Jan 31, 2018, 11:06:07 AM1/31/18
to Orthanc Users
Thanks for the information.

While not directly related with installation, I'd like to ask a question about backing-up Orthanc on Synology. What is the best way to do it? I understand that regular back-up software running on Synology only backs-up specific folders, like images or music. Orthanc creates its own folder, so I am not sure which software and method should be used for back-up purpose.

Thanks 

Marco Barnig

unread,
Feb 9, 2018, 9:15:58 AM2/9/18
to Orthanc Users
I have no experience with the Synology backup tools. I use phpMyAdmin and phpPgAdmin to export, from time to time, the MariaDB and Postgres databases for different applications as backup. Sorry for not providing better help.

William Sanchez

unread,
Jul 18, 2019, 9:11:25 PM7/18/19
to Orthanc Users
Hi

I was reading and a user says that I installed the beta version of Orthanc first of the synology page, then stopped the process and then installed the latest version of Orthanc (1.5.7), they know how to do that new installation to replace version 1.30 beta available on the synology page?

Regards

William

Sébastien Jodogne

unread,
Jul 22, 2019, 4:52:53 AM7/22/19
to Orthanc Users
Hello,

Please look at the following thread, that is more recent and that contain step-by-step instructions by Adrian Schiopu:

Closing the present thread.

Regards,
Sébastien-
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages