How to safe restart Jenkins via URL

Jenkins is an open-source automation server that allows continuous integration and delivery capabilities to a project. Projects ranging from simple functionalities to complex and detailed ones can use Jenkins to automate their code testing and deployment. In this answer, we will see how to restart the Jenkins server safely.

Jenkins dashboard

There are two ways through which we can access the Jenkins dashboard on the web browser:

  1. If we want to access the Jenkins dashboard on our system, we can use the following URL:

http://localhost:8080
  • localhost means that the Jenkins server is running on our own system.

  • 8080 is the default port to run the Jenkins server.

  1. If we want to access the Jenkins dashboard on another system, we can use the following URL:

http://<system's host name>:8080
  • <system's host name> is the IP address of the system on which the Jenkins server runs.

Safe restart

Jenkins provides a feature to restart the server safely. It waits for all the running jobs to finish and then restarts it. We can safely restart Jenkins in the following way:

Add /safeRestart to URL

We can safely restart our Jenkins server by adding /safeRestart at the end of the URL, as demonstrated below:

Add /safeRestart to the URL
Add /safeRestart to the URL

The highlighted URL in the above demonstration is given below:

http://<system's host name>:8080/safeRestart

Note: We have to replace the system's host name according to the system on which we want to access the Jenkins server.

Once we press enter, we are redirected to a page confirming whether we want to restart Jenkins. The redirected page is shown below:

Alert prompt to confirm safe restart
Alert prompt to confirm safe restart

When we click yes, then we will see a waiting screen that waits for all the jobs to finish, and Jenkins will safely restart.

Waiting screen for safe restart
Waiting screen for safe restart

Conclusion

By following the steps mentioned above, we can safely restart Jenkins.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved