How to relocate the attachments storage directory

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Purpose

There are times when the attachments directory might need to be relocated. For example, one of those times is when the disk containing that directory has run out of space.

Solution

To do this, you can either relocate the Confluence home directory, or you can relocate the attachments directory only, using the steps below:

Before proceeding, please take note of the definition of Confluence Home and other important directories.

  1. Stop Confluence

  2. Backup your entire Confluence home directory and attachments directory

  3. Move the attachments directory to the new location

  4. Edit <confluence-home>/confluence.cfg.xml by changing the attachments.dir property to point to the new location:

    1 <property name="attachments.dir">${confluenceHome}/attachments</property>

    If you use

    S3 object storage

    with Confluence Data Center, the

    attachment.dir

    property won’t work. On S3 object storage, attachments are always stored on the prefix

    /confluence/attachments

    .

  5. Start Confluence

If you still see an "Attachment File Not Found" error when downloading attachments from Confluence after the attachments storage directory has been updated to the new location, try clearing your Browser Cache.

Updated on April 16, 2025

Still need help?

The Atlassian Community is here for you.