Installing Confluence on Linux from Archive File

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

In this guide we'll run you through installing Confluence in a production environment, with an external database, manually using a zip file.

This method gives you the most control over the installation process.


Other ways to install Confluence: 

  • Evaluation - get your free trial up and running in no time.
  • Installer – install Confluence using the Linux installer. 
  • Windows – install Confluence on a Windows server. 

On this page:

Before you begin

Before you install Confluence, there are a few questions you need to answer. 


Are you using a supported operating system and Java version?
Tell me more...

Unable to render {include} The included page could not be found.

Do you want to run Confluence as a service?
Tell me more...

Running Confluence as a service means that Confluence will automatically start up when your Linux server is started.

You should use the Linux installer if you want to run Confluence as a service.

If you choose not to run Confluence as a service:

  • You will start Confluence by running the start-confluence.sh file in your Confluence installation directory.
  • We recommend creating a dedicated user to run Confluence. This user must have full read, write and execute access to the installation directory and home directory.
  • Confluence will need to be restarted manually if your server is restarted.
Are ports 8090 and 8091 available?
Tell me more...

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 859451395.

What database do you plan to use? 
Tell me more...

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 1044091858.

Do you have a Confluence license?

Tell me more...

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 1044091867.

Is your JAVA_HOME variable set correctly?
Tell me more...

Before you install Confluence, check that you're running a supported Java version and that the JAVA_HOME environment variable is set correctly.

Confluence can only run with Oracle JDK or JRE.

To check your Java version:

$ java -version

To check your JAVA_HOME variable is set correctly:

$ echo $JAVA_HOME

If you see a path to your Java installation directory, the JAVA_Home environment variable has been set correctly. If a path is not returned you'll need to set your JAVA_HOME environment variable manually before installing Confluence.

Have you created a dedicated user to run Confluence?
Tell me more...

We strongly recommend running Confluence as a dedicated user.

You should create this user before you begin, so that when creating the installation and home directories, you can give this user appropriate read and write permissions.

In this example, we'll create a user called confluence:

$ sudo /usr/sbin/useradd --create-home --comment "Account for running Confluence" --shell /bin/bash confluence

See Creating a Dedicated User Account on the Operating System to Run Confluence for more information.

There’s a known issue during setup where a load balancer (or proxy) pings the server and breaks Confluence installation or migration to Data Center. See CONFSERVER-61189 - Getting issue details... STATUS
During installation, you need to disable load balancer health checks and make sure you don’t open multiple tabs that point to the same Confluence URL.

Install Confluence

1. Download Confluence

Download the tar.gz file for your operating system - https://www.atlassian.com/software/confluence/download

2. Create the installation directory

  1. Create your installation directory – this is where Confluence will be installed. Avoid using spaces or special characters in the path. We'll refer to this directory as your <installation-directory>
     

    Show me how to do this...

    In this example we'll call our installation directory confluence:

    $ mkdir confluence
  2. Extract the Confluence tar.gz file to your <installation-directory>. We recommend using a GNU version of the archive utility, especially on Solaris.
     

    Show me how to do this...

    Change to the directory where you downloaded Confluence then execute these commands:

    $ tar -xzf atlassian-confluence-X.X.X.tar.gz -C <installation-directory>
    $ cd <installation-directory>
    $ tar -xf atlassian-confluence-X.X.X.tar

    Replace x.x.x with your Confluence version and <installation-directory> with the full path to the directory you created in the last step.

  3. Give your dedicated Confluence user read, write and execute permission to your <installation-directory>
     

    Show me how to do this...

    In this example we're changing ownership of the installation directory and giving the user confluence read, write and execute permissions.

    $ chown -R confluence <installation-directory>
    $ chmod -R u=rwx,go-rwx <installation-directory>

3. Create the home directory

  1. Create your home directory – this is where Confluence application data like logs, search indexes and files will be stored. This should be separate to your installation directory, with no spaces or special characters in the path. We'll refer to this directory as your <home-directory>
     

    Show me how to do this...

    In this example we'll call our home directory confluence-home:

    $ mkdir confluence-home
  2. Give your dedicated Confluence user read, write and execute permissions to the <home-directory>.
     

    Show me how to do this...

    In this example we're changing ownership of the home directory and giving the user confluence read, write and execute permissions.

    $ chown -R confluence <home-directory>
    $ chmod -R u=rwx,go-rwx <home-directory>
  3. Edit <installation-directory>\confluence\WEB-INF\classes\confluence-init.properties.
  4. At the bottom of the file, enter the absolute path to your <home-directory>. This tells Confluence where to find your <home-directory> when it starts up.
     

    Show me how to do this...

    You can edit the confluence.init.properties file any text editor.

    1. Scroll to the bottom of the text and find this line:

      # confluence.home=c:/confluence/data
      
    2. Remove the # and the space at the beginning of this line (so Confluence doesn't read the line as a comment) and add the absolute path to your home directory (not a symlink). For example:

      confluence.home=/var/confluence-home

4. Check the ports

By default Confluence listens on port 8090. If you have another application running on your server that uses the same ports, you'll need to tell Confluence to use a different port. 
 

Show me how to do this...

To change the ports:

  1. Edit <installation-directory>\conf\server.xml

  2. Change the Server port (8000) and the Connector port (8090) to free ports on your server.

    In the example below we've changed the Server port to 5000 and the Connector port to 5050.

    Server port="5000" shutdown="SHUTDOWN" debug="0">
      <Service name="Tomcat-Standalone">
        <Connector port="5050" connectionTimeout="20000" redirectPort="8443"
            maxThreads="48" minSpareThreads="10"
            enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
            protocol="org.apache.coyote.http11.Http11NioProtocol" />

Linux won't allow you to bind to ports less than 1024. If you want to run Confluence on port 80, for example, you could use a reverse proxy to redirect traffic from port 80. See Using Apache with mod_proxy.

5. Start Confluence

  1. Run <installation-directory>/bin/start-confluence.sh to start the setup process.  
      

    Show me how to do this...

    We recommend running Confluence as your dedicated user.

    $ su -u <user>
    $ ./start-confluence.sh

    If you're using Ubuntu the command is a little different:

    $ sudo su <user>
    $ ./start-confluence.sh
  2. Go to http://localhost:8090/ to launch Confluence in your browser (change the port if you've updated the Connector port).


Trouble starting Confluence?

Set up Confluence

6. Choose installation type

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 957145912.

7. Enter your license

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 838415554.

8. Connect to your database

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 1044091860.

9. Populate your new site with content

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 838415546.

10. Choose where to manage users

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 1026054422.

11. Create your administrator account

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 941593072.

12. Start using Confluence

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 943523156.

Troubleshooting

Running into problems installing Confluence?

 Head to Installation Troubleshooting in our Knowledge Base for more help.  

Last modified on Oct 6, 2021

Was this helpful?

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