Offline Installations
This section describes how to install Jenkins on a machine that does not have an internet connection.
To install Jenkins itself, download the appropriate war file and transfer it to your machine.
Prerequisites
Minimum hardware requirements:
-
256 MB of RAM
-
1 GB of drive space (although 10 GB is a recommended minimum if running Jenkins as a Docker container)
Recommended hardware configuration for a small team:
-
4 GB+ of RAM
-
50 GB+ of drive space
Comprehensive hardware recommendations:
-
Hardware: see the Hardware Recommendations page
Software requirements:
-
Java: see the Java Requirements page
-
Web browser: see the Web Browser Compatibility page
-
For Windows operating system: Windows Support Policy
-
For Linux operating system: Linux Support Policy
-
For servlet containers: Servlet Container Support Policy
Offline plugin installation
Offline plugin installations require additional effort due to dependency requirements.
The Plugin Installation Manager Tool is the recommended tool for offline plugin installation. It downloads user specified plugins and all dependencies of the user specified plugins. The Plugin Installation Manager Tool also reports available plugin updates and plugin security warnings. It is included in the official Jenkins Docker images. It is also used to install plugins as part of the Docker install instructions. Refer to the Gitter chat channel for questions and answers
If you want to transfer the individual plugins, you’ll need to retrieve all dependencies as well. There are several dependency retrieval scripts and tools on Github. For example:
-
Plugin installation manager tool - Java command line utility to install Jenkins plugins and their dependencies.
-
samrocketman/jenkins-bootstrap-shared - Java is required; packages Jenkins and plugins into an immutable package installer. Supported formats include: RPM, DEB, Docker. Can proxy Jenkins and plugins through Nexus or Artifactory since Gradle is used to assemble plugins.
Post-installation setup wizard
After downloading, installing and running Jenkins using one of the procedures above (except for installation with Jenkins Operator), the post-installation setup wizard begins.
This setup wizard takes you through a few quick "one-off" steps to unlock Jenkins, customize it with plugins and create the first administrator user through which you can continue accessing Jenkins.
Unlocking Jenkins
When you first access a new Jenkins instance, you are asked to unlock it using an automatically-generated password.
-
Browse to
http://localhost:8080
(or whichever port you configured for Jenkins when installing it) and wait until the Unlock Jenkins page appears. -
From the Jenkins console log output, copy the automatically-generated alphanumeric password (between the 2 sets of asterisks).
image::setup-jenkins-02-copying-initial-admin-password.png[alt="Copying initial admin password",width=80%]
Note:-
The command:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
will print the password at console. -
If you are running Jenkins in Docker using the official
jenkins/jenkins
image you can usesudo docker exec ${CONTAINER_ID or CONTAINER_NAME} cat /var/jenkins_home/secrets/initialAdminPassword
to print the password in the console without having to exec into the container.
-
-
On the Unlock Jenkins page, paste this password into the Administrator password field and click Continue.
Note:-
The Jenkins console log indicates the location (in the Jenkins home directory) where this password can also be obtained. This password must be entered in the setup wizard on new Jenkins installations before you can access Jenkins’s main UI. This password also serves as the default administrator account’s password (with username "admin") if you happen to skip the subsequent user-creation step in the setup wizard.
-
Customizing Jenkins with plugins
After unlocking Jenkins, the Customize Jenkins page appears. Here you can install any number of useful plugins as part of your initial setup.
Click one of the two options shown:
-
Install suggested plugins - to install the recommended set of plugins, which are based on most common use cases.
-
Select plugins to install - to choose which set of plugins to initially install. When you first access the plugin selection page, the suggested plugins are selected by default.
If you are not sure what plugins you need, choose Install suggested plugins. |
You can install (or remove) additional Jenkins plugins at a later point in time via the Manage Jenkins > Plugins page in Jenkins.
The setup wizard shows the progression of Jenkins being configured and your chosen set of Jenkins plugins being installed. This process may take a few minutes.
Creating the first administrator user
Finally, after customizing Jenkins with plugins, Jenkins asks you to create your first administrator user.
-
When the Create First Admin User page appears, specify the details for your administrator user in the respective fields and click Save and Finish.
-
When the Jenkins is ready page appears, click Start using Jenkins.
Notes:-
This page may indicate Jenkins is almost ready! instead and if so, click Restart.
-
If the page does not automatically refresh after a minute, use your web browser to refresh the page manually.
-
-
If required, log in to Jenkins with the credentials of the user you just created and you are ready to start using Jenkins!