How To Install Jenkins on Ubuntu 20.04 LTS

Install Jenkins on Ubuntu 20.04

In this tutorial, we will show you how to install Jenkins on Ubuntu 20.04 LTS. For those of you who didn’t know, Jenkins is an open-source automation server that is used to automate software development. Jenkins will automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery. By using Jenkins the developers will know the status of his application. Failures, new features, and processes will be automated and monitored.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Jenkins on a 20.04 LTS (Focal Fossa) server.

Install Jenkins on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running these following apt commands in the terminal.

Step 2. Installing Java.

Jenkins is made in Java, So to install Java just run the following command:

Verify the Java version by running the following command:

Step 3. Installing Jenkins on Ubuntu 20.04.

Now you have to add the Jenkins repository. But first, add the GPG key to secure the repository:

Next, add the Jenkins repository to the system:

After that the Jenkins repository is enabled, update the apt package list and install the latest version of Jenkins:

Once we have done with the installation, we have to enable and start Jenkins service with the following commands:

Step 4. Configure Firewall.

Enabled Jenkins server allows the 8080 port for incoming traffic:

Step 5. Accessing Jenkins.

Jenkins will be available on HTTP port 8080 by default. Open your favourite browser and navigate to http://yourdomain.com:8080 or http://server-ip:8080 and complete the required steps to finish the installation.

Default installation password can be found at /var/lib/jenkins/secrets/initialAdminPassword as showing in below image.

Install Jenkins on Ubuntu 20.04 LTS

Congratulations! You have successfully installed Jenkins. Thanks for using this tutorial for installing Jenkins on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you to check the official Jenkins website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!