Mercurial > hg > orthanc-book
annotate Sphinx/source/users/configuration.rst @ 653:a63e0ef60327
shutdown of windows service
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Apr 2021 15:10:57 +0200 |
parents | b3e75cef601d |
children | 7fbe9147423f |
rev | line source |
---|---|
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 |
638 | 10 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.9.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 | |
653
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
34 It's also a very good practice to split your configuration files per |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
35 topic. In example, have a ``dicom.json`` for everything that is |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
36 related to DICOM, a ``http.json`` for all HTTP related configurations, |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
37 one file per plugin. This is how the configuration files are provided |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
38 with the Windows Installer. |
213 | 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 | |
653
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
49 **Remark 1:** When specifying paths under Microsoft Windows, |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
50 backslashes (i.e. ``\``) should be either escaped by doubling them (as |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
51 in ``\\``), or replaced by forward slashes (as in ``/``). |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
52 |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
53 **Remark 2:** When installing Orthanc using the Windows installer by |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
54 Osimis, you won't be able to edit your files unless you start your |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
55 editor with ``Run as administrator``. We recommend to edit your |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
56 configuration file with an editor such as `Notepad++ |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
57 <https://notepad-plus-plus.org/>`_. It shall warn you that this file |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
58 can be edited only by an admin, and will suggest you to restart |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
59 Notepad++ as an admin such that you'll be able to save it. |
73 | 60 |
653
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
61 **Remark 3:** The Windows installers by Osimis provide a `Windows |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
62 service <https://en.wikipedia.org/wiki/Windows_service>`__ that |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
63 automatically starts Orthanc during the startup of Microsoft |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
64 Windows. You can control the parameters of the service by typing |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
65 ``services.msc`` at a command-line prompt. The Windows service of |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
66 Orthanc will do its best to cleanly stop Orthanc at the shutdown of |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
67 Windows, but `there are some caveats |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
68 <https://bugs.orthanc-server.com/show_bug.cgi?id=48>`__. |
213 | 69 |
653
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
70 **Remark 4:** To obtain more diagnostic, you can use the ``--verbose`` |
a63e0ef60327
shutdown of windows service
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
638
diff
changeset
|
71 or the ``--trace`` options:: |
0 | 72 |
73 $ Orthanc ./Configuration.json --verbose | |
74 $ Orthanc ./Configuration.json --trace | |
75 | |
541 | 76 To learn more about the Orthanc logs, :ref:`check out the dedicated |
77 page <log>`. |