Introduction: Jenkins and How Does it Work
Users could run into a circumstance where they need to restart Jenkins while using it manually. How to Restart Jenkins Manually? This could happen for a variety of reasons, such as adding plugins or debugging problems. Fortunately, Jenkins provides several ways to carry out a manual restart.
In this article from our blog, we’ll review the various techniques for manually restarting Jenkins.
- A fully functional installation of Jenkins (learn how to install Jenkins on Ubuntu 18.04, Debian 10, CentOS 8, or Windows 10).
- Having the use of a web browser
- Access to the command prompt or terminal window (Linux and macOS) (Windows).
- The ability to access a user account with sudo/administrator rights.
Restart Jenkins via URL
Enter the correct URL to restart Jenkins if you are using the Jenkins dashboard in a web browser. Jenkins will restart if you use the default restart URL without waiting for any builds to finish:
restart at [Jenkins URL]
Use the safe restart option to finish all open jobs before the restart. Once the restart is complete, new jobs will start to queue up and run:
/safe Restart Jenkins URL
How to Restart Jenkins Manually? Both choices necessitate hitting the Yes button to confirm the restart:
The system’s hostname and the port Jenkins is executing on are both included in the Jenkins URL (the default port is 8080). When logging into your system’s Jenkins dashboard, use:
http://localhost:8080/restart
http://localhost:8080/saferestart
Use: to sign in if you are using a different system.
http://[your system's hostname]:8080/restart
http://[your system's hostname]:8080/safe Restart
Restart Jenkins via the Safe Restart Plugin
You may do a safe restart from the Jenkins dashboard thanks to the Safe Restart plugin for Jenkins.
- To begin adding the plugin, click the Manage Jenkins option on the dashboard’s left side:
- Select Manage Plugins from the System Configuration section:
- Find “safe restart” under the Available tab and select the Safe Restart plugin by checking the box next to its name.
- To add the plugin, click the Install without restart option as follows:
- Return to your dashboard when the plugin has been installed. On the left side, a new link labeled “Restart Safely” has appeared:
- Clicking the link starts a secure Jenkins restart. Clicking the Yes option will require you to confirm the restart.
Want to run a bash Command? See our detailed article on Running a Bash Script in Terminal to help you automate your tasks, streamline processes, and manage system operations.
CLI restart Jenkins
A Java file called Jenkins CLI (Command Line Interface) functions as an addition to the local terminal shell. From a terminal window or command prompt, you may control Jenkins using Java commands.
1: Download the Jenkins CLI.jar file first
2: Click the Manage Jenkins link on the left-hand side of the Jenkins dashboard once it has loaded in your web browser.
3: In the Tools and Actions area, scroll down and select the Jenkins CLI button.
4: Download Jenkins-cli.jar using the provided link.
5: To restart Jenkins after the download is finished, open a terminal window or command prompt and enter the following commands:
restarting Java using the command java -jar [path to the jenkins-cli.jar file]
For instance, using a Windows computer with the Jenkins-cli.jar file in the Downloads folder:
Restart with the command: java -jar C:UsersakovaDownloadsjenkins-cli.jar -s http://localhost:8080
How to Restart Jenkins on Windows, Linux, and Mac?
How to Restart Jenkins Manually? Jenkins starts up as a background service after installation. It can therefore be restarted using the same instructions as other services.
Restart the Linux Jenkins Service.
Start the Jenkins service restart on a Linux computer by typing:
systemctl restart Jenkins with sudo
Another approach is to apply:
restart Jenkins with sudo /etc/init. d
Restart the Jenkins Service in Windows
How to Restart Jenkins Manually? Use the net command to stop and then restart the Jenkins service on the Windows command prompt:
jenkins, net stop
start net jenkins
Restarting Jenkins.exe by going to the installation folder for Jenkins is another option. For illustration:
Jenkins, program files at C:
start jenkins.exe
Related Article: Install node.js and NPM on Windows
Restart MacOS’s Jenkins service.
How to Restart Jenkins Manually? Use the launchctl command to stop and start the Jenkins service twice on MacOS to restart it:
/Library/LaunchDaemons/org.jenkins-ci.plist sudo launchctl unload
/Library/LaunchDaemons/org.jenkins-ci.plist sudo launchctl load
Conclusion
After reading this guide, you have to be able How to Restart Jenkins Manually? using one of the techniques described above.
Read More:
- How to Get Backlinks: 12 Proven Hacks to Dominate SERPs in 2025
- Why Managed Dedicated Server Hosting is the Future of Business?
- What Is Multilingual SEO? Speak the Language of Your Customers
- How to Personalize a Cold Email to Stand Out to a Customer Success Recruiter
- What is Parasite SEO? A Complete Guide to Black Hat SEO