Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Running Jira as a Windows Service with %JIRA_HOME% Environment Variable

Paul Boyer June 12, 2025

Have any other Windows Server sys admins been able to successfully install Jira as a service where the Jira home directory is specified as the JIRA_HOME Windows environment variable?

I clearly have it set in the system environment variables on my Windows Sever as documented as a supported (and recommended) method of specifying the home directory path by Atlassian. 

Installing Jira applications on Windows | Administering Jira applications Data Center 10.3 | Atlassian Documentation

Startup check: Setting your JIRA home | Jira and Jira Service Management | Atlassian Support

2025-06-12 10_26_54-WSB-AS-JIRADEV2.grainger.bus.wisc.edu - Remote Desktop Connection Manager - Sysi.png

When Jira runs in the foreground (via the start.jira.bat file), the variable is picked up by the process and the application is able to start. However, when I install the service the variable is no longer evaluated. I was running the service under the Network Service account, but also wasn't able to get the variable to resolve when running it as a domain user account.

What am I missing here? TIA

 

1 answer

0 votes
Ash Yadav
Community Champion
June 15, 2025

Hey @Paul Boyer 

 

Running Jira on Windows from experience has been a colossal pain in the... you know :) 

That being said, from memory I only encountered this issue during major version upgrades, and in many of these cases it was something to do with the service/folder ownership permissions. If the user who installed the service != to the user executing the service it can cause issues, bizarre I know but worth a gander. 

 

KR, 

Ash

Paul Boyer June 16, 2025

Hi Ash,

Thanks for chiming in. I inspected the <install dir>\bin\service.bat script provided by Atlassian to install the Windows service. There is no reference to the %JIRA_HOME% variable in the script, so that makes me think that it isn't related to which user installs the service / which user the service runs as.

So long as the environment variable is set at the system level (not user level) then any new instance of cmd.exe should inherit that variable. As a test, I've set the %JIRA_HOME% variable at the system level using my administrator account. Then using PsExec I launched a new cmd.exe session as NT AUTHORITY\NETWORK SERVICE.

PsExec.exe -i -u "NT Authority\Network Service" cmd.exe

As you can see in the screenshot below the %JIRA_HOME% variable is available.

cmd.png

I've also confirmed that the NT AUTHORITY\NETWORK SERVICE security principal has full access to the Jira home directory to eliminate ACLs being an issue.

cmd2.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
10.3.7
TAGS
AUG Leaders

Atlassian Community Events