XP distributions


This chapter investigates the anatomy of the XP distribution files (aka the XP runtime)


When downloading and unzipping the XP distro, you will find the following root structure inside:

XP distribution folder structure
enonic-xp-<OS>-<type>-<version>  (1)
 |- bin/  (2)
 |- home/   (3)
 |- java/  (4)
 |- lib/  (5)
 |- service/  (6)
 |- system/  (7)
1 The root folder is simply referred to as XP_INSTALL.
2 bin/* contains the scripts for starting and stopping Enonic XP and setting environment variables.
3 home/ also known as XP_HOME
4 java/ contains the embedded JVM distro, contents vary with distro
5 lib/ contains the bootstrap code used to launch Enonic XP.
6 service/ contains install script for Linux to make Enonic XP run as a service
7 system/ Default OSGi bundles are placed here.


By default, this folder structure exists inside the XP_INSTALL. It is commonly moved out or treated specially from the rest of the files and folders in XP_INSTALL, as it contains stateful data. An example of this is when using Enonic CLI. Each "sandbox" created is basically a copy of the XP_HOME structure.

You may override the default location of XP_HOME by passing a boot parameter to XP, or by creating an XP_HOME environment variable.

Folders marked with * will not appear until XP is started the first time
Standard folder structure
|- config/  (1)
|- data/ *  (2)
   |- dump/
   |- export/
|- deploy/  (3)
|- logs/  (4)
|- repo/ *
   |- index/  (5)
   |- blob/  (6)
|- snapshots/ *  (7)
|- work/ *  (8)
1 config/ holds all configuration files, including vhost.cfg and system.properties. XP supports hot reloading of all files ending with .cfg
2 data/ Contains system dumps and exports.
Should be mounted to a dedicated volume as usage may grow quickly, and exceed the size of the live repo data. Clusters should use a shared volume.
3 deploy/ Apps placed here are automatically loaded and started on the specific node.
4 logs/ default output location for all logs.
5 repo/index/ contains repository metadata and indexes
Requires a local persisted volume (Preferably using SSD). Must never be mapped to a shared volume. The content is automatically replicated across nodes in the cluster.
6 repo/blob/ contains the XP blobstore
Requires a persisted volume. For clusters, this must be a shared volume, accessible by all nodes.
7 snapshots/ Location where snapshots (of index and metadata) are stored when using the snapshot-operation.
For clusters, this must be mounted to a shared volume, accessible by all nodes.
8 work/ Cache and generated bundles (apps etc) are stored here.
For optimal performance ,mount this to a local persisted volume. Caches do not need to be re-generated after each restart.*