# Jenkins: Upgrading

Here are some notes on upgrading Jenkins with a WAR file.

Adapted from here: [https://www.baeldung.com/ops/jenkins-war-update](https://www.baeldung.com/ops/jenkins-war-update)

Identify where the current war is running, by opening Jenkins, going to Manage Jenkins, and System Information.

Find the executable-war entry and note the path.

[![image.png](https://wiki.galaxydump.com/uploads/images/gallery/2025-02/scaled-1680-/RjJsdh9NG2XROmlu-image.png)](https://wiki.galaxydump.com/uploads/images/gallery/2025-02/RjJsdh9NG2XROmlu-image.png)

Stop Jenkins: `sudo systemctl stop jenkins`

Once stopped navigate to a folder where you can download things.

Download the latest version of Jenkins as a WAR file:

```bash
wget https://updates.jenkins-ci.org/latest/jenkins.war
```

Or, download a specific version:

```bash
wget https://updates.jenkins-ci.org/download/war/2.375.1/jenkins.war
```

Update the downloaded war file permissions:

```bash
chown root:root jenkins.war
chmod 644 jenkins.war
```

Now, make a backup of the existing war file (at the path from System Information):

```bash
mv /usr/share/java/jenkins.war /usr/share/java/jenkins.war.old
```

Copy the downloaded jenkins war file over the existing executable:

```
sudo mv /download/jenkins.war /usr/share/java/
```

<p class="callout info">NOTE: Be sure to change the folder path of the downloaded file.</p>

You should be able to start the new version with:

```bash
sudo systemctl start jenkins
```