Installing Jenkins as a Windows service allows you to start Jenkins as soon as the machine starts, and regardless of who is interactively using Jenkins.
Installing Jenkins as a Service in Windows
Getting ready
Install and configure Jenkins on Windows.
How to do it...
Follow these steps to install Jenkins as a service in Windows:
- Go to the Jenkins dashboard.
- Click on Manage Jenkins.
- Click on Install as Windows Service, as shown in the following diagram:
![](https://static.packt-cdn.com/products/9781788297943/graphics/assets/2b6c5e16-650c-4823-9198-ddbfc97d96de.png)
- Keep Installation Directory as the default and click on Install:
![](https://static.packt-cdn.com/products/9781788297943/graphics/assets/d407a064-3fe3-4af9-8f93-6c8d1d8b2571.png)
- Once Windows as a Service installation is successfully completed, click on Yes:
![](https://static.packt-cdn.com/products/9781788297943/graphics/assets/0b19c542-5c9c-429e-a1fb-230dc6633472.png)
- Now Jenkins will be available as a service in the Windows system.
How it works...
Go to Control Panel and search for Services.
Click on Services (Local) to view:
![](https://static.packt-cdn.com/products/9781788297943/graphics/assets/263d46c4-0817-47d7-a876-84394e4673cf.png)
Once the Jenkins service is available, you can right-click on it and start, stop, or restart services based on your requirements.