A lightweight Flask-based web application designed to run in Docker on Synology NAS and integrate with Orthanc to enable simple and secure email sharing of DICOM studies. Designed for small clinics, veterinary practices, and private imaging centers using Orthanc on Synology NAS.
This service acts as a companion application to Orthanc. It allows users to:
- ✅ Select a study from Orthanc
- ✅ Generate a secure share link
- ✅ Send study access via email
- 🚧 Optionally set expiration for shared links
- 🚧 Use non gmail email
To integrate this application into Orthanc, you need to add a custom button to the study page in Orthanc Explorer 2.
Add the following configuration to your orthanc.json. Then restart orthanc server for the changes to take effect.
Replace:
- <SERVER_IP> with your Synology NAS IP address
- <APP_PORT> with the port you assign to this application
"OrthancExplorer2": {
"Enable": true,
"IsDefaultOrthancUI": false,
"UiOptions" : {
"CustomButtons": {
"study": [
{
"HttpMethod": "GET",
"Id": "email-link-button",
"Tooltip": "Send study info via email",
"Target": "_blank",
"Icon": "bi bi-link-45deg",
"Url": "http://<SERVER_IP>:<APP_PORT>/export-url?uuid={UUID}&patient={PatientName}&patientid={PatientID}&date={StudyDate}"
}
],
"series": [],
"instance": [],
"bulk-studies": []
}
}
},Create a .env file in the project root and fill in your data.
For Gmail, you must use an App Password (not your regular account password). More information: https://support.google.com/accounts/answer/185833?hl=en
SENDER_EMAIL=your email
SENDER_PASSWORD=email password
SYNOLOGY_URL=https://<SERVER_IP>:5001
SYNO_USER=example_admin
SYNO_PASS=example_password
ORTHANC_URL=http://<ORTHANC_IP>:<ORTHANC_PORT>
OR_USER=example_orthanc
OR_PASS=example_orthanc_pass
STUDY_PATH=etc/data
SYNOLOGY_PATH=/path/to/share/folder/on/synologyThe app allows for a custom email message to be specified. Make a message.txt and define your message.
Use the placeholders:
- #LINK# -> Will be replaced with the generated share link
- #PATIENT# -> Will be replaced with the patient name
Example:
Dear owner.
We are sending you the link #LINK# to your pet's #PATIENT# CT scan
Best regards
clinc - Copy Repository
Copy the repository files to a folder on your Synology NAS.
- SSH Into Synology
ssh your_user@<SERVER_IP>
cd /path/to/repository- Build Docker Image
sudo docker build -t orthanc_synology_email .- Run Container
Replace:
- /path_to_share_folder with your Synology shared folder path
- <PORT> with the port you want to expose
sudo docker run -d --env-file .env -v /path_to_share_folder:/app/etc/data -p <PORT>:5000 orthanc_synology_email