Deploy OpenEMS Edge to Docker

This chapter explains how OpenEMS can be deployed using our official Docker image.

Prerequisites:

  • A amd64 or arm64 device running Linux. You need the IP address and SSH access.

  • A working docker environment. To setup follow instruction from docs.docker.com.

1. Prepare system

1.1. Connect to the device

ssh admin@raspi5

1.2. Check docker installation

admin@raspi5:~$ docker --version
Docker version 27.3.1, build ce12230

if not already installed, follow Setup docker

1.3. Setup docker

To setup docker follow the instructions from docs.docker.com.

2. Start Container

2.1. Create a Docker compose

Paste content into a docker-compose.yml in a directory of your choice:

services:
  openems-edge:
    image: openems/edge:latest
    container_name: openems_edge
    hostname: openems_edge
    restart: unless-stopped
    volumes:
      - openems-edge-conf:/var/opt/openems/config:rw
      - openems-edge-data:/var/opt/openems/data:rw
    ports:
      - 8080:8080 # Apache-Felix

volumes:
  openems-edge-conf:
  openems-edge-data:

2.2. Run compose file

To start the previously created docker-compose.yml cd into the directory of it and run the command:

docker compose up -d

2.3. Check logs

To check if the container is up and running, check docker ps:

admin@raspi5:~$ docker ps
CONTAINER ID  IMAGE                 COMMAND   CREATED               STATUS
0b2d32fe6203  openems/edge:latest   "/init"   About a minute ago    Up About a minute

or read its logs with:

docker logs openems_edge

3. OpenEMS Edge UI

If you want to add the OpenEMS Edge UI to your setup, you can do so by adjusting your docker-compose.yml file to look like this:

services:
  openems-edge:
    image: openems/edge:latest
    container_name: openems_edge
    hostname: openems_edge
    restart: unless-stopped
    volumes:
      - openems-edge-conf:/var/opt/openems/config:rw
      - openems-edge-data:/var/opt/openems/data:rw
    ports:
      - 8080:8080 # Apache-Felix
      - 8085:8085 # UI-Websocket

  openems-ui:
    image: openems/ui-edge:latest
    container_name: openems_ui
    hostname: openems_ui
    restart: unless-stopped
    volumes:
      - openems-ui-conf:/etc/nginx:rw
      - openems-ui-log:/var/log/nginx:rw
    environment:
      - WEBSOCKET_HOST=openems_edge
      - WEBSOCKET_PORT=8085
    ports:
      - 80:80
      - 443:443

volumes:
  openems-edge-conf:
  openems-edge-data:
  openems-ui-conf:
  openems-ui-log:

Summary of the changes:

  1. Open a Port for UI Websocket (8085) on the openems-edge service

  2. Added a new service openems-ui to the docker-compose file

  3. Added the volumes openems-ui-conf and openems-ui-log

3.1. Update docker-compose

Update the compose running with: docker compose up -d

3.1.1. Check container status

admin@ubuntu:~$ docker ps
CONTAINER ID  IMAGE                   COMMAND   CREATED               STATUS
018187f444b1  openems/ui-edge:latest  "/init"   About a minute ago    Up About a minute
0b2d32fe6203  openems/edge:latest     "/init"   About a minute ago    Up About a minute

4. Changing the Language in the UI

To change the language in the OpenEMS UI:

  1. Open the OpenEMS Edge UI in your browser.

  2. Click the menu-icon in the top-left corner of the UI.

  3. Click on the user to enter user settings.

  4. Choose your preferred language from the "Sprache wählen"/"Select language" dropdown.

  5. The UI will immediately switch to the selected language.

5. Next Steps

After successful deployment:

  1. Open your browser and go to http://localhost or the IP address of your device.

  2. Log in using default credentials provided in the documentation.

  3. Verify that your OpenEMS Edge instance is connected and running.

  4. For additional configuration, see: