Mercurial > hg > orthanc-book
comparison Sphinx/source/users/configuration.rst @ 213:f40f7d15e6bb
updated configuration file section
author | amazy |
---|---|
date | Fri, 22 Feb 2019 10:30:49 +0100 |
parents | 2b6b82c57e79 |
children | f8c55b461d16 |
comparison
equal
deleted
inserted
replaced
212:7ff807cc5ade | 213:f40f7d15e6bb |
---|---|
2 .. highlight:: bash | 2 .. highlight:: bash |
3 | 3 |
4 Configuration of Orthanc | 4 Configuration of Orthanc |
5 ======================== | 5 ======================== |
6 | 6 |
7 Configuring Orthanc simply consists in copying and adapting the | 7 Configuring Orthanc simply consists in providing a configuration file. |
8 `default configuration file | 8 Orthanc has numerous configuration that are documented in the `default |
9 configuration file | |
9 <https://bitbucket.org/sjodogne/orthanc/raw/Orthanc-1.5.4/Resources/Configuration.json>`_. This | 10 <https://bitbucket.org/sjodogne/orthanc/raw/Orthanc-1.5.4/Resources/Configuration.json>`_. This |
10 file is in the `JSON <https://en.wikipedia.org/wiki/JSON>`_ file | 11 file is in the `JSON <https://en.wikipedia.org/wiki/JSON>`_ file |
11 format. You can generate a sample configuration file with the | 12 format. You can generate this file file with the |
12 following call:: | 13 following call:: |
13 | 14 |
14 $ Orthanc --config=Configuration.json | 15 $ Orthanc --config=Configuration.json |
15 | |
16 Then, start Orthanc by giving it the path to the modified | |
17 Configuration.json path as a command-line argument:: | |
18 | |
19 $ Orthanc ./Configuration.json | |
20 | 16 |
21 The default configuration file would: | 17 The default configuration file would: |
22 | 18 |
23 * Create a DICOM server with the DICOM AET (Application Entity Title) | 19 * Create a DICOM server with the DICOM AET (Application Entity Title) |
24 ``ORTHANC`` that listens on the port 4242. | 20 ``ORTHANC`` that listens on the port 4242. |
25 * Create a HTTP server for the REST API that listens on the port 8042. | 21 * Create a HTTP server for the REST API that listens on the port 8042. |
26 * Store the Orthanc database in a folder called ``OrthancStorage``. | 22 * Store the Orthanc database in a folder called ``OrthancStorage``. |
27 | 23 |
24 However, we recommend that you start from an empty configuration file | |
25 and only specify the options for which you don't wan't to use | |
26 the default value. In exemple, a simple configuration file would be:: | |
27 | |
28 { | |
29 "Name": "My archive", | |
30 "HttpPort": 80, | |
31 "DicomAet": "ARCHIVE", | |
32 "DicomPort": 104 | |
33 } | |
34 | |
35 It's also a very good practice to split your configuration files per topic. | |
36 In exemple, have a ``dicom.json`` for everything that is related to DICOM, | |
37 a ``http.json`` for all HTTP related configurations, one file per plugin... | |
38 This is how the configuration files are provided with the Windows Installer. | |
39 | |
40 Once your configuration file is ready, start Orthanc by giving it the path to the | |
41 configuration file path as a command-line argument. If you use multiple configuration | |
42 files, you may provide the path to the folder containing all configuration files | |
43 (all ``.json`` files will be loaded):: | |
44 | |
45 $ Orthanc ./Configuration.json | |
46 $ Orthanc ./config/ | |
47 | |
48 | |
28 *Remark:* When specifying paths under Microsoft Windows, backslashes | 49 *Remark:* When specifying paths under Microsoft Windows, backslashes |
29 (i.e. ``\``) should be either escaped by doubling them (as in ``\\``), | 50 (i.e. ``\``) should be either escaped by doubling them (as in ``\\``), |
30 or replaced by forward slashes (as in ``/``). | 51 or replaced by forward slashes (as in ``/``). |
52 *Remark:* When installing Orthanc with the Windows Installer, you won't be | |
53 able to edit your files unless you start your editor with ``Run as administrator``. | |
54 We recommend to edit your configuration file with an editor such as `Notepad++ <https://notepad-plus-plus.org/>`_. | |
55 It shall warn you that this file can be edited only by an admin, and will suggest you | |
56 to restart Notepad++ as an admin such that you'll be able to save it. | |
31 | 57 |
58 | |
32 To obtain more diagnostic, you can use the ``--verbose`` or the | 59 To obtain more diagnostic, you can use the ``--verbose`` or the |
33 ``--trace`` options:: | 60 ``--trace`` options:: |
34 | 61 |
35 $ Orthanc ./Configuration.json --verbose | 62 $ Orthanc ./Configuration.json --verbose |
36 $ Orthanc ./Configuration.json --trace | 63 $ Orthanc ./Configuration.json --trace |
37 | 64 |
38 Starting with Orthanc 0.9.1, you can also start Orthanc with the path | |
39 to a directory. In such a case, Orthanc will load all the files with a | |
40 ``.json`` extension in this directory, and merge them to construct the | |
41 configuration file. This allows to split the global configuration into | |
42 several files. |