Change the attachments directory location for Jira server
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
Overview
As of JIRA 4.2, for security reasons, the ability to change the directory where attachments are stored has been removed. So, if you use any version between 4.2 and 5.1.x you'll have to manually change the attachments location property on JIRA's database. However, this won't work on any version of JIRA from 5.2 and beyond, in which this policy was enforced and JIRA will refuse saving attachments if a custom path is defined.
This document aims to provide some workarounds to be able to change the location of the attachments on any version of JIRA from 4.2 to the latest, in case you need to do so due to storage space constraints or any other reason.
Please note this may affect JIRA's performance if there's any considerable delay on reading files from another drive (if the attachments are moved to a network drive, for example).
Workaround
JIRA 5.2 and above
Create a symbolic link on your server from the default attachment path (<JIRA_HOME>/data/attachments
) to the path where you want your attachments to be stored.