To get the latest and greatest features in JIRA, please upgrade to JIRA Software. Visit the Migration Hub for more information.

Starting JIRA Automatically on Linux

Linux/Solaris system administration is outside the scope of Atlassian support. This page is provided for your information only.

On Linux/Solaris, the best practice is to install, configure and run each service (including JIRA) as a dedicated user with only the permissions they require.

To install, configure and get JIRA to start automatically on Linux/Solaris:

  1. Create a jira user account which will be used to run JIRA. For example, enter the following at a Linux/Solaris console:

    sudo useradd --create-home -c "JIRA role account" jira
  2. Create a directory into which JIRA will be installed. For example:

    sudo mkdir /opt/atlassian/jira
    sudo chown jira: /opt/atlassian/jira
  3. Log in as the jira user to install JIRA:

    sudo su - jira
  4. Assuming you downloaded the JIRA from a 'tar.gz' archive, you need to extract it:

    cd /opt/atlassian/jira
    tar zxvf /tmp/atlassian-jira-X.Y.tar.gz
    ln -s atlassian-jira-X.Y/ current
  5. Edit current/atlassian-jira/WEB-INF/classes/ and set jira.home=/var/atlassian/application-data/jira
  6. Then back as root, create the file /etc/init.d/jira (code shown below), which will be responsible for starting up JIRA after a reboot (or when manually invoked).

  7. Make the init script executable:

    chmod \+x /etc/init.d/jira
  8. Place symlinks in the run-level directories to start and stop this script automatically.

    1. For Debian-based systems:

      update-rc.d jira defaults

      The following commands will be executed to place symlinks in the run-level directories:

      Adding system startup for /etc/init.d/jira ...
         /etc/rc0.d/K20jira -> ../init.d/jira
         /etc/rc1.d/K20jira -> ../init.d/jira
         /etc/rc6.d/K20jira -> ../init.d/jira
         /etc/rc2.d/S20jira -> ../init.d/jira
         /etc/rc3.d/S20jira -> ../init.d/jira
         /etc/rc4.d/S20jira -> ../init.d/jira
         /etc/rc5.d/S20jira -> ../init.d/jira
    2. For RedHat-based systems:

      the init.d script contains chkconfig settings

      sudo /sbin/chkconfig --add jira
  9. Ensure the script is executed in the correct order, in particular after the database startup script.

Thank you for this information

Thank you to Matthew Block and Pete Toscano for the original comments that we based this information on.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

20 Archived comments

  1. User avatar

    Othello Nagano

    Found some typos:

    In start)

    BF: /bin/su -m $USER -c "cd $BASE/logs && $BIN/bin/ &> /dev/null"

    AF: /bin/su -m $USER -c "cd $BASE/logs && $BASE/bin/ &> /dev/null"

    In stop)

    BF: /bin/su -m $USER -c "$BASE/ &> /dev/null"

    AF: /bin/su -m $USER -c "$BASE/bin/ &> /dev/null"

    18 Mar 2010
    1. User avatar

      Julius Blank

      After doing the setup on my box I'd like to add some precision:

      to get the script LSB-conform on a debian system you should replace the header:



      This info is in case you have a MySQL db running with JIRA. the important point is that the machine should start mysql before JIRA.

      Afterwards the command

      works fine :-)

      PS Please correct me if I'm wrong ;) I'm not entirely sure whether all the mentioned services are required...

      PPS Here's some more info on LSB and init scripts:

      05 Apr 2011
  2. User avatar

    Rosie Jameson [Atlassian]

    Thank you — we will investigate. Please see

    18 Mar 2010
  3. User avatar

    Daniel Harvey

    Recent versions of Ubuntu are using upstart in place of the older System-V init.

    Here is my /etc/init/jira.conf in case you're interested:

    Note that I use upstart dependencies to ensure that Crowd is started first; see here.

    25 Mar 2010
  4. User avatar

    Barrie Treloar

    I've cobbled together an opensolaris smf manifest.
    It works for me.
    Whether its stable/suitable is another question.
    I dont know what I was doing when building it but it is working so far.

    25 Apr 2010
    1. User avatar

      Enrico Maria Crisostomo

      A Solaris SMF manifest often needs to be fine tuned: in this case, for example, you're relying on two dependencies that are not part of a Solaris 10 standard installation such as MySQL (from the manifest, I infer that you installed it from Blastwave or OpenCSW) and the service called "jira-unlock" that you don't specify further.

      I blogged about it: in this post you'll find a SMF with a dependency with a Solaris-bundled PostgreSQL instance. The post might be useful if you wanted to understand the basics of SMF and writing a manifest of your own.

      19 Dec 2010
  5. User avatar

    Gilberto Cézar de Almeida

    I've adapted the /etc/init.d/jira script to work on a Gentoo Linux distribution. Create the script with following content:

    # Copyright 1999-2011 Gentoo Foundation
    # Distributed under the terms of the GNU General Public License v2
    # $Header: $
    # Define some variables
    # Name of app ( JIRA, Confluence, etc )
    # Name of the user to run as
    # Location of application's bin directory
    # Location of Java JDK
    export JAVA_HOME=/etc/java-config-2/current-system-vm
    depend() {
        need net
    start() {
        ebegin "Starting ${APP}"
        /bin/su -m ${USER} -c "cd ${BASE}/logs && ${BASE}/bin/ &> /dev/null"
        eend $?
    stop() {
        ebegin "Stopping ${APP}"
        /bin/su -m ${USER} -c "${BASE}/bin/ &> /dev/null"
        eend $?

    After create the file, execute the following command:

     rc-update add jira default
    01 Mar 2011
  6. User avatar

    Sander Brienen [Avisi]

    Debian-based systems (among others) use the LSB system for init scripts. Below are the LSB headers for jira:

    23 Mar 2011
  7. User avatar


    thanks worked fine for me.

    22 Aug 2011
  8. User avatar


    With the latest releases (4.4.x) should this now be using rather than  Should there be any other changes?

    02 Nov 2011
  9. User avatar


    I was having trouble getting the startup script above to work after manually upgrading to 5.0 from 4.2.1. The script at the top of the page worked for me before...

    I noticed that a very simple script ships with the 5.0 bin installer. The script below worked for me on Centos Linux.


    # JIRA Linux service controller script
    cd "/usr/local/atlassian-jira-5.0-standalone/bin"
    case "$1" in
            echo "Usage: $0 {start|stop}"
            exit 1






    11 Mar 2012
    1. User avatar


      The init.d script that ships with JIRA 5.0.3 is missing the chkconfig settings.

      Adding them back in (from the original startup script) after line 1...

      # JIRA startup script
      #chkconfig: 2345 80 05
      #description: JIRA

      ...lets the chkconfig add command work again:

      sudo /sbin/chkconfig --add jira
      23 Apr 2012
  10. User avatar

    Paolo Compieta

    Our JIRA instance wasn't always going down within 5 seconds, so we added a "stop-wait" goal as follows:

    Restart with Stop-Wait



    24 Jul 2012
    1. User avatar


      Thank you very much!!
      This is exactly what I was looking for.

      07 Mar 2013
  11. User avatar

    Kevin Ross

    I felt like these were all missing something, namely a status method, a confident stop method, and a check to avoid duplicate processes on start.  This script will also work for jira, confluence, bamboo, etc with minimal var modifications.  Thanks to the others for ideas and script code, I think I've combined most of them.  This script is running on Ubuntu 12.04.  I see where it can be a little cleaner but it works for me so I'm moving on.


    28 May 2013
  12. User avatar

    David Gannon

    On Unix and Linux systems, it is best practice to set the shell for service accounts to an invalid shell such as /dev/null or /sbin/nologin. If you do that, you need to tweak the "su" command to include a valid shell. Like this:

    /bin/su -s /bin/sh -m $USER -c "$BASE/bin/ &> /dev/null"

    Also, if you're running SELinux, you might have to use /sbin/runuser instead of /bin/su. You can handle that like this

    if [ -x "/sbin/runuser" ]; then
         SU="/sbin/runuser -s /bin/sh"
         SU="/bin/su -s /bin/sh"

    Then the line  to start becomes 

    $SU -m $USER -c "$BASE/bin/ &> /dev/null"

    05 Jun 2013
  13. User avatar


    What is this line for? Why in /var/atlassian/application-data/jira?
    1. Edit current/atlassian-jira/WEB-INF/classes/ and setjira.home=/var/atlassian/application-data/jira
    30 Aug 2013
  14. User avatar

    admin D

    This script worked fine for me with out any errors.(In centos 6.4)

    #!/bin/sh -e

    # JIRA startup script

    #chkconfig: 2345 80 05

    #description: JIRA


    # Define some variables

    # Name of app ( JIRA, Confluence, etc )


    # Location of application's bin directory


    # Location of Java JDK


    case "$1" in

      # Start command


        echo "Starting $APP"

        $BASE/bin/ &> /dev/null


      # Stop command


        echo "Stopping $APP"

        $BASE/bin/ &> /dev/null

        echo "$APP stopped successfully"


       # Stop-Wait command


        echo "Stopping $APP, waiting for actual termination"


        while [  $COUNTER -gt 0 ]; do

            $BASE/bin/ &> /dev/null

            sleep 1

            COUNTER=$(ps aux | grep "[c]atalina.base=$BASE" | wc -l)


        echo "$APP stopped successfully"


       # Restart command


         $0 stop-wait

         $0 start   



        echo "Usage: /etc/init.d/$APP {start|restart|stop}"

        exit 1



    exit 0

    07 Jan 2014
  15. User avatar

    Joel Low

    I have improved Daniel Harvey's script further, this one properly tracks JIRA's start up and only completes startup after the server is ready to serve requests. Shutdown is also cleaner (his script occasionally gave me JiraLockedErrors) because we are directly calling, upstart properly tracks the pid of the server.

    02 Aug 2014
  16. User avatar

    Fauzi Gomez

    Using a systemctl script and atlassian-jira-6.3.9-standalone



    tested on

    03 Nov 2014
Powered by Confluence and Scroll Viewport