-
Notifications
You must be signed in to change notification settings - Fork 0
XNAT Installation Overview
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 / JDK 21 - Docker image: tomcat:9.0.115-jdk21-temurin-noble
-
Postgresql - Version: 16 - Docker image: postgres:16
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 Docker 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. All the mount directories are contained within /xnat-data. This is configured within the xnat.cfg file. Highly recommend to stay with the default at present.
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 - place directories of sessions here and they are automatically imported into XNAT.
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: UFW, Ports and Firewall Configuration