# Self-host ESPHome

> A dashboard to build, flash and manage firmware for ESP32 and ESP8266 smart home devices.

- Page: https://levelrail.com/templates/esphome/
- JSON: https://levelrail.com/templates/esphome.json
- Category: Applications
- Licence: GPL-3.0-only (Copyleft license)
- Source: https://github.com/esphome/esphome
- Upstream docs: https://esphome.io/

## Requirements
- Memory: about 512 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: 2026.10.2

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| esphome | esphome/esphome | 2026.10.2 | 6052 | config -> /config |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| esphome | PASSWORD | generated |
| esphome | TZ | preset |
| esphome | USERNAME | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install esphome --name my-esphome
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain esphome=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/esphome/install \
  -d '{
    "name": "my-esphome"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## First run
1. Sign in as admin with the generated password.

## Questions

### Can I deploy ESPHome on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for ESPHome, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image esphome/esphome:2026.10.2 is what you deploy there.

Self-host ESPHome, ESPHome docker compose file, deploy ESPHome on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
