How to Install Jenkins on Debian latest
Jenkins is a widely-used open-source automation server that helps to automate the building, testing and deployment of software projects. In this tutorial, we will walk you through the process of installing Jenkins on Debian latest.
Prerequisites
Before getting started, you need to have the following prerequisites:
- A Debian latest server with root access or sudo privileges
- Java 11 or higher installed on your server
Step 1: Install Java
Jenkins requires Java to be installed on the system. In order to install Java 11 or higher, run the following commands:
sudo apt update
sudo apt install -y openjdk-11-jdk
Verify the Java version using the following command:
java -version
This should output the Java version installed on your system.
Step 2: Add Jenkins Repository
Next, we need to add Jenkins Repository to Debian. We can add the package repository by adding its GPG key to the system, and then adding the package repository to a new file named /etc/apt/sources.list.d/jenkins.list. Run the following commands:
wget -q -O - https://pkg.jenkins.io/debian-stable/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'
Step 3: Install Jenkins
Once Jenkins repository is added to Debian, run the following commands to install Jenkins on Debian server:
sudo apt update
sudo apt install jenkins
This will install Jenkins along with its dependencies.
Step 4: Start and Enable Jenkins Service
After installing Jenkins, run the following commands to start and enable the Jenkins service:
sudo systemctl start jenkins
sudo systemctl enable jenkins
Jenkins service should now be running on your system.
Step 5: Access Jenkins Web Interface
Finally, to access Jenkins, open up a web browser and navigate to http://your_server_ip_or_domain_name:8080. You should be prompted with a landing page to set up Jenkins:

To obtain the initial admin password, SSH into your server, and run the following command:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
You should be provided with the initial admin password for Jenkins. Enter this password on the Jenkins setup page to get started with Jenkins.
Conclusion
In this tutorial, we showed you how to install Jenkins on Debian latest, along with the steps required to configure the Jenkins service and access the web interface. You can now use Jenkins to automate your software projects and streamline deployments.