Confluence Home and other important directories

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Confluence installation directory

The 'Confluence Installation directory' is the directory where Confluence was installed. This directory is also sometimes called the 'Confluence Install directory'.

Important files in the installation directory:

  • bin/setenv.bat or bin/setenv.sh
    This file is used to edit CATALINA_OPTS memory and garbage collection settings and define system properties. 
  • confluence/WEB-INF/classes/confluence-init.properties 
    This file contains the location of the Confluence Home directory. 

On this page:

Confluence home directory

The Confluence Home directory is the folder where Confluence stores its configuration information, search indexes and page attachments. Another term for 'Home directory' would be 'data directory'. We also refer to this as the 'local home directory' in Data Center.

Finding the Confluence home directory

The Confluence home directory is where Confluence stores its node-specific configuration and data. This location is stored in the confluence-init.properties file, which is located in the confluence/WEB-INF/classes directory of your Confluence Installation directory. 

When Confluence is running you can find the location of the home directory in Administration menu , then General Configuration. > System Information > Confluence

Shared home directory

The shared home directory is where Confluence stores its shared configuration and data for running in a clustered environment. A subdirectory called shared-home is created in your Confluence home directory when you install Confluence. If you move to a clustered setup, you'll move the contents of this directory to a separate shared home directory that is accessible to all nodes.

Finding the shared home directory

If you're using Confluence Data Center in a cluster, the shared home will be an explicitly defined separate directory that is accessible to all nodes. The location of your shared home directory can be found in your <local-home>/confluence.cfg.xml file in the confluence.cluster.home property.

If you are using a non-clustered environment, the shared home will be found under <confluence-home>/shared-home/.

Some configuration instructions cover both clustered and non-clustered environments; you might see <shared-home> to represent both. Note that the table below shows the exact locations of files and directories for both clustered and no-clustered environments.

Important files and directories

The Confluence home directory contains some of the configuration data used by Confluence. This section outlines the purpose of the files and directories in the Confluence home directory.

File or directoryClusteredNon-clusteredPurpose

confluence.cfg.xml

<confluence-home>/confluence.cfg.xml

<shared-home>/confluence.cfg.xml

<confluence-home>/confluence.cfg.xml

<confluence-home>/shared-home/confluence.cfg.xml

This file contains all of the information necessary for Confluence to start up, such as:

  • Product license
  • Context path
  • Database details, such as location and connection pool settings
  • Paths to important directories

attachments/

<shared-home>/attachments

<confluence-home>/attachments/

This directory contains every version of each attachment stored in Confluence. 

You can specify an alternative directory for attachment storage by setting the attachments.dir property in confluence.cfg.xml.

In Data Center this directory is usually found in the Shared Home directory.

This directory won't be used if S3 object storage is configured.

backups/

<shared-home>/backups/

<confluence-home>/backups/

Confluence will place its daily backup archives in this directory. Backup files in this directory take the following form daily-backup-YYYY_MM_DD.zip

You can specify an alternative directory for backups by setting the daily.backup.dir property in confluence.cfg.xml.

In Data Center this directory is usually found in the Shared Home directory.

bundled-plugins/

<confluence-home>/bundled-plugins/

<confluence-home>/bundled-plugins/

Confluence includes a set of bundled plugins. The bundled-plugins directory is where Confluence will unpack its bundled plugins when it starts up. This directory is refreshed on every restart, so removing a plugin from this directory will not uninstall the plugin, as it will be replaced the next time Confluence starts up. 

database/

N/A

<confluence-home>/database/

This is where Confluence stores its database when configured to run with the Embedded H2 Database. In such cases this directory contains all Confluence runtime data. Installations configured to run using an external database such as MySQL will not use this directory.

The H2 database is provided for evaluating Confluence and is not supported as a production database. 

index/

<confluence-home>/index/

<confluence-home>/index/

The Confluence index is heavily used by the application for content searching and recently updated lists and is critical for a running Confluence instance. If data in this directory is lost or corrupted, it can be restored by running a full reindex from within Confluence. This process can take a long time depending on how much data is stored Confluence's database.

An alternative directory may be specified for the index by setting the lucene.index.dir property in confluence.cfg.xml. 

journal/

<confluence-home>/journal/

<confluence-home>/journal/

Entries are added to the journal when changes occur (such as a comment, like, new page). Journal entries are then processed and the entries added to the index (about every 5 seconds). In a cluster, the journal keeps the indexes on each node in sync.
logs/

<confluence-home>/logs/

<confluence-home>/logs/

Confluence's application logs are stored in this directory.

plugin-cache/

<confluence-home>/plugin-cache/

<confluence-home>/plugin-cache/

All Confluence plugins are stored in the database. To allow for quicker access to classes contained within the plugin JARs, Confluence will cache these plugins in the plugin-cache directory. This directory is updated as plugins are installed and uninstalled from the system and is completely repopulated from the database every time Confluence is restarted. Removing plugins from this directory does not uninstall them.

secured/

<shared-home>/secured/

<confluence-home>/shared-home/secured/

Confluence's secured data.

secrets-config.yaml

<shared-home>/secrets-config.yaml

<confluence-home>/shared-home/secrets-config.yaml

This file contains all of the information necessary for Confluence to successfully secure & retrieve secret data.

temp/

<confluence-home>/temp/

<confluence-home>/temp/

The temp directory is used for runtime functions such as exporting, importing, file upload and indexing. Files in this directory are temporary and can be safely removed when Confluence is offline. A daily job within Confluence deletes files that are no longer needed.

You can specify a different temp directory location, if necessary. Edit <confluence-home>/confluence.cfg.xml and set the new location in the webwork.multipart.saveDir property. Your new location can't be in the installation directory, as this will cause some functions, such as download, to fail. We recommend you keep the temp directory in the local home directory.

thumbnails/

<shared-home>/thumbnails/

<confluence-home>/thumbnails/

Stores temporary files for image thumbnails. This directory is essentially a thumbnail cache, and files deleted from this directory will be regenerated the next time the image is accessed.

In Data Center this directory is usually found in the Shared Home directory.

restore/site/

<shared-home>/restore/site/

<confluence-home>/restore/site/

Confluence will save site backups generated in the administration console in this directory. See Back up a Site for more information.

If you Restore a Site via the administration console, you can select to import a file from this location.

In Data Center this directory is usually found in the Shared Home directory.

restore/space/

<shared-home>/restore/space/

<confluence-home>/restore/space/

Confluence will save single space and multi-space backups generated from the administration console in this directory. See Back up a space or multiple spaces for more information.

Confluence will also save XML backups done via Space tools in this directory. See Export Content to Word, PDF, HTML and XML for more information. 

If you Restore a Space in the admin console, you can select to import a file from this location.

In Data Center this directory is usually found in the Shared Home directory.

Changing the location of the home directory

When Confluence first starts up, it reads the confluence-init.properties file to determine where to look for the Home directory. 

To change the location of the home directory edit the confluence.home property in the confluence-init.properties file as follows:

  • Windows 
    In Windows, the path C:\confluence\data would be written as:
    confluence.home=C:/confluence/data  
    Note that all backslashes (\) are written as forward slashes (/)
  • Linux 
    On any Linux-based system, the property is defined using the normal directory syntax: 
    confluence.home=/var/confluence/

There can be no symbolic links within the Confluence home directory. You must define an absolute path. If disk space is an issue, place the entire confluence.home directory on a disk partition where there is enough space. The absolute path of generated files (such as exports) is compared with the absolute path of the confluence.home directory when constructing URLs. When a sub-directory has a different path, the URL will be incorrect, and you may receive "Page not found" errors. These measures are in place to prevent "directory traversal" attacks.

Fixing the Confluence configuration

The Confluence configuration file: confluence-cfg.xml inside the home directory may contain references to the original location of your Confluence home. You will need to edit this file to update these references to also point to the new location. The two properties in this file that need to change are:

  • daily.backup.dir if you have not configured your backups to be placed elsewhere already
  • hibernate.connection.url if you are using the embedded HSQL database.

Database

All other data, including page content, is kept in the database. If you installed Confluence as a trial, the database will store its files under database/ in the Confluence Home directory. Otherwise, the database management system you are connecting to is responsible for where and how your remaining data is stored.

Temp directory (installation directory)

The temp directory is configured in the Java runtime and some Confluence components write temporary files or lockfiles into this directory.

The temp directory is located in the installation directory as /temp.

To change the location of this directory, start the Java Virtual Machine in which confluence is running with the argument:

-Djava.io.tmpdir=/path/to/your/own/temp/directory.

(warning) Note: this is not the same as the temp directory in Confluence Home where exports, for example, are saved. See the table above to find out how to change the location of the <confluence-home>/temp directory. 

There's a known issue with setting a temp directory in Confluence. See  CONFSERVER-59613 - Getting issue details... STATUS .

Last modified on Oct 3, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.