Configuration
DICOM-RST requires configuration before it can run in your environment.
This configuration will be loaded from a file named config.yaml
next to the binary.
When using Docker, you can use volumes to mount a local config file into the container. In the container, the config file is always located in the root directory. The :ro
option will mount the file into the container as read-only.
Example Config
The following configuration provides all relevant settings. As a starting point, you can copy this configuration and adapt it to your needs.
Telemetry Config
- telemetry.sentry
The Sentry DSN. If empty or not present, this will disable Sentry.
- telemetry.level
The logging level. Possible values are (sorted by verbosity):
ERROR
WARN
INFO
DEBUG
TRACE
Global Server Config
- server.aet
The AET that should be used by DICOM-RST as the calling AET. When using the DIMSE backend, make sure that this AET is whitelisted by the called AET.
HTTP Server Config
- server.http.interface
The interface the HTTP server should bind to. Uses
0.0.0.0
by default.- server.http.port
The port for the HTTP server. Uses
8080
by default.- server.http.max-upload-size
The maximum allowed request body size in bytes. This setting can be used to limit the upload size of STOW-RS requests.
- server.http.request-timeout
The maximum allowed (total) time for a HTTP request in milliseconds before a timeout occurs. This applies to all endpoints.
- server.http.graceful-shutdown
If enabled, DICOM-RST will wait for outstanding requests to complete before stopping the process. Shutdowns will take no longer than the request timeout configured by
server.http.request.timeout
. If disabled, the process is stopped immediately, which will potentially lead to incomplete responses for outstanding requests.
DIMSE Server Config
When using the DIMSE backend, a running STORE-SCP is required to receive incoming DICOM instances. You can spawn multiple DIMSE server that will act as the STORE-SCP.
- server.dimse.aet
The AET for this DIMSE server. Make sure that this AET is whitelisted and is a valid destination for C-MOVEs.
- server.dimse.interface
The interface this DIMSE server should bind to.
- server.dimse.port
The port for this DIMSE server.
- server.dimse.uncompressed
If enabled, the DIMSE server will propose uncompressed transfer syntaxes only. We've encountered some PACS that will happily accept compressed transfer syntaxes, but throw an internal exception when compressing before sending it to the STORE-SCP. Enforcing a uncompressed transfer syntax will fix this.
DICOMweb Config
Each AET (regardless of the backend) has additional settings specific to the DICOMweb endpoints.
- qido-rs.timeout
How many milliseconds to wait until a QIDO-RS request should time out. This is the timeout for a single operation (e.g. receiving a DIMSE-C response primitive). If you want to set a timeout for the total execution time, use the
server.http.request-timeout
option instead.- wado-rs.timeout
How many milliseconds to wait until a WADO-RS request should time out. This is the timeout for a single operation (e.g. receiving a DIMSE-C response primitive). If you want to set a timeout for the total execution time, use the
server.http.request-timeout
option instead. Consult the conformance statement of your PACS to see how often a C-MOVE-RSP is returned and adapt this option accordingly. If a C-MOVE-RSP is returned every 20 seconds, set this to 30 seconds (20s + 10s leeway) for example.- wado-rs.mode
DIMSE-backend only: Some PACS do not include the
MoveOriginatorMessageId
attribute in their C-STORE-RQ messages. This makes it hard to assign incoming C-STORE-RQ responses to an active C-MOVE operation. As a workaround, you can set the receive mode tosequential
to disable concurrent C-MOVEs. Throughput will be limited, but it will work reliably. Consider increasing the timeouts when using the sequential mode. Most PACS can and should use the concurrent mode.concurrent: C-MOVE requests are processed concurrently.
sequential: C-MOVE requests are processed sequentially.
- wado-rs.receivers
DIMSE-backend only: A list of AETs for STORE-SCPs that can act as the receiver for this AET. The AET must match with a value from
server.dimse.aet
.- stow-rs.timeout
How many milliseconds to wait until a STOW-RS request should time out. This is the timeout for a single operation (e.g. receiving a DIMSE-C response primitive). If you want to set a timeout for the total execution time, use the
server.http.request-timeout
option instead.
S3 Backend Config
The following options are available if the S3 backend is selected:
- endpoint
The endpoint where the S3 compatible storage is available
- bucket
The bucket to access. We recommend this to be the same as the AET.
- region
The region of the S3 bucket. Set this to a dummy value (like "local") if this is not required. Most S3 implementations require a region, even though it doesn't make sense for on-premise deployments.
- credentials.access-key
The access key for S3 authentication. For anonymous access, remove the entire
credentials
object from your config.- credentials.secret-key
The secret key for S3 authentication. For anonymous access, remove the entire
credentials
object from your config.- concurrency
The maximum allowed amount of concurrent S3 operations. Increasing the amount of concurrency will massively improve throughput.
- endpoint-style
Sets the URL access style. Defaults to vhost. Allowed values are:
path: For the deprecated path-style.
vhost: For the virtual-hosted-style.
DIMSE Backend Config
The following options are available if the DIMSE backend is selected:
- host
The host address (IPv4 or IPv6) of the external AET that should be called by DICOM-RST.
- port
The port of the external AET that should be called by DICOM-RST.
- pool.size
The size of the connection pool. This sets the amount of concurrency, as there will be at most
pool.size
concurrent connections.- pool.timeout
The maximum time (in milliseconds) to wait for a new connection from the pool. If the pool size is 2 and there are already 2 active connections, a third request will wait until one of the currently active connections is returned to the pool.