Development Tools

Jenkins on Windows User Guide

| Product: Jenkins on Windows

Overview

This guide covers the deployment and configuration of Jenkins on Windows Server using cloudimg AMIs from the AWS Marketplace. Jenkins is a leading open source automation server used for building, deploying, and automating software projects through continuous integration and continuous delivery (CI/CD) pipelines.

What's included in this AMI:

  • Jenkins (latest version) with web interface on port 8080
  • Java Development Kit (JDK) 21
  • Jenkins Windows Service for automatic startup on boot
  • Windows Server with Remote Desktop access
  • 24/7 cloudimg support with guaranteed 24 hour response SLA

Prerequisites

Before launching this AMI, ensure you have:

  1. An active AWS account
  2. An active subscription to the Jenkins on Windows listing on AWS Marketplace
  3. An EC2 key pair for password decryption
  4. A Remote Desktop client application

Recommended Instance Type: t3.medium (2 vCPU, 4 GB RAM) or larger. The minimum requirements are 1 vCPU, 1 GB RAM, and 30 GB disk space.

Step 1: Launch the AMI

  1. Navigate to the AWS Marketplace and search for "Jenkins Windows cloudimg"
  2. Click Continue to Subscribe, accept the terms, then Continue to Configuration
  3. Select your preferred Region and Software Version
  4. Click Continue to Launch
  5. Choose Launch through EC2 for full control over instance configuration
  6. Select your instance type (t3.medium recommended)
  7. Configure storage: 30 GB gp3 minimum
  8. Configure your Security Group with the following inbound rules:
Port Protocol Source Purpose
3389 TCP Your IP Remote Desktop (RDP) access
8080 TCP Your IP Jenkins web interface

Important: Restrict both ports to trusted IP addresses only.

  1. Select your EC2 key pair and launch the instance

Step 2: Retrieve the Windows Password

Wait for the EC2 instance to pass 2/2 status checks.

  1. Open the AWS Console and navigate to EC2 > Instances
  2. Select your instance
  3. Click Actions > Security > Get Windows password
  4. Click Browse and upload your EC2 key pair .pem file
  5. Click Decrypt password
  6. Note the Username (Administrator) and the decrypted Password

Important: It may take up to 15 minutes after launch before the Windows password is available.

Step 3: Connect via Remote Desktop

Open your Remote Desktop client:

On Windows: 1. Press Win + R, type mstsc, and press Enter 2. Enter the public IP address of your instance 3. Click Connect

On macOS: 1. Open Microsoft Remote Desktop 2. Click Add PC and enter the public IP address 3. Double click the connection to connect

When prompted: - Username: Administrator - Password: The decrypted value from Step 2

If a certificate warning appears, click Continue to proceed.

Step 4: Access Jenkins Web Interface

Jenkins starts automatically on boot as a Windows Service. Open a web browser (Firefox is available on the desktop) and navigate to:

http://localhost:8080

Or from your local machine, access Jenkins at:

http://<public-ip-address>:8080

Follow the Jenkins setup wizard to complete the initial configuration:

  1. Retrieve the initial admin password if prompted
  2. Choose Install suggested plugins or select specific plugins
  3. Create your admin user account
  4. Configure the Jenkins URL
  5. Click Start using Jenkins

Managing the Jenkins Service

Jenkins runs as a Windows Service and starts automatically on boot.

To manage the Jenkins service:

  1. Open Windows Services by pressing Win + R, typing services.msc, and pressing Enter
  2. Locate the Jenkins service in the list
  3. Right click to Start, Stop, or Restart the service

Using PowerShell:

# Check Jenkins service status
Get-Service -Name Jenkins

# Stop Jenkins
Stop-Service -Name Jenkins

# Start Jenkins
Start-Service -Name Jenkins

# Restart Jenkins
Restart-Service -Name Jenkins

Server Components

Component Version
Jenkins Latest
Java (JDK) 21

Filesystem Layout

Drive Description
C:\ System drive with Windows, Jenkins, and JDK installation

Key directories:

Directory Purpose
C:\Program Files\Jenkins Jenkins installation directory
C:\Program Files\Jenkins\workspace Build workspace for jobs
C:\Program Files\Jenkins\plugins Installed Jenkins plugins
C:\Program Files\Java JDK installation

Troubleshooting

Cannot access Jenkins on port 8080

  1. Verify the Jenkins service is running in Windows Services
  2. Check that your security group allows port 8080 from your IP
  3. Open Command Prompt and run: netstat -an | findstr 8080
  4. Check Jenkins logs in the Jenkins installation directory

Cannot connect via RDP

  1. Verify the instance has passed 2/2 status checks
  2. Check that your security group allows port 3389 from your IP
  3. Wait up to 15 minutes for the Windows password to be available
  4. Try a different RDP client

Jenkins service fails to start

  1. Check Windows Event Viewer for error details
  2. Verify Java is installed: open Command Prompt and run java -version
  3. Check available disk space on C:\

Security Recommendations

  • Change the Administrator password after first login
  • Restrict port access: Only allow ports 3389 and 8080 from trusted IPs
  • Enable HTTPS for Jenkins: Configure SSL using a reverse proxy or Jenkins built in SSL settings
  • Configure Jenkins security: Set up authentication and authorization in Manage Jenkins > Security
  • Keep Jenkins updated: Regularly update Jenkins and plugins from the management interface
  • Enable Windows Update: Keep the OS patched with the latest security updates
  • Use strong passwords: Set complex passwords for both Windows and Jenkins admin accounts

Support

If you encounter any issues with this product, contact cloudimg support:

  • Email: support@cloudimg.co.uk
  • Website: www.cloudimg.co.uk
  • Support hours: 24/7 with guaranteed 24 hour response SLA