This article is for those looking for a detailed and straightforward guide on installing Confluence on Ubuntu Server.

Confluence is a collaboration tool that helps teams collaborate and share knowledge effectively.

In this guide, we will consider the case when you already have a server with the Ubuntu Server 22.04 LTS operating system installed on it.

You can read more about how to install Ubuntu Server 22.04 LTS in my guide “Install Ubuntu Server 22.04 LTS”.

In addition, OpenSSH must be installed on the server, and port 22 must be open in order to be able to connect to the server using the SSH protocol.

To install OpenSSH on a server, you can use the command:

sudo apt install openssh-server

If you plan to connect to the server using the Windows operating system, you can use PuTTY or MobaXterm.

This guide describes how to connect to a server using the iTerm2 terminal emulator installed on the macOS operating system.

Please note that you will need to open the following TCP ports to access your server:

  • TCP port 80 - to receive a free cryptographic certificate through the Let’s Encrypt CA.
  • TCP port 443 - to access the Confluence web interface.
  • TCP port 8090 - to access the Confluence web interface.

We connect to the server on which you plan to install Confluence.

Update the local package index to the latest changes in the repositories using the command:

sudo apt update

Install Confluence on Ubuntu Server

This tutorial walks you through obtaining a free cryptographic certificate through the Let’s Encrypt CA. To obtain and subsequently renew a free SSL certificate, we will use the Certbot software client, which is designed to make it as easy as possible to obtain and renew a certificate through the Let’s Encrypt certification authority.

Now let’s install the packages required for Confluence to work using the command:

sudo apt install -y postgresql apache2 apt-transport-https certbot python3-certbot-apache fontconfig

Please note that in this tutorial, PostgreSQL will be used as a database management system, and Apache will be used as a webserver.

Install Confluence on Ubuntu Server

Let’s configure Apache for further work with Confluence.

We enable the Apache webserver module called “proxy_http” using the command:

sudo a2enmod proxy_http

Please note that the “proxy_http” module acts like a proxy server for the HTTP and HTTPS protocols.

Install Confluence on Ubuntu Server

We enable the Apache webserver module called “rewrite” using the command:

sudo a2enmod rewrite

Note that the “rewrite” module is one of the most commonly used modules in the Apache webserver and provides a flexible and powerful way to manipulate URLs.

Install Confluence on Ubuntu Server

Now you need to create two virtual host files (called a block in Nginx), with which Confluence will work in the future.

You will need two virtual host files to provide HTTPS access to Confluence, and to enable Confluence at https://confluence.heyvaldemar.net, without specifying port 8090 in your browser address bar.

In this tutorial, you will use the confluence.heyvaldemar.net subdomain to access Confluence from the Internet. You will need to specify your domain or subdomain under which your Confluence will be accessible from the Internet.

Let’s create the first virtual host file using a text editor using the command:

sudo vim /etc/apache2/sites-available/confluence.heyvaldemar.net.conf

Install Confluence on Ubuntu Server

Hit the “i” button to go into edit mode, then insert the following configuration for the webserver to work.

In this tutorial, you will use the confluence.heyvaldemar.net subdomain to access Confluence from the Internet. You will need to specify your domain or subdomain under which your Confluence will be accessible from the Internet.

Install Confluence on Ubuntu Server

Now press the “Esc” button to exit edit mode, then type “:x” and press the “Enter” button to save your changes and exit the editor.

Install Confluence on Ubuntu Server

Let’s create a second virtual host file using a text editor using the command:

sudo vim /etc/apache2/sites-available/confluence.heyvaldemar.net-ssl.conf

Install Confluence on Ubuntu Server

Hit the “i” button to go into edit mode, then insert the following configuration for the webserver to work.

In this tutorial, you will use the confluence.heyvaldemar.net subdomain to access Confluence from the Internet. You will need to specify your domain or subdomain under which your Confluence will be accessible from the Internet.

Install Confluence on Ubuntu Server

Now press the “Esc” button to exit edit mode, then type “:x” and press the “Enter” button to save your changes and exit the editor.

Install Confluence on Ubuntu Server

We activate the first virtual host using the command:

sudo a2ensite confluence.heyvaldemar.net.conf

Install Confluence on Ubuntu Server

We activate the second virtual host using the command:

sudo a2ensite confluence.heyvaldemar.net-ssl.conf

Install Confluence on Ubuntu Server

Deactivate the default virtual host using the command:

sudo a2dissite 000-default.conf

Install Confluence on Ubuntu Server

Verify that there are no errors in the syntax of the new Apache config file using the command:

sudo apache2ctl configtest

Install Confluence on Ubuntu Server

Restart Apache to apply the changes made using the command:

sudo systemctl restart apache2

Install Confluence on Ubuntu Server

Let’s check that Apache has started successfully using the command:

sudo systemctl status apache2

Install Confluence on Ubuntu Server

Now, to improve the security of your webserver, you need to obtain a cryptographic certificate for the domain or subdomain, through which the Confluence control panel will be accessible from the Internet.

To obtain and subsequently renew a free SSL certificate, we will use the Let’s Encrypt certification authority, as well as the Certbot software client, which is designed to make it as easy as possible to obtain and renew a certificate through the Let’s Encrypt certification authority.

In this tutorial, you will use the confluence.heyvaldemar.net subdomain to access Confluence from the Internet. You will need to specify your domain or subdomain under which your Confluence will be accessible from the Internet.

Request a cryptographic certificate using the command:

sudo certbot --apache -d confluence.heyvaldemar.net

Install Confluence on Ubuntu Server

Next, we indicate the email address to which Let’s Encrypt will send notifications about the expiration of the cryptographic certificate and press the “Enter” button.

Install Confluence on Ubuntu Server

The next step is to read and accept the terms of use of the services provided.

Press the button “a”, then “Enter”, if you agree with the terms of use of the services provided.

Install Confluence on Ubuntu Server

The next step is to choose whether you would like to share the above email address with the Electronic Frontier Foundation in order to receive newsletters.

Press the “n” button, then “Enter”.

Install Confluence on Ubuntu Server

At the next stage, you need to choose: do you want the parameters to be automatically added to the Apache configuration file for automatically redirecting HTTP traffic to HTTPS.

Press the button “2”, then “Enter”.

Install Confluence on Ubuntu Server

Please note that cryptographic certificates obtained through Let’s Encrypt CA are valid for ninety days. Certbot automatically adds a script to renew the certificate to the task scheduler and the script runs twice a day, automatically renewing any cryptographic certificate that expires within thirty days.

You can check the functionality of the cryptographic certificate renewal process using the command:

sudo certbot renew --dry-run

Install Confluence on Ubuntu Server

Now you need to create a database that Confluence will use in the future, as well as a user with the necessary rights in this database.

Switch to the “postgres” user who has administrator rights in PostgreSQL using the command:

sudo su - postgres

Install Confluence on Ubuntu Server

Next, switch to the PostgreSQL command line using the command:

psql

Install Confluence on Ubuntu Server

We create a new user using the command:

CREATE USER confluencedbuser WITH PASSWORD '2n!sfa@423FdsC0fH$vL';

In this tutorial, “confluencedbuser” will be used as the username, with the password “2n!sfa@423FdsC0fH$vL”.

Install Confluence on Ubuntu Server

We create a new database and grant the rights to it to the previously created user using the command:

CREATE DATABASE "confluencedb" WITH OWNER "confluencedbuser" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' TEMPLATE template0 CONNECTION LIMIT = -1;

This tutorial will use “confluencedb” as the name for the database.

Install Confluence on Ubuntu Server

Exit the “PostgreSQL” command line using the command:

\q

Install Confluence on Ubuntu Server

Log out as user “postgres” using the command:

exit

Install Confluence on Ubuntu Server

Now you need to download the Confluence installer using the command:

wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-7.12.0-x64.bin

Please note that the latest version of Confluence can be found on the official Atlassian website.

This guide covers the installation of Confluence 7.12.0.

Install Confluence on Ubuntu Server

Let’s enable execution of the file “atlassian-confluence-7.12.0-x64.bin” using the command:

sudo chmod a+x atlassian-confluence-7.12.0-x64.bin

Install Confluence on Ubuntu Server

Let’s start the Confluence installation using the command:

sudo ./atlassian-confluence-7.12.0-x64.bin

Please note that your team will differ from the one listed in this article, as you will be installing the most current version of Confluence at the time of reading.

Install Confluence on Ubuntu Server

At the first stage, the installer will warn you that Confluence will be installed on your server.

Press the “Enter” button.

Install Confluence on Ubuntu Server

Next, select “Custom Install (recommended for advanced users)”.

Press the “Enter” button.

Install Confluence on Ubuntu Server

In the next step, you can choose where to install Confluence.

This tutorial covers installing Confluence in “/opt/atlassian/confluence”.

Press the “Enter” button.

Install Confluence on Ubuntu Server

Next, you can choose where to store your Confluence data.

This tutorial covers installing Confluence in “/var/atlassian/application-data/confluence”.

Press the “Enter” button.

Install Confluence on Ubuntu Server

Now you can select the ports that Confluence will use.

This tutorial walks you through installing Confluence using port 8090 for HTTP and port 8000 for Control.

Press the “Enter” button.

Install Confluence on Ubuntu Server

Next, you will be offered the opportunity to install Confluence as a service.

Press the “Enter” button.

Install Confluence on Ubuntu Server

Confluence installation completed successfully.

Note that you do not need to run Confluence.

We indicate “n” and press the “Enter” button.

Install Confluence on Ubuntu Server

Now you need to make changes to the Confluence configuration file by opening it in a text editor using the command:

sudo vim /opt/atlassian/confluence/conf/server.xml

Install Confluence on Ubuntu Server

Hit the “i” button to go into edit mode, find the section “DEFAULT - Direct connector with no proxy, for unproxied HTTP access to Confluence” and comment it out by putting <! – on the line above the section parameters and –> below the section parameters that you want to comment out.

Install Confluence on Ubuntu Server

Next, find the section “HTTPS - Proxying Confluence via Apache or Nginx over HTTPS” and uncomment it by removing the <! – on the line above the section parameters and –> below the section parameters that you want to uncomment.

Then set the “proxyName” parameter to “confluence.heyvaldemar.net”.

In this tutorial, you will use the confluence.heyvaldemar.net subdomain to access Confluence from the Internet. You will need to specify your domain or subdomain under which your Confluence will be accessible from the Internet.

Install Confluence on Ubuntu Server

Now press the “Esc” button to exit edit mode, then type “:x” and press the “Enter” button to save your changes and exit the editor.

Install Confluence on Ubuntu Server

Launch Confluence using the command:

sudo /etc/init.d/confluence start

Install Confluence on Ubuntu Server

Open the Confluence log to check that Confluence has started correctly using the command:

sudo less /opt/atlassian/confluence/logs/catalina.out

Install Confluence on Ubuntu Server

On your keyboard, press the “Shift” and “f” keys to start monitoring the changes in the Confluence log in real-time.

Note that the message that says “Server startup in [12,548] milliseconds” indicates that Confluence has started successfully.

On the keyboard, press the key combination “Ctrl” and “c”, then “q” to close the Confluence log.

Install Confluence on Ubuntu Server

To continue the Confluence installation process, you need to go from the workstation to the link https://confluence.heyvaldemar.net, where confluence.heyvaldemar.net is the name of my server. Accordingly, you need to provide the name or IP address of your Confluence server.

This guide walks you through installing Confluence for a production environment.

Select “Production Installation” and click on the “Next” button.

Install Confluence on Ubuntu Server

Now you need to provide a license key for Confluence.

If you do not already have a license key, you can request a temporary key to try Confluence.

This guide covers installing Confluence with a temporary license key.

Click on “Get an evaluation license”.

Install Confluence on Ubuntu Server

Next, click on the “Sign up for an account” button if you do not have an Atlassian account yet.

Install Confluence on Ubuntu Server

The next step is to provide: email address, first name, last name, and password to create an Atlassian account.

Click on the “Sign up” button.

Please note that you will receive an email to the email address specified during registration. In the letter, you will find a link to complete the registration.

Install Confluence on Ubuntu Server

If you already have an Atlassian account, enter the email address associated with your Atlassian account in the “Enter email” field and click on the “Continue” button.

Install Confluence on Ubuntu Server

Specify the password for the Atlassian account and click on the “Log in” button.

Install Confluence on Ubuntu Server

In the next step, you need to specify for which product you need a temporary license key, as well as the name of your organization.

Click on the “Generate License” button to generate a temporary license key for Confluence.

Install Confluence on Ubuntu Server

Next, you need to confirm that the temporary license key for Confluence will be installed on your server.

Click on the “Yes” button.

Install Confluence on Ubuntu Server

In the “Confluence” field, insert the previously received temporary license key and click on the “Next” button.

Install Confluence on Ubuntu Server

Now you need to set up a connection to the previously created database.

Select “My own database” and click on the “Next” button.

Install Confluence on Ubuntu Server

Now you need to specify the system for database management and the previously created database that will be used to run Confluence.

In the “Database type” field, select “PostgreSQL”.

In the “Setup type” section, select “Simple”.

In this tutorial, the database for Confluence is on the same server as Confluence.

In the “Hostname” field, enter “localhost”.

In the “Database port” field, specify the value “5432”.

This tutorial uses “confluencedb” as the database name for Confluence.

Specify “confluencedb” in the “Database name” field.

This guide uses “confluencedbuser” as the username with database rights for Confluence.

In the “Username” field, specify “confluencedbuser”.

In the “Password” field, specify the password assigned to the “confluencedbuser” user.

Click on the “Test connection” button.

Install Confluence on Ubuntu Server

The message “Success! Database connected successfully.” means that all data was entered correctly.

Click on the “Next” button.

Install Confluence on Ubuntu Server

In the next step, you will be able to choose from several options: download demo content, do not download any content and start filling Confluence yourself or restore data from a backup.

This guide walks you through installing Confluence without importing any content.

Click on the “Empty Site” button.

Install Confluence on Ubuntu Server

Next, you can configure Confluence user management using Jira.

This tutorial walks you through installing Confluence without Jira’s user management capabilities.

Click on the “Manage users and groups within Confluence” button.

Install Confluence on Ubuntu Server

In the next step, you need to provide: username, name, email address, and password to create a Confluence administrator account.

Click on the “Next” button.

Install Confluence on Ubuntu Server

Everything is ready to use Confluence.

Click on the “Start” button.

Install Confluence on Ubuntu Server

Now you can create the first space, for example, for the development team, where they will work on their projects.

Specify a name for the first space and click on the “Continue” button.

Install Confluence on Ubuntu Server

Next, the editor will open, in which you can create the first page in the new space.

Click on the “Skip tutorial” button.

Install Confluence on Ubuntu Server

We fill the page with useful content so that we can later publish it in a new space.

Click on the “Publish” button.

Install Confluence on Ubuntu Server

The first page in the developer space has been successfully completed.

Please note that you can restrict access for users, both to space and to certain pages within it.

Install Confluence on Ubuntu Server


My Courses

🎓 Dive into my comprehensive IT courses designed for enthusiasts and professionals alike. Whether you’re looking to master Docker, conquer Kubernetes, or advance your DevOps skills, my courses provide a structured pathway to enhancing your technical prowess.

My Services

💼 Take a look at my service catalog and find out how we can make your technological life better. Whether it’s increasing the efficiency of your IT infrastructure, advancing your career, or expanding your technological horizons — I’m here to help you achieve your goals. From DevOps transformations to building gaming computers — let’s make your technology unparalleled!

Refill My Coffee Supplies

💖 PayPal
🏆 Patreon
💎 GitHub
🥤 BuyMeaCoffee
🍪 Ko-fi

Follow Me

🎬 YouTube
🐦 Twitter
🎨 Instagram
🐘 Mastodon
🧵 Threads
🎸 Facebook
🧊 Bluesky
🎥 TikTok
💻 LinkedIn
📣 daily.dev Squad
🧩 LeetCode
🐈 GitHub

Is this content AI-generated?

Nope! Each article is crafted by me, fueled by a deep passion for Docker and decades of IT expertise. While I employ AI to refine the grammar—ensuring the technical details are conveyed clearly—the insights, strategies, and guidance are purely my own. This approach may occasionally activate AI detectors, but you can be certain that the underlying knowledge and experiences are authentically mine.

Vladimir Mikhalev
I’m Vladimir Mikhalev, the Docker Captain, but my friends can call me Valdemar.

DevOps Community

hey 👋 If you have questions about installation or configuration, then ask me and members of our community: