You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

Hello good people. In this article, we’ll have a look at how to install Jenkins server on Ubuntu 18.04 with codename Bionic Beaver. We’ll install the latest version of Jenkins on Ubuntu Bionic Beaver.

Jenkins is an open source automation server written in Java that was designed to automate repetitive tasks that are often encountered in continuous integration and delivery of software.

For Arch Linux: How to Install and Configure Jenkins on Arch Linux

For CentOS 7: How to install Jenkins Server Stable on CentOS 7

For Docker Container: Running Jenkins Server in Docker Container with Systemd

Installation of Jenkins on Ubuntu 18.04  Bionic Beaver can be done from Ubuntu packages or by downloading and running its Web application ARchive (WAR) file. The most preferred method of installing Jenkins on Ubuntu 18.04 is from apt repository.

Install Jenkins on Ubuntu 18.04 – Prerequisites:

  • Minimum of 1gb ram
  • Update Ubuntu 18.04 server
  • A user with sudo privileges

Install Jenkins on Ubuntu 18.04 ( Bionic Beaver ) – Steps

Let’s start the installation of by doing a system update and upgrade:

$ sudo apt-get update
Get:1 bionic-security InRelease [83.2 kB]
Hit:2 bionic InRelease 
Get:3 bionic-updates InRelease [83.2 kB]
Get:4 bionic-backports InRelease [74.6 kB]
Get:5 bionic-updates/main amd64 Packages [119 kB]
Get:6 bionic-updates/universe amd64 Packages [79.8 kB]
Fetched 440 kB in 2s (224 kB/s)
Reading package lists... Done

$ sudo apt-get upgrade

You may need to reboot your system before you can proceed since system upgrade may update the kernel.

Add Jenkins repository to Ubuntu 18;04

The version of Jenkins available on Ubuntu 18.04 is older than the upstream version, we’ll use the project-maintained packages to install Jenkins. Add repository key using the command:

wget -q -O - | sudo apt-key add -

Once the key has been added, We need to add Jenkins stable Debian package repository

echo "deb binary/" | sudo tee /etc/apt/sources.list.d/jenkins.list

Then update the apt packages index:

$ sudo apt-get update
Hit:1 bionic-security InRelease
Hit:2 bionic InRelease 
Hit:3 bionic-updates InRelease 
Hit:4 bionic-backports InRelease 
Ign:5 binary/ InRelease 
Get:6 binary/ Release [2042 B] 
Get:7 binary/ Release.gpg [181 B]
Get:8 binary/ Packages [12.9 kB]
Fetched 15.1 kB in 1s (17.6 kB/s) 
Reading package lists... Done

Once this is done, install openjdk-8-jdk since Jenkins doesn’t work fine with java 9

sudo apt-get install openjdk-8-jdk

If you have more than one version of Java JDK installed, you can select version 8 as default using the command:

$ sudo update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java):
Nothing to configure.

Then install Jenkins

sudo apt-get install jenkins

Configure Firewall

If you happen to be using ufw firewall for Ubuntu, open port 8080 on the firewall

$ sudo  ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
[email protected]:~# ufw allow 8080
Rule added
Rule added (v6)
[email protected]:~# ufw status
Status: active

To                         Action      From
--                         ------      ----
8080                       ALLOW       Anywhere                  
8080 (v6)                  ALLOW       Anywhere (v6)             

$ sudo ufw allow ssh
Rule added
Rule added (v6)

$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
8080                       ALLOW       Anywhere                  
22/tcp                     ALLOW       Anywhere                  
8080 (v6)                  ALLOW       Anywhere (v6)             
22/tcp (v6)                ALLOW       Anywhere (v6)

Configuring Jenkins on Ubuntu 18.04

To set up Jenkins installation, visit port  8080 on your server address – domain or IP Address.


The first screen will show the “Unlock Jenkins” message. This indicates the location of the initial password.

unlock jenkins centos7 min

Copy Password file:

# cat /var/lib/jenkins/secrets/initialAdminPassword

Enter the password on Administrator Password box and click continue. The next page will ask you to install recommended plugins or plugins that suit your desired Jenkins usage. if not sure, select installation of recommended plugins.

install jenkins ubuntu 18.04 02

The next page is on setting your login user account:

install jenkins ubuntu 18.04 03

FInish and log in to Jenkins Dashboard to start administering it.

install jenkins ubuntu 18.04 ready

Also check:

How to Manage Users and Roles in Jenkins

Configure Jenkins behind Nginx reverse proxy and Let’s Encrypt SSL

How to Configure Jenkins FreeIPA LDAP Authentication

As an appreciation for the content we put out,
we would be thrilled if you support us!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here