View Categories

Install with Docker Compose (advanced)

Free Pro

What the Compose project contains #

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

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

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:
VariableWhat to set
MW_DB_NAMEDatabase name.
MW_DB_USERDatabase user.
MW_DB_PASSWORDDatabase password. Change the example value.
MW_SERVER_IPThe 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_SECRETRADIUS shared secret between routers and MikroWizard.
MW_encryptKeyLeave it: prepare.sh replaces it with a new random key.
CONF_PATH, FIRMWARE_PATH, BACKUPS_PATHHost 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.

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 #