Instance Storage (local)

Last Updated: Sep 19, 2022
documentation for the dotCMS Content Management System

dotCMS automatically creates and manages several types of data on a per instance basis. This data includes:

  • The server_id which is a unique id that maps a dotCMS instance to it's assigned license key and place in the cluster.
  • The local H2 disk cache
  • Optionally, the local generated image cache of the transformed and resized images (depends on setting the property DOTGENERATED_DEFAULT_PATH=local).

Instance data is intended to be fast, temporary storage, live locally on each dotCMS instance and should NOT be mounted via a network mount. In the dotCMS container, instance data is stored in the /data/local folder in the webroot of the dotCMS installation, e.g. /data/local/dotsecure.

Fresh Starts and Deleting Instance Data

The instance data directory does not exist on new dotCMS instances and can be safely deleted when the dotCMS is down, as it will be (re)created on any dotCMS instance restart. When starting with a an empty instance data folder, your server will automatically be assigned a new server_id and thus have a new place in your dotCMS cluster. Because there is a one to one relationship between the server_id and available license keys, when deleting this directory and restarting the node it can take dotCMS up to 10 minutes to realize the cluster has changed and reapply the license key. You can avoid this delay by:

  1. Having free licenses available in your cluster - say 2x as many license as nodes you intend to run or by
  2. logging into the dotCMS, going to Control Panel > Configuration > Network and manually removing the old server_id from the cluster and assigning the license to the new server_id.

Instance Storage in Containers (Not common)

You can override the instance storage of your container by mounting a directory to /data/local. This will force all instance information to be written to the mounted directory. Because dotCMS stores a local disk cache in the instance storage, in some cases, where container based storage is slow, it might make sense to map /data/local to a fast filesystem that can provide temporary storage.

Changing the Location of Instance Data Directory (Deprecaited)

You may change the location where instance data is stored by changing the DYNAMIC_CONTENT_PATH property (not recommended to do this). To store your instance data in a different location, uncomment and set the value of this property in the dotmarketing-config.properties file or by setting the environmental variable DOT_DYNAMIC_CONTENT_PATH. It is important that the dotCMS application (e.g. the user account which is used to run dotCMS) has full permissions to the specified folder and all subfolders within it. Insufficient permissions on the instance data folder will prevent proper operation of dotCMS, and may cause log errors, run-time errors, or application crashes.

On this page

×

We Dig Feedback

Selected excerpt:

×