# Updates

## Automatic Updates

If you have deployed Monolith with the Watchtower container, the Monolith API server, Monolith web app, and Relay web app will automatically update if the host system has internet access.

Watchtower checks for updates to these container every 30 seconds.

You may disable these automatic updates by simply removing the Watchtower container from your Monolith deployment.

## Force an Update

If you don't want to wait for Watchtower or if you want to buld updates into a recurring script, you can force an update with a couple of commands.

The following commands use Docker compose to pull down the latest Monolith images, and rebuild the  entire Monolith deployment with the new images.

```
## destroy currently running Monolith containers
docker compose down

## Pull latest images
docker compose pull

## Deploy Monolith containers with new images
docker compose up -d
```

{% hint style="info" %}
Be sure to run these commands from the same directory as your Monolith docker-compose.yml file.
{% endhint %}

You can imbed these commands within a bash or batch script if you would like to implement your own scheduled updates instead of using watchtower.

## Manual Updates

You can also update the Monolith server containers manually.  This can be useful in air-gapped environments or if you do not wish to deploy with automatic updates.

### Download Latest Container Images

Run the following commands to download the latest container images for Monolith deployment or updates:

{% code lineNumbers="true" %}

```
docker pull monolithforensics/nginx:latest
docker pull monolithforensics/monolith:on-prem 
docker pull monolithforensics/monolith-api:latest
docker pull monolithforensics/monolith-forms:on-prem
docker pull mysql:8.0.16
```

{% endcode %}

### Export Container Images for Transfer

Run the following commands to export the container images to TAR files that can be transferred to the the host running the Monolith server:

{% code overflow="wrap" lineNumbers="true" %}

```
docker image save -o monolithfornesics_nginx.tar monolithforensics/nginx:latest
docker image save -o monolithforensics_monolith.tar monolithforensics/monolith:on-prem
docker image save -o monolithforensics_monolith-api.tar monolithforensics/monolith-api:latest
docker image save -o monolithforensics_relay.tar monolithforensics/monolith-forms:on-prem
docker image save -o mysql_8.0.16.tar mysql:8.0.16
```

{% endcode %}

You can now transfer these TAR files to the host system that runs your Monolith deployment.

### Import Container Images to Server

To import the TAR files, run the following commands on the host system that is using Docker to deploy the Monolith containers:

{% code lineNumbers="true" %}

```
docker image load -i monolithfornesics_nginx.tar
docker image load -i monolithforensics_monolith.tar
docker image load -i monolithforensics_monolith-api.tar
docker image load -i monolithforensics_relay.tar
docker image load -i mysql_8.0.16.tar
```

{% endcode %}

### Restart the Monolith Server

To restart Monolith with the new containers, run the following commands on your Monolith host and from the directory that includes your docker-compose.yml file:

{% code lineNumbers="true" %}

```
docker compose down
docker compose up -d
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.monolithforensics.com/monolith/monolith-features/on-premises-deployments/updates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
