#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
Jenkins · Topic 3 of 15

Jenkins Installation

By Uncodemy Editorial Team · Updated 16 Nov 2026

Before you start

Jenkins is a Java web application, so every install method needs two things: a supported Java runtime and a free port (8080 by default). Current Jenkins releases run on Java 17 or Java 21; check the Java support page on jenkins.io before installing, because supported versions change as new LTS releases come out. On a cloud VM (AWS EC2, Azure, GCP), also open port 8080 in the security group or firewall, or you will not reach the web page.

Pick one method:

MethodGood for
DockerTrying Jenkins on a laptop, or a clean server you can rebuild
Linux package (apt / dnf)A long-running server managed with systemctl
WAR fileAny OS with Java; quick experiments
Windows installer (MSI)A Windows machine; Jenkins runs as a Windows service

Option 1: Docker

docker run -d --name jenkins \
  -p 8080:8080 -p 50000:50000 \
  -v jenkins_home:/var/jenkins_home \
  jenkins/jenkins:lts-jdk21

# the first-run admin password
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword

The named volume jenkins_home keeps jobs, plugins and settings when the container is replaced. Port 50000 is for inbound agents; leave it out if you will not connect any.

Option 2: Linux package

The steps are the same on Ubuntu/Debian and on Red Hat/Amazon Linux; only the package manager differs.

  1. Install Java, for example sudo apt install fontconfig openjdk-21-jre on Ubuntu, or sudo dnf install java-21-amazon-corretto on Amazon Linux 2023. Check with java -version.
  2. Add the Jenkins repository and its signing key. Copy these two commands from the official install page for your distribution (jenkins.io → Documentation → Installing Jenkins → Linux), because the key is rotated from time to time and old blog commands then fail.
  3. Install and start:
    sudo apt-get update && sudo apt-get install jenkins     # Debian/Ubuntu
    # or: sudo dnf install jenkins                           # RHEL/Amazon Linux
    
    sudo systemctl enable --now jenkins
    sudo systemctl status jenkins        # should show "active (running)"
  4. Read the password: sudo cat /var/lib/jenkins/secrets/initialAdminPassword

Option 3: the WAR file

java -jar jenkins.war --httpPort=8080

Download jenkins.war (LTS) from jenkins.io. Data goes to .jenkins in your home folder unless you set JENKINS_HOME. The password is printed in the console between lines of asterisks.

First-time setup wizard

  1. Unlock Jenkins: open http://<server>:8080. The screen shows the exact file path of the password; paste the password and continue.
  2. Customize Jenkins: choose "Install suggested plugins". This adds Git, Pipeline, credentials and other basics.
  3. Create First Admin User: set a real username and a strong password.
  4. Instance Configuration: confirm the Jenkins URL. Use the address other people and webhooks will use, not localhost.
  5. The dashboard opens. Next, create a job; see creating a Jenkins job with Git.

Changing the port on a package install

sudo systemctl edit jenkins
# add these lines in the editor, then save:
[Service]
Environment="JENKINS_PORT=9090"

sudo systemctl daemon-reload
sudo systemctl restart jenkins

Recent packages read their settings from the systemd service, so editing old files such as /etc/default/jenkins may have no effect.

Errors that stop a first install

Not sure what Jenkins does yet? Start with What is Jenkins?. After installing, set up accounts and roles in Jenkins user management, and write your first pipeline with pipeline basics.

Master Jenkins & DevOps with Uncodemy

Hands-on live training, real projects and Dedicated Placement Support — become job-ready in DevOps.

Enroll in DevOps Training →