---
title: Install with Docker Compose (advanced)
description: Deploy MikroWizard with the public Docker Compose project instead of the installer script.
url: "https://mikrowizard.com/docs/install-with-docker-compose/"
updated: "2026-11-25"
category: "Install & Upgrade"
---

# Install with Docker Compose (advanced)

Free Pro

 The [installer script](https://mikrowizard.com/docs/install-the-mikrowizard/) is the recommended way to install MikroWizard. Use Docker Compose only if you already run your services with Compose and are comfortable managing containers yourself.

## What the Compose project contains

The project is public on GitHub: `MikroWizard/docker-compose-deployment`.

| Service | What it runs |
| --- | --- |
| `postgres` | PostgreSQL database (image `postgres:latest`), data in the Docker volume `db_data`. |
| `redis` | Redis Stack server (image `redis/redis-stack-server:latest`). |
| `mikroman` | The MikroWizard back end. The image is built locally and downloads the MikroMan source from GitHub while it builds. Runs in host network mode. |
| `mikrofront` | The web interface on port 80 (nginx). Forwards `/api` to the back end on port 8181. |

 The Compose project does not include the Terminal Gateway, and it serves the web interface over HTTP on port 80 only.

## Before you start

- Docker with the Compose plugin (`docker compose`).
- `git` and `python3` on the host (the prepare script uses Python to create the encryption key).
- Ports 80, 5432 and 6379 free on the host.

## Install

1. Clone the project:

```
git clone https://github.com/MikroWizard/docker-compose-deployment.git mikrowizard
cd mikrowizard
```

1. Edit the `.env` file:

| Variable | What to set |
| --- | --- |
| `MW_DB_NAME` | Database name. |
| `MW_DB_USER` | Database user. |
| `MW_DB_PASSWORD` | Database password. Change the example value. |
| `MW_SERVER_IP` | The server IP address routers use to reach MikroWizard (RADIUS, syslog, firmware). It is also used for the first System URL (`http://<MW_SERVER_IP>`). |
| `MW_RAD_SECRET` | RADIUS shared secret between routers and MikroWizard. |
| `MW_encryptKey` | Leave it: `prepare.sh` replaces it with a new random key. |
| `CONF_PATH`, `FIRMWARE_PATH`, `BACKUPS_PATH` | Host folders for the configuration, firmware files and backups. Defaults are under `/opt/mikrowizard/`. |

1. Run the prepare script. It creates the host folders, writes a new encryption key into `.env` and creates `server-conf.json` in `CONF_PATH` and in the `mikroman` folder:

```
chmod +x prepare.sh
./prepare.sh
```

The script uses `sudo` to create the folders and files.

1. Build and start the services:

```
docker compose up -d --build
```

On the first start the back end waits for PostgreSQL, creates the tables, and adds the default settings and the `mikrowizard` user.

1. Open `http://<server IP>` and sign in with username `mikrowizard` and password `mikrowizard`. Then continue with [First login and changing the admin password](https://mikrowizard.com/docs/first-login-admin-password/).

## Keep the encryption key safe

`MW_encryptKey` (also stored as `PYSRV_CRYPT_KEY` in `server-conf.json`) encrypts the saved device passwords. Back it up together with the database. If you lose it, MikroWizard can't read the stored credentials.

## Check the logs

```
docker compose logs -f mikroman
```

## Related

- [System requirements](https://mikrowizard.com/docs/system-requirements/)
- [Network and firewall requirements](https://mikrowizard.com/docs/network-and-firewall-requirements/)
- [Install MikroWizard with the installer script](https://mikrowizard.com/docs/install-the-mikrowizard/)
