-
Notifications
You must be signed in to change notification settings - Fork 0
XNAT Installation Overview
- Home
- Configuring XNAT - xnat.cfg file
- How to optimise XNAT
- Docker - Maintenance
- Docker - Migrating an XNAT server
- Developer Notes
XNAT is a Java web application, written in Java. Apache Tomcat is an open-source server for dynamic Java web applications. XNAT relies on Java, Apache Tomcat 9, Postgresql and Nginx.
Using this xnat-setup script, XNAT is deployed as a docker stack. 3 docker containers run together in a network. The three base images are:
-
Tomcat/JDK - Tomcat version 9 latest (XNAT v1.8.3) - Docker image: tomcat:9.0.53-jdk8-temurin
-
Postgresql - Version: 12 - Docker image: postgres:12
During the build process, the latest versions of these images are pulled from https://hub.docker.com/ and new Docker images are created and run as docker containers as part of a docker stack. During the build process, a file docker-compose.yml is created that contains the resources and information regarding the 3 containers that run based on the images created.
During the build process, XNAT is downloaded as a .war file, for example xnat.war. This is a compressed file containing the web application. This is placed in the folder inside of the tomcat:
/usr/local/tomcat/webapps/ROOT
This is the location inside the Tomcat container filesystem, and not on the host filesystem.
Postgresql:
Postgresql is the database backend of XNAT. It stores all the data for XNAT. The database name is xnat.
Nginx:
Nginx is a server used as a front-end proxy - it manages the SSL certificates and routes traffic towards the Tomcat web server, which hosts XNAT.
UFW / iptables:
Iptables is the Linux firewall software. iptables can be tricky to configure. UFW (Uncomplicated Firewall) is a tool to ease the configuration of iptables. An example of a UFW command:
ufw allow https
This is DISABLED by default. If running inside Docker, install UFW on your host computer and configure the firewall.
File system:
As these are virtual machines, their filesystems are also virtual. Certain directories are mapped to the host server. The location of the host filesystem mount points can be configured in the xnat.cfg file.
Postgresql:
/xnat-data/postgresql/ - this is the postgresql database
Nginx:
/xnat-data/xnat
./certificates - this contains the SSL certificates and is on the NGinx container (/etc/ssl)
./nginx_logs - the log files pertaining to the Ngnix container (var/log/nginx/
Tomcat:
/xnat-data/xnat
./archive
./build
./tomcat_logs
./scripts
./inbox
/xnat-data/import_data
Log File:
The tomcat XNAT logfiles are located:
/data/xnat/home/logs/
This is the location inside the container if running within Docker. This is mapped, by default to:
/xnat-data/xnat/tomcat_logs/
Additional set-up log files are located in:
/xnat-data/xnat/scripts/logs/
Next step: Install XNAT 1.8
XNAT 1.7:
- Version: 7.0.91
- Location /opt/tomcat7
/opt/tomcat/webapps/
When tomcat is started (service tomcat7 start), the folder is uncompressed and the web application is started.
- Location: /opt/jdk8 (softlink)
The open source Java developer kit - this contains a Java Virtual Machine required to run Java Web applications.
XNAT 1.7:
- Version: 10
- Location depends on the version of linux.
Postgresql is the database backend of XNAT. It stores all the data for XNAT. The database name is xnat. XNAT connects to the database using the details stored in the file:
/data/xnat/home/config/xnat-conf.properties
Nginx:
Nginx is a server used as a front-end proxy - it manages the SSL certificates and routes traffic towards the Tomcat web server, which hosts XNAT.
UFW / iptables:
Iptables is the Linux firewall software. iptables can be tricky to configure. UFW (Uncomplicated Firewall) is a tool to ease the configuration of iptables. An example of a UFW command:
ufw allow https
This is DISABLED by default. If running inside Docker, install UFW on your host computer and configure the firewall.
/etc/nginx/sites-available/xnat - the Nginx configuration file
/etc/ssl - this folder contains the ssl certificates
/var/lib/postgresql/ - Postgresql database
/etc/postgresql/$vers/main/pg_hba.conf - this file confiugures access to the XNAT database. Change this for remote access.
/data
./xnat
./archive - The XNAT archive, containing all the DICOM files.
./prearchive
./cache
./build
./ftp
./pipelines - The XNAT pipeline engine is installed here.
./home - HOME directory of the Tomcat user (conventionally named 'xnat')
./config
./plugins - XNAT plugins are placed here. Tomcat restart required to install new plugins.
./logs - tomcat webapp log files are located here
./work
/opt
./jdk8 - The soft link to the Java Developer Kit
./tomcat7
./webapps/ - the location of the XNAT web application. The xnat.war file is placed here before starting Tomcat.
If running XNAT within a Docker container, all these will exist within the container, not the computer. However two directories are mounted, or shared, ont he host filesystem. The default directory is /xnat-setup-shared-volume:
/xnat-setup-shared-volume/data contains the /data directory and all subdirectories.
/xnat-setup-shared-volume/postgresql contains /var/lib/postgresql/
The tomcat XNAT logfiles are located:
/data/xnat/home/logs/
This is the location inside the container if running within Docker. This is mapped, by default to:
XNAT 1.7: /xnat-setup-shared-volume/data/xnat/home/logs/