Jenkins Installation and Setup
Jenkins runs on a server and you access it through a web browser. This topic walks through the system requirements, installation methods, and first-time configuration so your Jenkins server is ready to use.
What You Need Before Installing Jenkins
Jenkins runs on Java. Before installing Jenkins, your machine must have Java installed. Jenkins supports the LTS (Long-Term Support) version as the recommended choice for stability.
Minimum System Requirements
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 256 MB | 1 GB or more |
| Disk Space | 1 GB | 50 GB (for builds and archives) |
| Java | Java 11 | Java 17 (LTS) |
| Operating System | Windows / Linux / macOS | Linux (Ubuntu/CentOS) |
Installation Methods
Jenkins provides multiple ways to install. The method you choose depends on your environment.
Method 1: Install on Ubuntu/Debian Linux
This is the most common way to install Jenkins on a server. You run a few terminal commands and Jenkins installs as a system service.
Step 1: Install Java sudo apt update sudo apt install fontconfig openjdk-17-jre Step 2: Add Jenkins repository key sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \ https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key Step 3: Add Jenkins to apt sources echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ https://pkg.jenkins.io/debian-stable binary/" | \ sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null Step 4: Install Jenkins sudo apt-get update sudo apt-get install jenkins Step 5: Start Jenkins sudo systemctl enable jenkins sudo systemctl start jenkins
Method 2: Install on Windows
Jenkins provides a Windows installer file (.msi). Download it from the official Jenkins website, run the installer, and Jenkins sets itself up as a Windows service. You access it from a browser just like on Linux.
Method 3: Run Jenkins with Docker
Docker lets you run Jenkins inside a container — a self-contained unit that works the same on any machine. This is the fastest way to get Jenkins running without worrying about Java versions or system configuration.
docker run -p 8080:8080 -p 50000:50000 \ -v jenkins_home:/var/jenkins_home \ jenkins/jenkins:lts-jdk17
Think of a Docker container as a pre-built house. Everything is already inside — furniture, appliances, utilities. You just move in. Without Docker, you build the house yourself from scratch.
Accessing Jenkins for the First Time
After installation, open a browser and go to http://localhost:8080 (or replace localhost with your server's IP address).
First-Time Setup Diagram
Open browser → http://localhost:8080
|
v
Jenkins asks for initial admin password
|
v
Find password in server file:
/var/lib/jenkins/secrets/initialAdminPassword
|
v
Paste password into browser
|
v
Choose: Install Suggested Plugins
OR
Select plugins to install
|
v
Create your first admin user
(username, password, email)
|
v
Set Jenkins URL
(e.g., http://your-server:8080)
|
v
Jenkins is ready!
Understanding the Jenkins Home Directory
Jenkins stores all its data in a folder called JENKINS_HOME. On Linux, this is usually /var/lib/jenkins. On Windows, it is typically inside the user's AppData folder.
This folder holds all your jobs, build logs, plugin files, and credentials. Back this folder up regularly to avoid losing your work.
Key Folders Inside JENKINS_HOME
| Folder | What It Contains |
|---|---|
| jobs/ | All job configurations and build history |
| plugins/ | Installed plugins |
| secrets/ | Passwords and credentials (encrypted) |
| logs/ | Jenkins system log files |
| workspace/ | Temporary files created during builds |
Choosing Plugins During Setup
When you first open Jenkins, it asks you to install plugins. Choose Install Suggested Plugins unless you have a specific reason not to. Suggested plugins cover the most common needs: Git integration, pipeline support, build tools, and notifications.
You can always add or remove plugins later from the Jenkins dashboard.
Key Points
- Jenkins requires Java to run — install Java first before Jenkins.
- Install Jenkins on Linux, Windows, or run it with Docker.
- Access Jenkins at port 8080 in your browser after installation.
- Use the initial admin password from the server file to unlock Jenkins the first time.
- The JENKINS_HOME directory stores all jobs, plugins, and configuration — back it up regularly.
