0
|
1 .. _configuration:
|
|
2 .. highlight:: bash
|
|
3
|
|
4 Configuration of Orthanc
|
|
5 ========================
|
|
6
|
213
|
7 Configuring Orthanc simply consists in providing a configuration file.
|
361
|
8 Orthanc has numerous configuration that are documented in the `default
|
213
|
9 configuration file
|
568
|
10 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.8.2/OrthancServer/Resources/Configuration.json>`_. This
|
0
|
11 file is in the `JSON <https://en.wikipedia.org/wiki/JSON>`_ file
|
361
|
12 format. You can generate this file file with the following call::
|
0
|
13
|
|
14 $ Orthanc --config=Configuration.json
|
|
15
|
|
16 The default configuration file would:
|
|
17
|
|
18 * Create a DICOM server with the DICOM AET (Application Entity Title)
|
|
19 ``ORTHANC`` that listens on the port 4242.
|
|
20 * Create a HTTP server for the REST API that listens on the port 8042.
|
|
21 * Store the Orthanc database in a folder called ``OrthancStorage``.
|
|
22
|
213
|
23 However, we recommend that you start from an empty configuration file
|
|
24 and only specify the options for which you don't wan't to use
|
214
|
25 the default value. In example, a simple configuration file would be::
|
213
|
26
|
|
27 {
|
|
28 "Name": "My archive",
|
|
29 "HttpPort": 80,
|
|
30 "DicomAet": "ARCHIVE",
|
|
31 "DicomPort": 104
|
|
32 }
|
|
33
|
|
34 It's also a very good practice to split your configuration files per topic.
|
214
|
35 In example, have a ``dicom.json`` for everything that is related to DICOM,
|
213
|
36 a ``http.json`` for all HTTP related configurations, one file per plugin...
|
|
37 This is how the configuration files are provided with the Windows Installer.
|
|
38
|
|
39 Once your configuration file is ready, start Orthanc by giving it the path to the
|
|
40 configuration file path as a command-line argument. If you use multiple configuration
|
|
41 files, you may provide the path to the folder containing all configuration files
|
|
42 (all ``.json`` files will be loaded)::
|
|
43
|
|
44 $ Orthanc ./Configuration.json
|
|
45 $ Orthanc ./config/
|
|
46
|
|
47
|
73
|
48 *Remark:* When specifying paths under Microsoft Windows, backslashes
|
|
49 (i.e. ``\``) should be either escaped by doubling them (as in ``\\``),
|
|
50 or replaced by forward slashes (as in ``/``).
|
213
|
51 *Remark:* When installing Orthanc with the Windows Installer, you won't be
|
|
52 able to edit your files unless you start your editor with ``Run as administrator``.
|
|
53 We recommend to edit your configuration file with an editor such as `Notepad++ <https://notepad-plus-plus.org/>`_.
|
|
54 It shall warn you that this file can be edited only by an admin, and will suggest you
|
|
55 to restart Notepad++ as an admin such that you'll be able to save it.
|
73
|
56
|
213
|
57
|
0
|
58 To obtain more diagnostic, you can use the ``--verbose`` or the
|
|
59 ``--trace`` options::
|
|
60
|
|
61 $ Orthanc ./Configuration.json --verbose
|
|
62 $ Orthanc ./Configuration.json --trace
|
|
63
|
541
|
64 To learn more about the Orthanc logs, :ref:`check out the dedicated
|
|
65 page <log>`.
|