How to Install & Set Up Jenkins
Install the Jenkins LTS automation server on Ubuntu (or via Docker), unlock it, write a real declarative Pipeline, and attach a build agent.
Prerequisites
- ✓A host with 2 GB+ RAM for the controller (agents doing the actual building want more, depending on what they build)
- ✓Java 17 or 21 (installed below on Ubuntu)
Controller, agents, and jobs — how Jenkins is put together
The Jenkins process you install below is the controller: it serves the web UI, stores configuration and build history, and schedules work — but by default it also runs builds on itself via a 'built-in node', which is fine for a lab and something you'll want to change once real traffic shows up (see the agent section below).
Almost everything past the core is a plugin — SCM integrations, notification channels, cloud agent provisioners, and the Pipeline engine itself all arrive as plugins, which is why the initial setup wizard spends most of its time installing them.
A job is a unit of work. Freestyle jobs configure a build through UI form fields and were the original Jenkins model; Pipeline jobs read a Jenkinsfile — a script, checked into your repo alongside the code it builds — which is the standard approach today because the build definition is versioned, reviewable, and portable between Jenkins instances.
Install Jenkins on Ubuntu (LTS repo)
Install Jenkins on RHEL, CentOS Stream, or Fedora (LTS repo)
Alternative — run Jenkins in Docker
Port 50000 is only needed if you plan to attach JNLP-based build agents (see below) — safe to drop the mapping if the controller will always run its own builds.
Unlock and verify
Browse to http://your-server:8080 and paste the initial admin password to get past the setup wizard's unlock screen. Take the wizard's 'Install suggested plugins' option unless you have a specific reason not to — it covers Git, Pipeline, and credentials support, which you'll want immediately.
Write your first Pipeline
Create a Jenkinsfile at the root of a repository, then point a new Pipeline job at that repo — Jenkins reads the file straight from source control on every run.
In the Jenkins UI: New Item → Pipeline → under Pipeline, set 'Pipeline script from SCM', point it at your repo, and set the script path to Jenkinsfile.
Attach a build agent
Once builds need isolation, more capacity, or a specific toolchain the controller doesn't have, add a separate agent node rather than building on the controller. Manage Jenkins → Nodes → New Node walks you through it and, for an inbound (JNLP) agent, hands you a ready-to-run command like the one below to execute on the agent machine.
Keep secrets out of the Jenkinsfile
Never hardcode credentials in a pipeline script that's checked into a repo. Add them once under Manage Jenkins → Credentials, then reference the credential ID from the Jenkinsfile — Jenkins injects the real value at run time and masks it in the console log.
Documentation & Knowledge Base
Download Jenkins— all versions & official links→Need Jenkins deployed and managed for you?
We're OpenStack Dev — we design, deploy, and operate production DevOps infrastructure.