Jenkins LTS Installation, Java 21/25 Runtime Planning, Packages, Containers, and Initial Setup: Configuration, Design Choices, and Tradeoffs
Compare Jenkins LTS and weekly releases, Java 21 and 25, package/container/WAR models, network exposure, image tags/digests, and rollback tradeoffs.
Learning objectives
- Choose LTS or weekly based on change appetite and support strategy rather than feature novelty alone.
- Compare package, container, and WAR deployment models by state ownership, patching, rollback, and operational fit.
- Choose Java 21 or 25 deliberately while keeping build JDK requirements separate.
- Explain why production HTTP exposure normally belongs behind controlled TLS/reverse-proxy infrastructure.
- Use tags for readability and digests/version evidence for reproducibility without pretending controller-data rollback is trivial.
1. Installation design is a set of coupled tradeoffs
There is no universal “best Jenkins install.” A development laptop, a regulated enterprise service, and an ephemeral test controller have different constraints. The useful question is not “container or package?” in isolation. It is: who owns Java, process supervision, persistent state, patching, network exposure, and rollback?
2. LTS versus weekly: stability cadence versus feature cadence
| Dimension | LTS | Weekly |
|---|---|---|
| Release cadence | Stable line with periodic point releases | Frequent feature/fix releases |
| Production default | Usually the safer baseline for most teams | Useful for early features, plugin developers, or teams accepting more change |
| Upgrade planning | Read every relevant LTS upgrade guide when crossing lines | Expect more frequent compatibility review |
| Security | Apply supported security updates promptly | Also requires prompt security updates; “newer” is not a substitute for advisories |
| Course baseline | 2.568.3 LTS | Not mandatory for this chapter |
As of this lesson’s verification date, 2.568.3 is the current LTS point release. The decision rule should outlive that number: select a supported line, track advisories, test upgrades, and record the exact version actually deployed.
3. Java 21 versus Java 25
| Question | Java 21 | Java 25 |
|---|---|---|
| Current Jenkins support | Supported for current LTS | Supported for current LTS |
| Operational maturity | Longer-established ecosystem baseline | Newer runtime; may require more plugin/tool validation |
| Course choice | Preferred for broad compatibility and official image example | Valid optional path when environment standardizes on it |
| Build JDK coupling | None by default | None by default |
4. Package versus container versus WAR: who owns what?
| Decision | Package | Container | WAR |
|---|---|---|---|
| Java ownership | Host administrator | Image variant supplies controller Java | Operator supplies Java |
| Process supervision | systemd / Windows service | Container runtime/orchestrator | Operator/system service wrapper |
| State path | Host directory | Mounted /var/jenkins_home |
Chosen JENKINS_HOME |
| Byte identity | Package version/repository | Image version + digest | WAR checksum/version |
| Host coupling | Higher | Lower for Jenkins runtime, still host/runtime dependent | Moderate |
| Recovery concern | Host filesystem + package baseline | Volume + image/plugin baseline | Home + Java/WAR/startup baseline |
5. Direct HTTP in a lab versus TLS reverse proxy in production
Direct HTTP on loopback is appropriate for this disposable chapter because the browser and controller are on the same machine. It is not a production recommendation. Production Jenkins normally requires a stable external URL, TLS termination, correct forwarded headers, deliberate firewall rules, and proxy timeouts appropriate for Jenkins/WebSocket behavior.
flowchart TD U[Browser / webhook client] --> P[TLS reverse proxy / load balancer] P --> J[Jenkins controller HTTP listener] J --> H[JENKINS_HOME] J --> A[Agents / external services] P -. owns TLS + external exposure .-> U J -. owns Jenkins authz + application routes .-> P
Do not disable CSRF, authentication, or authorization to “make the proxy work.” Proxy correctness and Jenkins security are different layers.
6. Mutable tags versus pinned versions and digests
Human-readable tags are convenient for operations and documentation. Digests are better evidence of exact pulled content. A sound workflow often records both:
docker pull jenkins/jenkins:2.568.3-jdk21
docker image inspect jenkins/jenkins:2.568.3-jdk21 \
--format 'Tag=jenkins/jenkins:2.568.3-jdk21 RepoDigests={{json .RepoDigests}}'
For production automation, you can reference an approved digest or
otherwise enforce an image promotion policy. But remember that
pinning the image does not pin every Jenkins plugin installed into
JENKINS_HOME. Core/image identity and plugin baseline
are separate configuration surfaces.
7. Rollback: process bytes are easy; controller data may not be
Containers encourage a dangerous oversimplification: “If the upgrade fails, just run the old image.” Jenkins upgrades can migrate data or plugins can update stored formats. Therefore a real rollback plan includes a tested pre-upgrade backup/snapshot of controller state and the old core/Java/plugin baseline, not only an old image tag.
8. Worked decision table
| Scenario | Recommended starting point | Why |
|---|---|---|
| One-person local training | Official LTS container + named volume + loopback port | Disposable process, explicit persistence, low host mutation. |
| Small Linux team with established systemd operations | Official LTS package + dedicated service account + managed host Java | Fits existing host patching/backup/monitoring model. |
| Enterprise platform with immutable container delivery | Approved Jenkins LTS image/digest + externalized home + tested orchestration pattern | Separates image promotion from persistent control-plane data. |
| Plugin developer validating upcoming behavior | Disposable weekly controller | Feature cadence is useful, but not a reason to move production blindly. |
| Production internet-facing service | LTS behind controlled TLS reverse proxy, least privilege, backup/restore and upgrade tests | Public bootstrap/direct HTTP is inappropriate; recovery and security are first-class. |
9. Anti-patterns and why they fail
-
Always use
latest. You lose a stable human version anchor. - Pin core but ignore plugins. Plugin/core compatibility remains mutable state.
- Run Windows Jenkins as LocalSystem. It unnecessarily expands compromise impact; use a dedicated service identity when possible.
- Run Linux Jenkins as root. The controller rarely needs host-root authority.
- Publish the setup wizard to the internet. Bootstrap is not a hardened public onboarding endpoint.
- Call a volume a backup. Persistence without independent recovery testing is not disaster recovery.
10. Summary
- Choose release line, Java, distribution, state, network exposure, and rollback as one operational design—not independent defaults.
- LTS is the course default; weekly is a deliberate high-change path, not “better because newer.”
- Java 21 is the lab baseline; Java 25 is supported but should be validated against the actual plugin/tool environment.
- Use direct loopback HTTP for local labs and deliberate TLS/reverse-proxy architecture for production.
- Record both readable version tags and immutable/resolved identities; core/image pinning does not pin plugins or controller data.
Knowledge check
Why is an old Docker image alone not a complete Jenkins rollback plan?
Controller and plugin data may have changed during the upgrade. A reliable rollback requires a compatible pre-upgrade state copy plus the old core/Java/plugin baseline.
When would weekly Jenkins be a reasonable choice?
For disposable validation, plugin development, or teams intentionally accepting the faster change cadence—not as an automatic production default.
Does choosing Java 25 force build jobs to compile with Java 25?
No. Jenkins runtime Java and application build JDKs are separate toolchain decisions.
What additional identity should accompany a pinned image tag in evidence?
The resolved repository digest (and preferably image ID) so the actual pulled content can be correlated independently of the tag.
A reverse proxy returns 502. Should you disable Jenkins CSRF protection to test it?
No. Proxy connectivity/header/timeout issues and Jenkins CSRF/security controls are different layers. Diagnose the proxy path without weakening application security.
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.