
Jenkins remains one of the most widely used automation servers for continuous integration and continuous delivery. Teams rely on it to build, test, and deploy software around the clock. Occasionally, however, Jenkins needs to be restarted, whether to complete a plugin installation, apply configuration changes, recover from memory issues, or finish an upgrade. While administrators can restart Jenkins from the command line, many prefer the convenience of doing it directly from the browser. This guide explains exactly how to restart Jenkins from the web UI, the difference between safe and immediate restarts, and best practices to avoid disrupting your pipelines.
Streamline Your Development Workflow with AAMAX.CO
Reliable CI/CD pipelines are the backbone of efficient software delivery, and AAMAX.CO understands how to put them to work. They are a full-service digital marketing company offering web development, digital marketing, and SEO services worldwide. Their engineering team builds modern applications backed by automated testing, continuous integration, and dependable deployment processes, so releases are fast, consistent, and low-risk. Through their web application development services, they deliver scalable, well-architected applications supported by DevOps practices that keep their clients' products running smoothly.
Why You Might Need to Restart Jenkins
Common reasons for restarting Jenkins include:
- Completing the installation or update of plugins that require a restart.
- Applying a Jenkins core upgrade.
- Reloading system-level configuration changes or environment variables.
- Recovering from performance degradation, memory leaks, or hung executors.
- Resolving unexpected errors after configuration edits.
Prerequisites
To restart Jenkins from the web interface, your user account must have the Overall/Administer permission. Additionally, Jenkins must be running under a service manager or wrapper that can relaunch it, such as systemd on Linux, a Windows service, or a Docker container with a restart policy. If Jenkins was started manually with java -jar jenkins.war without a supervisor, the restart option may only shut it down rather than bringing it back up.
Method 1: Safe Restart via URL
The recommended method is a safe restart. It puts Jenkins into a quiet mode, prevents new builds from starting, waits for currently running builds to finish, and then restarts. To trigger it, navigate to:
http://your-jenkins-server:8080/safeRestartReplace the host and port with your Jenkins address. Jenkins will display a confirmation page; click Yes to proceed. A banner will indicate that Jenkins is preparing to restart, and it will relaunch automatically once active builds complete.
Method 2: Immediate Restart via URL
If you need to restart right away, for example because Jenkins is unresponsive or no critical builds are running, use the immediate restart URL:
http://your-jenkins-server:8080/restartConfirm the prompt, and Jenkins will restart immediately. Be aware that any running builds will be interrupted and may need to be re-triggered, so use this option carefully on shared servers.
Method 3: Restart After Installing Plugins
When you install or update plugins through Manage Jenkins and then Plugins, the download progress page includes a checkbox labeled "Restart Jenkins when installation is complete and no jobs are running." Selecting it performs a safe restart automatically once installations finish. This is the most convenient approach for plugin maintenance.
Method 4: Use the Restart Plugins
For teams that prefer a visible button, plugins such as Restart Safely add a restart link directly to the Jenkins sidebar. After installing the plugin, administrators can click the link to initiate a safe restart without typing a URL. This is helpful for organizations where several administrators share responsibility.
Method 5: Prepare for Shutdown First
Under Manage Jenkins, you will find an option called Prepare for Shutdown. This places Jenkins into quiet mode without restarting, allowing running jobs to finish while blocking new ones. It is useful when you want to monitor builds and decide exactly when to restart. You can cancel quiet mode at any time if plans change.
Restarting via the Jenkins CLI and REST API
Although this guide focuses on the web UI, the same endpoints are available through the Jenkins CLI and REST API for automation. Using an API token, administrators can send a POST request to the /safeRestart endpoint, which is handy for scheduled maintenance scripts. Always protect API tokens and limit them to trusted administrators.
What to Do If Jenkins Does Not Come Back
If Jenkins fails to restart, check the service status on the host, for instance with systemctl status jenkins on Linux. Review the Jenkins log, typically located in /var/log/jenkins/ or available through journalctl, for errors related to plugins or Java versions. A recently installed plugin with incompatible dependencies is a frequent culprit; disabling it by renaming its file in the plugins directory often resolves the issue. In Docker environments, confirm that the container has a restart policy such as unless-stopped.
Best Practices for Restarting Jenkins
- Prefer safe restarts over immediate restarts to protect running builds.
- Schedule restarts during low-activity periods and notify your team in advance.
- Back up the
JENKINS_HOMEdirectory before major upgrades or plugin changes. - Keep plugins updated and remove unused ones to reduce instability.
- Monitor memory and CPU usage to address performance issues before they require emergency restarts.
Conclusion
Restarting Jenkins from the web UI is quick and convenient once you know the options. Use /safeRestart for routine maintenance, /restart only when an immediate reboot is necessary, and take advantage of the plugin manager's automatic restart checkbox. With proper permissions, a service manager in place, and thoughtful scheduling, you can keep Jenkins healthy and your CI/CD pipelines running reliably.