Deployment

The DER Simulator ships as a signed binary on three platforms:

Form factor When to use What you install
Docker image CI, cloud demos, isolated test sessions, multi-host orchestration Image tarball from downloads.dersec.io, loaded with docker load
Debian package (.deb) Edge gateways running Debian, Ubuntu, or Raspberry Pi OS sudo dpkg -i dersim_*.deb
OpenWrt package (.ipk) Embedded gateways running OpenWrt / busybox opkg install dersim_*.ipk

All three carry the same underlying simulator binary, the same CLI surface, and the same dashboard / REST / Modbus / OCPP / DNP3 endpoints. Pick the form factor that matches the host environment.

Docker image

The recommended form factor for CI, shared lab environments, and cloud demos. The container image ships as an OCI tarball you download from downloads.dersec.io and load into your local Docker daemon:

# Download dersim-<version>-<arch>.tar.gz from downloads.dersec.io,
# then:
docker load -i dersim-<version>-<arch>.tar.gz

docker run --rm \
  -e DERSIM_LICENSE="$DERSIM_LICENSE" \
  -p 8111:8111 -p 8502:8502 \
  dersim:latest \
  --device_type PV-3Phase --csip_client_enable no

The tarball carries the same image tags the manifest table below lists; once loaded, the image lives in your local Docker daemon exactly as if it had been pulled from a registry. Re-push to your own internal registry if you want to share it across hosts.

The image's default Cmd is /app/dersim -wi 0.0.0.0. Passing arguments after the image tag appends them; if you need to override Cmd entirely (e.g. to use a different entrypoint), re-supply /app/dersim -wi 0.0.0.0 explicitly first or tini exits with a confusing message.

Architecture variants

The latest tag points to a multi-platform manifest Docker resolves per-host. For pinned-architecture deployments, use the explicit suffixes:

Tag Platform
latest-amd64 / <version>-amd64 Linux x86_64
latest-arm64 / <version>-arm64 Linux ARM 64-bit (RPi 4, Apple Silicon)
latest-arm32 / <version>-arm32 Linux ARM 32-bit (RPi 3, older embedded)

Debian package (.deb)

For edge gateways running Debian-family distributions (Debian, Ubuntu, Raspberry Pi OS). The .deb bundles the simulator binary plus a systemd unit and a config file under /etc/dersim/.

sudo dpkg -i dersim_<version>_<arch>.deb
sudo systemctl enable --now dersim

The systemd unit picks up flags from /etc/dersim/dersim.env. The license file goes in /etc/dersim/license.key (read by the unit's EnvironmentFile=). The post-install hook handles directory ownership and ensures the unit runs as dersim:dersim.

Architecture .deb filename pattern
x86_64 dersim_<version>_amd64.deb
ARM 64-bit dersim_<version>_arm64.deb
ARM 32-bit dersim_<version>_armhf.deb

Once installed, manage the service the usual systemd way:

sudo systemctl status dersim
sudo systemctl stop dersim
sudo journalctl -u dersim -f

OpenWrt package (.ipk)

For embedded gateways running OpenWrt / busybox. Same content as the .deb but packaged for opkg.

opkg install dersim_<version>_<arch>.ipk
/etc/init.d/dersim enable
/etc/init.d/dersim start

The init script is BusyBox-compatible; flags live in /etc/config/dersim per OpenWrt convention. Logs go to logread under the dersim tag.

Architecture .ipk filename pattern
ARM 64-bit dersim_<version>_aarch64_generic.ipk
ARM 32-bit dersim_<version>_arm_cortex-a7_neon-vfpv4.ipk

OpenWrt cross-builds are produced per-target; if your gateway's target triple isn't in the published artifact list, contact DERSec support for a custom build.

License plumbing

Every form factor requires a valid license at startup. The license is a base64-encoded JSON blob signed by DERSec's ECDSA key:

{
  "product": "DERSim",
  "expires": "2030-12-31",
  "email": "customer@example.com",
  "features": [...]
}

Three places the binary looks for it:

  • DERSIM_LICENSE env var — used by the Docker image (set via docker run -e or compose environment:) and any harness that drives the binary directly.
  • /etc/dersim/license.key — used by the systemd unit (.deb) and the OpenWrt init script (.ipk). Plain-text file owned by root:dersim with mode 0640.
  • LICENSE_KEY env var — fallback variant for systems where DERSIM_LICENSE is reserved by something else.

License expiry is enforced at startup and re-checked daily; an expired license logs a clear error and exits. For air-gapped deployments needing license rotation, drop the new file in place and restart the unit.

Talk to DERSec support to provision a license for your deployment — license terms cover expiration, allowed device types, and any feature flags relevant to your use case.

Stopping cleanly

All form factors handle SIGTERM gracefully:

  • Drains any active OCPP transactions with reason=PowerLoss StopTransactions to the CSMS
  • Closes the CSIP client cleanly with a final DERStatus PUT
  • Releases serial ports (RTU) and TCP listeners
  • Flushes the log buffer

The default systemd / opkg / docker stop timeout (10 s) is sufficient for clean shutdown under normal conditions; for stations with slow-CSMS scenarios bump the timeout to 30 s to let the drain finish.