Updated: 18 November 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9
Jenkins is an automation server for building, testing and deploying software.
The operating system versions in the original guide (CentOS 7, Ubuntu 16.04/18.04, Debian 8/9) are no longer supported, so this guide uses Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9.
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 readjournalctl -u jenkins. - Cannot open port 8080: open it in the firewall, or better, proxy Jenkins through Nginx with HTTPS.