How to relocate the attachments storage directory

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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:

        <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


tip/resting Created with Sketch.

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.

Last modified on Feb 17, 2023

Was this helpful?

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