Updated: 28 September 2026 · Applies to: Ubuntu 24.04 LTS

Ubuntu 16.04 is no longer supported; this guide uses Ubuntu 24.04 LTS.

Jenkins is an automation server for continuous integration and delivery.

Install Jenkins (LTS)

Current Jenkins LTS releases need Java 21 or 25. Add the Jenkins LTS repository with the 2026 signing key:

# Ubuntu 24.04
apt install fontconfig openjdk-21-jre
wget -O /etc/apt/keyrings/jenkins-keyring.asc https://pkg.jenkins.io/debian-stable/jenkins.io-2026.key
echo "deb [signed-by=/etc/apt/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/" > /etc/apt/sources.list.d/jenkins.list
apt update && apt install jenkins

# AlmaLinux / Rocky
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/rpm-stable/jenkins.repo
dnf install fontconfig java-21-openjdk jenkins
systemctl enable --now jenkins

Note: Debian 12 does not include Java 21. Install Eclipse Temurin 21 from the Adoptium repository first, then follow the Ubuntu steps without openjdk-21-jre.

Open http://SERVER-IP:8080, unlock Jenkins with the password from /var/lib/jenkins/secrets/initialAdminPassword, install the suggested plugins and create an admin user.

Note: Put Jenkins behind Nginx with HTTPS (see "How to use Nginx as a reverse proxy with SSL?") rather than exposing port 8080.

Change the port

Run systemctl edit jenkins, add the lines below, save, then systemctl restart jenkins:

[Service]
Environment="JENKINS_PORT=8081"

Backups and updates

  • All jobs, plugins and settings are in /var/lib/jenkins. Back up that folder.
  • Update Jenkins with the system updates (apt upgrade / dnf upgrade), and plugins from Manage Jenkins › Plugins.

Common problems

  • Jenkins does not start: check the Java version with java -version (it must be 21 or 25) and read journalctl -u jenkins.
  • Cannot open port 8080: open it in the firewall, or better, proxy Jenkins through Nginx with HTTPS.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket