how to stop confluence (from linux command line)

how I can stop (and restart) the confluence (tomcat?) from command line on Linux?

4 answers

Hi Calogero

Simply go to you confluence installation directory, find the bin directory and there you'll find several .sh scripts. Simply execute ./ or ./

you can use ps -af | grep confluence to see if the process has actually been gracefully shut down.

If this didn't happen after a few minutes you can kill the process by noting down the process id you can find using the above ps command and execute kill <processid>, be aware that this will not gracefully shut down your instance.

Best regards,


2 votes

Hi Calogero,

The following is the script mentioned by Peter Kramp on previous message:

# Confluence Linux service controller script
cd "/opt/atlassian/confluence/bin"
case "$1" in
        sleep 5
        PID=`ps aux | grep java | grep confluence | awk '{print $2}'`
        if test -z $PID
        echo "Confluence is down..."
        echo "Confluence is running... PID $PID"
        echo "Usage: $0 {start|stop|restart|status}"
        exit 1

I would kindly ask you to create a file called "" and paste the above into it. Please, replace the following:

  1. Under line 3, replace "/opt/atlassian/confluence/bin" with the full path to your <confluence-install>/bin directory

Please, make sure the "" file has executable rights. In order to acchieve that, please run the following command from the directory where the file is located:

chmod a+x

In order to run the file, please use the following commands under the directory where the same is located:

# start confluence
./ start

# stop confluence
./ stop

# restart confluence
./ restart

# confluence's status
./ status

After running the command to stop, I would kindly ask you to run the command status to make sure Confluence is down. Please, notice that it might take a while to bring Confluence down, so be patience.

If even after a minute or so your Confluence instance continues on running, you can run the following command from your terminal:

# replace PID with "Confluence is running... PID $PID" given
# e.g.: "Confluence is running... PID 1234"
kill -9 1234

As Peter Van de Voorde has mentioned, this would be your last resource to stop Confluence.

Kind regards,


Don't use the script. It is old.

Please use the script. - it is newer (and i.m.o. much better)


At the page's bottom you will find a VERY simple init script from Félix Martineau

when I try to stop confluence I get this:

./ stop
executing using dedicated user
If you encounter issues starting up Confluence, please see the Installation guide at

Server startup logs are located in /project/confluence/logs/catalina.out
Using CATALINA_BASE: /project/confluence
Using CATALINA_HOME: /project/confluence
Using CATALINA_TMPDIR: /project/confluence/temp
Using JRE_HOME: /project/confluence/jre/
Using CLASSPATH: /project/confluence/bin/bootstrap.jar:/project/confluence/bin/tomcat-juli.jar
Using CATALINA_PID: /project/confluence/work/
PID file found but no matching process was found. Stop aborted.
[root@ip-10-162-1-10 bin]#

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in New to Confluence

How to use Confluence Cloud for stakeholder management

Most of us don’t need much convincing that stakeholder management is important. It just makes sense that keeping everyone in-the-know on projects and assigning clearly defined roles is key to having ...

1,034 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you