home tools books contact

How to Install Jenkins on Ubuntu Server 18.04

This tutorial will show you how to install and configure Jenkins on Ubuntu Server 18.04. We will also install the Blue Ocean plugins so that you have a better UI for creating Pipelines.


What is Jenkins?

Jenkins is an automation server which allows you to setup continuous integration / continuous delivery (CI/CD) for your software development projects. Jenkins is used by DevOps teams to increase reliability of code, and to speed up software evolution.



You’ll need a physical or virtual machine (VM) with Ubuntu Server 18.04 installed. You can test the following instructions on your Windows machine by installing VMware Workstation* and creating a VM. If you’re a Mac user, you can use VMware Fusion*, which is what I used to test the steps in this tutorial.

Read: How to Create a Ubuntu Server VM with VMware Fusion.

Okay, let’s get started.


Step 1: Install Jenkins

Log into your Ubuntu Server and at the console or using SSH run the following commands:

sudo apt update
sudo apt install -y default-jdk git
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9B7D32F2D50582E6
sudo apt-get update
sudo apt-get install -y jenkins

Step 2: Unlock Jenkins

The first time you navigate to the UI, you will be asked to Unlock Jenkins by providing the default password.

Enter the IP or hostname of the Ubuntu server in a browser using port 8080.

Configure Jenkins Step 1

The image above shows the path containing the default password. Run the following command at the terminal to see it:

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

Configure Jenkins Step 2

Enter the password and click Continue.

Once you’ve entered the password, you’ll be asked to Customize Jenkins. Click the Install suggested plugins button.

Configure Jenkins Step 3

Enter login credentials for the first user then click Save and Continue.

Configure Jenkins Step 4

Enter the Jenkins URL. I’ve left it as the IP address but you’ll want to specify a domain name that will be pointed at the IP address of the server.

Configure Jenkins Step 5

Click Start using Jenkins.

Configure Jenkins Step 6


Step 3: Install the Blue Ocean Plugin

The Blue Ocean plugin is an improved user interface that makes it easier to setup pipelines. Let’s install it by clicking on Manage Jenkins.

Configure Jenkins Step 7

Click Manage Plugins.

Configure Jenkins Step 8

Click the Available tab then type Blue Ocean in the filter.

Configure Jenkins Step 9

Select all the Blue Ocean plugins.

Configure Jenkins Step 10

Scroll to the bottom and click Install without restart.

Configure Jenkins Step 11

Tick the Restart Jenkins when install is complete checkbox and wait for the plugins to install. This might take awhile, and you may need to refresh the page, if it freezes on the Loading plugin extensions step.

Configure Jenkins Step 12

Login to Jenkins with the user you created.

Configure Jenkins Step 13

Click Open Blue Ocean.

Configure Jenkins Step 14

You are now ready to create your first Pipeline.

Configure Jenkins Step 15



That’s it. You now know how to install Jenkins on Ubuntu Server 18.04, how to configure the initial user, and how to install Blue Ocean plugins. Blue Ocean is an improved user interface that makes it easier to create pipelines.

Written by: Tony Mackay

Linux Ubuntu Jenkins

* GraspingTech participates in various affiliate marketing programs, which means we may earn a small commission at no additional cost to you, should you click on a link to a product and make a purchase.