Jenkins LTS Installation, Java 21/25 Runtime Planning, Packages, Containers, and Initial Setup: Concepts, Architecture, and Mental Model
Learn the Jenkins installation mental model: LTS, Java runtime, distribution method, service identity, persistent JENKINS_HOME, network exposure, setup bootstrap, and evidence.
Learning objectives
- Explain why Jenkins version, Java runtime, distribution method, service identity, persistent state, network exposure, and setup security are separate installation decisions.
-
Trace a new controller from a selected LTS release through Java,
process/container,
JENKINS_HOME, listener, setup wizard, and verified health. - Distinguish the Java runtime that runs Jenkins from JDKs later used by builds.
- Identify which installation facts must be recorded so another operator can reproduce or recover the controller.
- Recognize insecure bootstrap patterns such as public setup-wizard exposure, root-like service identities, mutable-only image tags, and ephemeral controller storage.
1. Installation is a dependency graph, not a download button
A Jenkins controller can appear healthy in a browser while still
being operationally unreproducible. If the team cannot say which
Jenkins core build is running, which Java starts it, which account
owns the process, where JENKINS_HOME lives, which
image/package produced the process, and which network path exposes
the UI, then a restart or upgrade becomes guesswork.
Chapter 01 separated controller state from queue, agent, workspace, artifact, and external state. Chapter 02 narrows that model to the controller bootstrap itself. The goal is not merely “get Jenkins on port 8080.” The goal is a controller whose runtime identity, durable state, exposure, and recovery assumptions are explicit.
http://localhost:8080 proves only that an HTTP listener
responded. It does not prove the expected Jenkins core version,
supported Java runtime, durable home directory, safe exposure,
plugin baseline, or recoverability.
2. The installation mental model
flowchart TD A[Choose Jenkins release line and exact LTS] --> B[Choose supported Java runtime] B --> C[Choose package, container, WAR, or platform installer] C --> D[Define process/service identity] D --> E[Bind persistent JENKINS_HOME] E --> F[Bind HTTP port / reverse proxy path] F --> G[Start controller and read bootstrap logs] G --> H[Unlock setup wizard locally] H --> I[Install/record plugin baseline + admin identity] I --> J[Verify restart, version, persistence, and health evidence]
The sequence matters. Choosing a package before checking Java can yield a service that installs successfully but cannot start. Starting a container before defining a persistent volume can yield a controller that works until the container is replaced. Publishing the setup wizard on an uncontrolled network can expose the one-time bootstrap surface before authentication is established.
3. The seven installation states you must keep separate
| State | Question | Evidence |
|---|---|---|
| Core / release | Which Jenkins code is running? | LTS/weekly channel, exact core version, changelog/security advisory. |
| Java runtime | Which JVM starts the controller? |
java -version, vendor, major version, process
command line.
|
| Distribution | What bytes/package/image supplied Jenkins? | Package version/repository or image tag + resolved digest. |
| Process identity | Which OS/container user owns Jenkins? | systemd/MSI service account or container UID/user. |
| Persistent home | Where is durable controller state? |
JENKINS_HOME, volume/mount, ownership, free
space.
|
| Network exposure | Who can reach bootstrap/UI? | Bound host/port, firewall/reverse proxy, TLS termination. |
| Bootstrap baseline | What security/plugins/users exist after setup? | Admin created, plugin inventory, setup completed; never archive the bootstrap password. |
4. Java 21/25: runtime compatibility is a controller prerequisite
For current Jenkins LTS releases beginning with 2.555.1, the Jenkins system requires Java 21 or Java 25. That requirement applies to controller and Jenkins system components; it is distinct from the JDK a later build might use to compile an application. A Java 8 or 17 application can still be built with a separately selected toolchain even though Jenkins itself runs on Java 21.
java -version
# Record vendor, major/minor version, and architecture before launch.
5. Package, container, WAR, and platform installer are delivery mechanisms—not different Jenkins products
| Method | Good fit | State ownership | Important caveat |
|---|---|---|---|
| Official Linux package | Long-lived Linux service managed by systemd | Host filesystem, package repository, service account | Host Java and OS lifecycle are your responsibility. |
Official jenkins/jenkins image |
Disposable/reproducible controller process with externalized home | Container image + named volume/bind mount |
Container removal must not remove the only copy of
JENKINS_HOME.
|
| WAR file | Portable lab/manual service model | Chosen Java + chosen home + launch command | You own process supervision, updates, and startup arguments. |
| Windows MSI | Windows service installation | Windows service account + selected Java + filesystem | Avoid LocalSystem for production; use a constrained service identity. |
The course uses the official container image for the mandatory lab because it is easy to create and tear down without changing the host package database. That choice is pedagogical, not a claim that containers are always the best production architecture.
6. JENKINS_HOME is the durable control-plane boundary
JENKINS_HOME contains controller configuration and
operational state. A container image is replaceable; the home
directory is not. In a container installation the canonical location
is /var/jenkins_home, so a named volume or carefully
owned bind mount must be attached there.
docker volume create jenkins-ch02-home
docker volume inspect jenkins-ch02-home
Later chapters will treat backup and restore rigorously. For now, learn the simpler rule: if removing a process/container destroys the only copy of the controller state, you did not create a recoverable installation.
7. Bootstrap exposure is a temporary high-risk state
A fresh controller exposes the setup wizard before a normal administrator account and final plugin baseline exist. In a lab, publish only to loopback:
docker run --name jenkins-ch02-controller --detach \
--publish 127.0.0.1:8080:8080 \
--volume jenkins-ch02-home:/var/jenkins_home \
jenkins/jenkins:2.568.3-jdk21
Binding to 127.0.0.1 is intentionally different from
-p 8080:8080, which may expose the listener on all host
interfaces. Production deployments normally place Jenkins behind a
deliberately configured TLS reverse proxy/load balancer and
restrictive network policy; Chapter 29 covers those controls.
8. What to record before clicking through setup
Expected: Jenkins 2.568.3 LTS; record the version after login and from container metadata.
Record java -version inside the running controller;
expected major version 21 for this lab.
Record tag and RepoDigests; do not treat the tag as
immutable identity.
Record volume name, mount destination, and that the process can write it.
Record loopback host binding and container port 8080.
Retrieve the initial admin password only locally. Do not paste it into notes, screenshots, chat, or source control.
9. Common misconceptions
- “The image tag is the version.” It is a useful human label, but the resolved digest is stronger byte identity.
- “Java 21 means my application must target Java 21.” Jenkins runtime Java and build toolchain JDK are separate decisions.
- “A Docker volume is a backup.” It is persistence, not an independently validated backup.
- “Port 8080 works, so networking is finished.” Production exposure still needs TLS, proxy headers, firewalling, and access-control design.
- “Suggested plugins are a fixed reproducible set.” Their contents evolve; capture the actual installed plugin versions as evidence.
10. Summary
- A reproducible Jenkins installation identifies core/LTS, Java, distribution bytes, service identity, persistent home, network exposure, and bootstrap baseline separately.
- Current Jenkins 2.568.3 LTS is tested with Java 21 and 25; this chapter uses Java 21 for the executable baseline.
-
The controller process is replaceable;
JENKINS_HOMEis durable state and must be mounted/persisted deliberately. - Bootstrap credentials and the setup wizard are sensitive temporary surfaces; keep them local and out of retained evidence.
- A healthy HTTP response is one piece of evidence, not proof of persistence, compatibility, or security.
Knowledge check
Why can Jenkins run on Java 21 while a build still compiles a Java 17 application?
The Java runtime that starts Jenkins is separate from build toolchains selected inside jobs. Jenkins system compatibility does not force the application target version.
What is wrong with running a controller container without a
volume at /var/jenkins_home?
Replacing the container can destroy controller configuration and build state because the only home directory lives in the ephemeral container layer.
Does jenkins/jenkins:2.568.3-jdk21 alone prove
immutable image identity?
No. Record the resolved repository digest after pulling the image; tags are human-readable selectors and can be republished.
Why bind the setup wizard to 127.0.0.1 in the
lab?
It limits reachability during the unauthenticated bootstrap phase rather than exposing the wizard to other network peers.
A browser shows the Jenkins dashboard after setup. Name two facts still worth verifying independently.
Examples: actual Jenkins core version, Java version/vendor, image digest, home volume, service/container user, installed plugin versions, and restart persistence.
Official references and version notes
- Installing Jenkins — official entry point for supported installation methods and new-installation scope.
-
Docker installation
— official Jenkins container image, persistent
/var/jenkins_home, ports, and setup-wizard workflow. - Linux installation — current Debian/Ubuntu, Fedora, and RHEL-family package instructions and service management.
- Windows installation — MSI/service-account guidance, Java selection, port configuration, and setup.
-
WAR-file installation
— standalone Java launch, port selection, and
JENKINS_HOMEoverride. - Java Support Policy — authoritative controller/agent/CLI Java runtime matrix.
- Jenkins LTS changelog — exact LTS release dates, fixes, and tested JDKs.
- Jenkins LTS Upgrade Guide — mandatory reading before upgrades or skipped LTS lines.
- Jenkins Security Advisories — current core/plugin security fixes and affected versions.
Version-sensitive statements in this lesson were rechecked on
2026-09-14. The lab baseline is
Jenkins 2.568.3 LTS on Java 21;
Jenkins 2.568.3 is also tested with Java 25. Current Jenkins LTS
releases in this line require Java 21 or 25. The disposable
container examples pin the human-readable image tag
jenkins/jenkins:2.568.3-jdk21 and require learners to
record the locally resolved RepoDigest after pulling
it. Re-check the LTS changelog, Java policy, image tags/digests,
package signing key, and security advisories when regenerating
this lesson.
Keep the academy open
Support free, practical DevOps education.
Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this
address.