Skip to content

Standalone Docker

Hanergy can run as a standalone Docker container on any machine, connecting to Home Assistant over the network via the REST API. This is the recommended approach for users running Home Assistant Core in Docker, or those who want Hanergy on a separate server.


Terminal window
docker run -d --name hanergy \
-p 8099:8099 \
-e HA_URL=http://homeassistant.local:8123 \
-e HA_TOKEN=your_long_lived_access_token \
-v hanergy-data:/config/addons/hanergy \
ghcr.io/cusspvz/hanergy:latest

Then open http://your-server-ip:8099 in a browser to access the Hanergy UI.


Hanergy needs a long-lived access token to communicate with Home Assistant.

  1. In Home Assistant, click your user profile icon in the bottom-left of the sidebar.
  2. Scroll down to Long-Lived Access Tokens.
  3. Click Create Token.
  4. Give it a name (e.g., “Hanergy”) and click OK.
  5. Copy the token immediately — it is only shown once.

VariableRequiredDescription
HA_URLYesFull URL to your Home Assistant instance, including the port (e.g., http://192.168.1.100:8123)
HA_TOKENYesLong-lived access token created in the step above

The -v hanergy-data:/config/addons/hanergy volume mount ensures that your configuration (energy sensors, devices, priorities, engine settings) persists across container restarts and upgrades.


Hanergy publishes container images for three architectures:

ArchitectureImage TagTypical Hardware
amd64ghcr.io/cusspvz/hanergy:latestIntel/AMD PCs, most NAS devices
aarch64ghcr.io/cusspvz/hanergy:latestRaspberry Pi 4/5, Apple Silicon (via Rosetta)
armv7ghcr.io/cusspvz/hanergy:latestRaspberry Pi 3, older ARM boards

Docker automatically pulls the correct image for your platform when using the latest tag.


For users who prefer Docker Compose:

services:
hanergy:
image: ghcr.io/cusspvz/hanergy:latest
container_name: hanergy
restart: unless-stopped
ports:
- "8099:8099"
environment:
- HA_URL=http://homeassistant.local:8123
- HA_TOKEN=your_long_lived_access_token
volumes:
- hanergy-data:/config/addons/hanergy
volumes:
hanergy-data:

After starting the container, open the Hanergy UI at http://your-server-ip:8099. On the first run, the setup wizard launches automatically.

If the connection to Home Assistant fails:

  1. Check the container logs: docker logs hanergy

  2. Verify that HA_URL is reachable from the Docker host.

  3. Confirm the access token is valid by testing it with curl:

    Terminal window
    curl -s -H "Authorization: Bearer your_token" \
    http://homeassistant.local:8123/api/ | head -1

    A successful response returns {"message": "API running."}.


Complete the Setup Wizard