> For the complete documentation index, see [llms.txt](https://docs.zigiwave.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zigiwave.com/installation-and-deployment/docker-deployment-guide.md).

# Docker Deployment Guide

ZigiOps can be deployed as a self-hosted Docker container, bundling all required services into a single image. This deployment model is suited for organizations that use containerized infrastructure and want a portable, self-managed ZigiOps installation.

The Docker image includes the following ZigiOps services:

* Platform
* Frontend
* Persistence
* Troubleshooting

All services start sequentially inside the container. Startup typically takes 1-2 minutes.

***

### Prerequisites

Before you begin, make sure the following requirements are met:

* Docker Engine is installed and running on the target host.
* The target host has internet access to download the ZigiOps image archive (or the archive has been transferred manually).
* A valid ZigiOps license file has been provided by ZigiWave.
* Port 8080 is available on the host for the ZigiOps UI. Additional ports may be needed for listener endpoints.

***

### Downloading the Docker Image

The ZigiOps Docker image is distributed as a `.tar` archive. Download the image for your target version from the following URL:

```
https://download.zigiwave.com/zigiops/docker/zigiwave.zigiops.{build-number}.tar
```

Replace `{build-number}` with the specific version number for your deployment.

After downloading, load the image:

```bash
docker load -i zigiwave.zigiops.<build-number>.tar
```

***

### Named Volumes

Named volumes are used so that data survives both container restarts and upgrades. Create the following volumes once and reuse them across all deployments:

| Volume Name                    | Container Path                  | Notes                          |
| ------------------------------ | ------------------------------- | ------------------------------ |
| `zigiops-persistence-conf`     | `/zigiops/persistence/conf`     | Seeded from image on first run |
| `zigiops-persistence-logs`     | `/zigiops/persistence/logs`     | Output only                    |
| `zigiops-troubleshooting-data` | `/zigiops/troubleshooting/data` | Seeded from image on first run |
| `zigiops-troubleshooting-logs` | `/zigiops/troubleshooting/logs` | Output only                    |
| `zigiops-frontend-logs`        | `/zigiops/frontend/logs`        | Output only                    |
| `zigiops-platform-audit`       | `/zigiops/platform/audit`       | Output only                    |
| `zigiops-platform-conf`        | `/zigiops/platform/conf`        | Seeded from image on first run |
| `zigiops-platform-logs`        | `/zigiops/platform/logs`        | Output only                    |

> **Note:** Volumes marked "Seeded from image on first run" are declared as `VOLUME` in the Dockerfile. Docker copies the default content from the image into the volume automatically the first time the container starts. On subsequent runs, including upgrades, the existing volume content is preserved and the image content is ignored.

***

### Scenario 1: Clean New Deployment

Use this when deploying ZigiOps for the first time on a host with no existing data.

{% stepper %}
{% step %}
**Load the image**

```bash
docker load -i zigiwave.zigiops.<version>.<build>.tar
```

{% endstep %}

{% step %}
**Create named volumes**

Run once. Skip if volumes already exist.

```bash
docker volume create zigiops-persistence-conf
docker volume create zigiops-persistence-logs
docker volume create zigiops-troubleshooting-data
docker volume create zigiops-troubleshooting-logs
docker volume create zigiops-frontend-logs
docker volume create zigiops-platform-audit
docker volume create zigiops-platform-conf
docker volume create zigiops-platform-logs
```

{% endstep %}

{% step %}
**Run the container**

```bash
docker run -d \
  --name zigiops \
  --restart unless-stopped \
  -p 8080:8080 \
  -v zigiops-persistence-conf:/zigiops/persistence/conf \
  -v zigiops-persistence-logs:/zigiops/persistence/logs \
  -v zigiops-troubleshooting-data:/zigiops/troubleshooting/data \
  -v zigiops-troubleshooting-logs:/zigiops/troubleshooting/logs \
  -v zigiops-frontend-logs:/zigiops/frontend/logs \
  -v zigiops-platform-audit:/zigiops/platform/audit \
  -v zigiops-platform-conf:/zigiops/platform/conf \
  -v zigiops-platform-logs:/zigiops/platform/logs \
  zigiwave/zigiops:<version>
```

The ZigiOps UI is available at `http://<host>:8080` once all services have started.
{% endstep %}
{% endstepper %}

***

### Scenario 2: Restart

Use this to restart the container without losing any data or configuration. Named volumes ensure all data is preserved automatically.

```bash
docker restart zigiops
```

Or stop and start separately:

```bash
docker stop zigiops
docker start zigiops
```

***

### Scenario 3: Upgrade

Use this when deploying a new version of ZigiOps over an existing installation. The same named volumes are reused, so all data and configuration is preserved.

{% stepper %}
{% step %}
**Load the new image**

```bash
docker load -i zigiwave.zigiops.<new-version>.<build>.tar
```

{% endstep %}

{% step %}
**Stop and remove the current container**

```bash
docker stop zigiops
docker rm zigiops
```

> **Note:** The named volumes are not removed by `docker rm`. All data is safe.
> {% endstep %}

{% step %}
**Run the new container with the same volumes**

```bash
docker run -d \
  --name zigiops \
  --restart unless-stopped \
  -p 8080:8080 \
  -v zigiops-persistence-conf:/zigiops/persistence/conf \
  -v zigiops-persistence-logs:/zigiops/persistence/logs \
  -v zigiops-troubleshooting-data:/zigiops/troubleshooting/data \
  -v zigiops-troubleshooting-logs:/zigiops/troubleshooting/logs \
  -v zigiops-frontend-logs:/zigiops/frontend/logs \
  -v zigiops-platform-audit:/zigiops/platform/audit \
  -v zigiops-platform-conf:/zigiops/platform/conf \
  -v zigiops-platform-logs:/zigiops/platform/logs \
  zigiwave/zigiops:<new-version>
```

> **Configuration note:** The conf volumes (`zigiops-persistence-conf`, `zigiops-platform-conf`) are not re-seeded from the new image during an upgrade. Docker keeps the existing volume content. If the new version introduces changes to default configuration files, those changes must be applied manually.

To inspect what the new image ships as defaults before upgrading:

```bash
docker run --rm zigiwave/zigiops:<new-version> cat /zigiops/platform/conf/<filename>
```

{% endstep %}
{% endstepper %}

***

### Rollback

If an upgrade needs to be rolled back, stop the new container and rerun the previous image version with the same volumes:

```bash
docker stop zigiops
docker rm zigiops

docker run -d \
  --name zigiops \
  --restart unless-stopped \
  -p 8080:8080 \
  -v zigiops-persistence-conf:/zigiops/persistence/conf \
  -v zigiops-persistence-logs:/zigiops/persistence/logs \
  -v zigiops-troubleshooting-data:/zigiops/troubleshooting/data \
  -v zigiops-troubleshooting-logs:/zigiops/troubleshooting/logs \
  -v zigiops-frontend-logs:/zigiops/frontend/logs \
  -v zigiops-platform-audit:/zigiops/platform/audit \
  -v zigiops-platform-conf:/zigiops/platform/conf \
  -v zigiops-platform-logs:/zigiops/platform/logs \
  zigiwave/zigiops:<previous-version>
```

***

### Useful Commands

```bash
# View container logs
docker logs zigiops

# Follow logs in real time
docker logs -f zigiops

# Open a shell inside the running container
docker exec -it zigiops bash

# List all named volumes
docker volume ls

# Inspect a volume (shows mount path on host)
docker volume inspect zigiops-platform-conf

# Remove the old image after a successful upgrade
docker rmi zigiwave/zigiops:<old-version>
```

***

### Optional Steps

#### Opening an Additional Custom Port

Some integrations require an extra port to be exposed. Add a `-p` flag to the `docker run` command for each additional port needed. Multiple ports can be added by repeating the flag:

```bash
-p 9090:9090 -p 9091:9091
```

#### Adding a Custom Certificate to the Truststore

Some connected systems use certificates that are not trusted by default. These must be imported into the truststore. The truststore is not a declared `VOLUME` in the Dockerfile, so the volume must be created and seeded manually before importing the certificate.

{% stepper %}
{% step %}
**Create the truststore volume**

```bash
docker volume create zigiops-platform-truststore
```

{% endstep %}

{% step %}
**Seed the volume with the default truststore from the image**

Mount the volume at a separate `/target` path so the original image path remains accessible for copying:

```bash
docker run --rm \
  -v zigiops-platform-truststore:/target \
  zigiwave/zigiops:<version> \
  cp -r /zigiops/platform/truststore/. /target/
```

{% endstep %}

{% step %}
**Import the custom certificate**

Place the certificate file (`.pem` or `.cer`) on the Docker host, then run `keytool` inside a temporary container:

```bash
docker run --rm \
  -v zigiops-platform-truststore:/zigiops/platform/truststore \
  -v /path/to/custom-cert.pem:/tmp/custom-cert.pem \
  zigiwave/zigiops:<version> \
  keytool -import -trustcacerts -alias custom-cert \
  -file /tmp/custom-cert.pem \
  -keystore /zigiops/platform/truststore/truststore.jks \
  -storepass <truststore-password> -noprompt
```

{% endstep %}

{% step %}
**Run the container with the truststore volume**

Add the truststore volume mount to the `docker run` command alongside the standard volumes:

```bash
docker run -d \
  --name zigiops \
  --restart unless-stopped \
  -p 8080:8080 \
  -v zigiops-persistence-conf:/zigiops/persistence/conf \
  -v zigiops-persistence-logs:/zigiops/persistence/logs \
  -v zigiops-troubleshooting-data:/zigiops/troubleshooting/data \
  -v zigiops-troubleshooting-logs:/zigiops/troubleshooting/logs \
  -v zigiops-frontend-logs:/zigiops/frontend/logs \
  -v zigiops-platform-audit:/zigiops/platform/audit \
  -v zigiops-platform-conf:/zigiops/platform/conf \
  -v zigiops-platform-logs:/zigiops/platform/logs \
  -v zigiops-platform-truststore:/zigiops/platform/truststore \
  zigiwave/zigiops:<version>
```

> **Note:** The truststore volume persists across restarts and upgrades. Additional certificates can be imported at any time by repeating Step 3 with a different `-alias` value, without needing to restart the container.
> {% endstep %}
> {% endstepper %}

***

### Related Documentation

* [Deployment Options](/integration-platform/deployment-options.md)
* [Installation on Linux](/installation-and-deployment/installation-linux.md)
* [Installation on Windows](/installation-and-deployment/installation-windows.md)
* [System Requirements](/integration-platform/system-requirements.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.zigiwave.com/installation-and-deployment/docker-deployment-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
