ESPHome turns affordable microcontrollers like the ESP32 or ESP8266 into smart home devices: temperature sensors, relays, LED strips, or motion detectors. You describe the device in a short YAML file, ESPHome builds the appropriate firmware, and then installs it on the chip. The interface for this is called ESPHome Device Builder (formerly “ESPHome Dashboard”). The finished devices work closely with Home Assistant and appear there as individual devices with sensors and switches.
In this guide, we’ll show you two ways to get started: the easy way using a One-Click App, which provides the Device Builder over HTTPS with password protection, and a manual installation using Docker Compose. Then you’ll create your first device, transfer its firmware, and add it to Home Assistant. You’ll also learn what isn’t possible on a server in a data center and how to work around those limitations.
Many people install the Device Builder directly on their PC or as an add-on in Home Assistant OS. A VPS is a good choice if:
- Your Home Assistant already runs on the VPS, for example as a One-Click App, and you want to manage your devices and configurations in one place.
- Your computer at home is underpowered, such as a Raspberry Pi. Compiling firmware requires a lot of processing power and RAM, and it’s much faster on a VPS.
- You want to work on your device configurations from anywhere, in a browser and without installing software on each PC.
- You build firmware for multiple locations, such as your home and vacation home.
A VPS is less suitable if you want to conveniently update devices over the network without a VPN, or if you need automatic device discovery. The server isn’t on your home network: it can only reach your devices through a VPN, and you can’t connect a USB cable to the server. See “Limitations on a VPS” for more details.
The fastest way to get the ESPHome Device Builder running on your VPS is through its One-Click Apps. The app is accessible directly over HTTPS using a domain and is installed with an automatically generated username and password. You don’t need a reverse proxy or certificate.
- A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Set up One-Click Apps for instructions.
- Enough resources: The values in the Requirements table below also apply to the One-Click App. ESPHome needs a lot of RAM and storage, especially when compiling for the ESP32.
- Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
- Search the app catalog for ESPHome and click Install app.
- Use a custom subdomain or zap.cloud is already selected, with a random name. Leave this option enabled or enter a name of your own, such as
esphome. You’ll use the domain to access the Device Builder over HTTPS. You also need it to flash a device directly from your browser over USB. - You don’t need to fill in anything under App configuration. A username and password are generated automatically.
- Click Queue installation. ESPHome will be ready in one to two minutes.
- Click the gear icon on the app card and go to App environment.
- Under Automatically generated values, you’ll find
SERVICE_USER_ADMIN(username) andSERVICE_PASSWORD_ADMIN(password). Click the eye icon to reveal a value, or click the icon next to it to copy it. - Open the app using the Access link. The Device Builder displays the “Sign in” page.
- Sign in with the username and password from the App environment.
When you log in for the first time, a short setup wizard asks whether you want to use the interface for beginners (“New to ESPHome”) or advanced users (“Expert”). You can change this later in the settings.
The One-Click App runs on the VPS’s network (host network) and has elevated permissions so ESPHome can access devices on the local network and USB ports. This means the Device Builder is also directly accessible at http://SERVER_IP:6052, in addition to its HTTPS address. This direct connection is not encrypted. The same login details work for both access methods.
Use only the HTTPS address; otherwise, your username and password will be sent over the internet unencrypted. In the Network firewall tab for your VPS, add a rule to drop incoming traffic on TCP port 6052. The HTTPS address will continue to work because the One-Click Apps proxy accesses the Device Builder from within the server. Treat the password like a server password: anyone who can sign in can also use custom components to run commands on your VPS.
Install new versions from the app’s gear icon: In the App update tab, click Check for updates to see if a newer version is available, then install it with Apply update. Your device configurations and secrets.yaml will be preserved because they’re stored in the app’s data volume.
Back up your VPS before making major changes, for example using Backups in the dashboard. You can also open individual configurations in the Device Builder and copy the YAML text. You don’t need to back up compiled firmware or ESP32 tools; ESPHome will download them again when needed.
The rest of this guide covers the manual installation of the ESPHome Device Builder with Docker Compose on your VPS, for example if you don’t use One-Click Apps on the server or want to run ESPHome behind your own reverse proxy.
- A Linux VPS running Debian or Ubuntu, with SSH access. See First access via SSH.
- Docker and Docker Compose (Compose v2). See Install Docker. Check the installation with
docker --versionanddocker compose version. - A domain or subdomain whose A record points to your VPS’s IP address (e.g.
esphome.example.com).
The Device Builder uses few resources when idle. However, the first time you compile for the ESP32, ESPHome downloads around 2 GB of tools. In our test on a VPS with 4 vCPU cores, RAM usage rose to about 2.5 GB. The first build took just under three minutes; each subsequent build took only seconds.
| Hardware | Minimum | Recommended |
|---|---|---|
| CPU | 2 vCPU cores | 4 vCPU cores |
| RAM | 2 GB | 4 GB |
| Storage | 10 GB | 20 GB |
The Device Builder listens on port 6052. You don’t need to open this port if you use a reverse proxy as described below. With ufw, allow only SSH and the ports used by the reverse proxy:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Ports published by Docker using ports: are also accessible from outside, even if ufw blocks them. Therefore, bind the Device Builder to 127.0.0.1 as described below. For more information about the firewall, see Open ports and manage the firewall on Linux.
Create a directory for ESPHome and generate a password for signing in. The command writes it directly to the .env file without displaying it:
mkdir -p /opt/esphome/config
cd /opt/esphome
echo "ESPHOME_USERNAME=admin" > .env
echo "ESPHOME_PASSWORD=$(openssl rand -hex 24)" >> .env
chmod 600 .env
You can read the password later with grep ESPHOME_PASSWORD .env. Then create the docker-compose.yml file:
services:
esphome:
image: ghcr.io/esphome/esphome:2026.11
container_name: esphome
restart: unless-stopped
env_file: .env
ports:
- "127.0.0.1:6052:6052"
volumes:
- ./config:/config
- /etc/localtime:/etc/localtime:ro
Start the container:
docker compose up -d
Important lines:
image: The official image. Using a year-and-month tag such as2026.11means an update will include bug fixes for that version, but not changes that could break your configurations. The documentation advises against usinglatestfor automatic updates.env_file: The username and password for signing in. WithoutESPHOME_USERNAMEandESPHOME_PASSWORD, the Device Builder starts without any authentication. Older guides may still refer toUSERNAMEandPASSWORD; these names are outdated.ports: The Device Builder is accessible only from the server itself. You can access it from outside through the reverse proxy or an SSH tunnel.volumes: Your device configurations are stored in/opt/esphome/config, along withsecrets.yamlcontaining your Wi-Fi credentials. The downloaded tools and builds are stored in.esphome.
The official Compose file also uses network_mode: host and privileged: true. These are needed only if devices are on the same network (for mDNS) or connected to the server over USB. Neither applies to a VPS in a data center, so we leave them out.
Before setting up the reverse proxy, access the Device Builder through an SSH tunnel. On your PC, run:
ssh -L 6052:127.0.0.1:6052 root@SERVER_IP
Then open http://localhost:6052 in your browser and sign in with admin and the password from .env.
To access the Device Builder from outside, set up a reverse proxy with a valid certificate in front of it. For the basics, see Set up a reverse proxy with nginx and Create an SSL certificate (Let's Encrypt). The Device Builder uses WebSockets for logs and builds, so the server block needs the Upgrade headers:
server {
listen 80;
server_name esphome.example.com;
location / {
proxy_pass http://127.0.0.1:6052;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 3600s;
}
}
Then get the certificate with certbot --nginx -d esphome.example.com. Certbot adds HTTPS and HTTP redirection to the block. The long proxy_read_timeout prevents nginx from stopping a long build or an open log view after one minute.
If nginx doesn’t forward the host name, the Device Builder rejects the WebSocket connection. Check the proxy_set_header Host $host line. Alternatively, add your domain to .env as ESPHOME_TRUSTED_DOMAINS=esphome.example.com and restart the container with docker compose up -d.
For more tips on securing your server, see Linux security tips.
Everything important is in the config directory: your device YAML files and secrets.yaml. You can leave out the .esphome subdirectory containing tools and builds:
cd /opt/esphome
tar --exclude='config/.esphome' -czf esphome-backup-$(date +%F).tar.gz config docker-compose.yml .env
The backup contains your Wi-Fi credentials and device keys. Store it securely, and don’t keep it only on the VPS.
First, read the “Breaking Changes” section for the new version in the changelog. Then update the tag in docker-compose.yml, for example to ghcr.io/esphome/esphome:2026.12, and restart:
cd /opt/esphome
docker compose pull
docker compose up -d
Your devices will continue running their old firmware. To install the new version on a device, flash its firmware again as described in the next section. Remove old images with docker image prune.
The following steps are the same for the One-Click App and the manual installation.
- In the Device Builder, click Create device and then Create new project.
- Select your board. Use the search field to find a board such as “ESP32 DevKit V1,” or use the filters at the top to narrow down the chip type (ESP32, ESP8266, RP2040, and others). If you’re not sure exactly which board you have, select the generic option for your chip.
- Give the device a name, for example “Living Room Sensor.” This creates the hostname
living-room-sensor, which the device will use to appear on the network. - Enter your Wi-Fi name and password, then click Finish setup.
The Device Builder creates a configuration with Wi-Fi, Logger, OTA updates, and the Home Assistant interface. It stores your Wi-Fi details in secrets.yaml and references them in the device configuration using !secret wifi_ssid. For the connection to Home Assistant, it creates a unique key under api: > encryption: > key. Add sensors, switches, and automations on the left under Components and Automations, or directly in the YAML editor on the right.
A new device doesn’t have ESPHome firmware installed yet and doesn’t know your Wi-Fi network. Therefore, the first flash must be done over a USB cable. Click Install on the device card. The Device Builder will show you several options:
- Plug into this computer: The device is connected to your PC via USB. The Device Builder compiles the firmware on the VPS and flashes it through your browser (Web Serial). This works in Chrome and Edge, and only over HTTPS, so use the app’s domain.
- Plug into computer running ESPHome Device Builder: The device is connected to the server. This isn’t possible on a VPS in a data center.
- On the network: For updates over Wi-Fi. A new device isn’t reachable this way yet.
- Advanced options > Download firmware binary: The Device Builder compiles the firmware, which you download and flash yourself.
If flashing through the browser doesn’t work, download the firmware instead. In the next window, select Factory image for the first flash. OTA update is only for updates over the network. Then open ESPHome Web in Chrome or Edge on the PC connected to the device, click Connect, select the USB port, and flash the downloaded file by clicking Install.
If the USB port doesn’t appear in the list, your PC probably needs a driver for the board’s USB chip (often CP2102 or CH340). Also check that your cable supports data transfer and isn’t for charging only. Some boards need to be put into flash mode when connecting by holding down the BOOT button.
The first build takes a few minutes because ESPHome downloads the tools for the chip. After that, the device restarts and connects to your Wi-Fi network.
After the first flash, ESPHome can install new firmware over Wi-Fi (OTA). To do so, the VPS must be able to reach the device directly; this isn’t possible from outside your home network. You have two options:
- VPN between the VPS and your home network: If your home network is connected to the VPS through a VPN (see the next section), select On the network under Install. To help the Device Builder find the device, assign it a fixed address: either select Advanced options > Device IP or hostname, or add
use_address: 192.168.178.50underwifi:in the configuration. The Device Builder will then also show whether the device is online. - Without a VPN, using the browser: Add the
web_server:component to the configuration and add- platform: web_serverunderota:. The device will then provide its own web page on your home network, where you can upload a downloaded file in OTA update format. Protect the page underweb_server:withauth:(using the username and password fromsecrets.yaml); otherwise, anyone on your Wi-Fi network can install firmware.
Home Assistant communicates directly with your ESPHome devices through their own interface (TCP port 6053). The Device Builder doesn’t need to be running for this. The only requirement is that Home Assistant can reach the device over the network.
If Home Assistant runs at home, it automatically finds new ESPHome devices on the same network. If Home Assistant runs on a VPS, for example as a One-Click App, connect the server and your home network through a VPN. For instructions on setting up WireGuard on the VPS and connecting a router such as a FRITZ!Box or a Raspberry Pi at home as a peer, see the “Connect devices at home” section of Install Home Assistant with Docker on a VPS. If you prefer a web interface, use WireGuard Easy. There, enter your home network under “Server Allowed IPs” for the client on the device at home.
Assign fixed IP addresses to your ESPHome devices in your router. Automatic discovery using mDNS won’t work over a VPN, so you’ll always need to connect to the devices using their IP addresses.
- In Home Assistant, open Settings > Devices & services and click Add integration.
- Search for ESPHome.
- Enter the device’s IP address as the Host and leave the port set to
6053. - Home Assistant will ask for the encryption key. You can find it in the device configuration in the Device Builder under
api:>encryption:>key. The value is hidden in the editor; click the eye icon at the top to reveal it. - Assign the device to an area. Its sensors and switches will then appear as entities in Home Assistant.
If you later change the configuration, for example to add a sensor, and flash the firmware again, Home Assistant will automatically add the new entities.
- No USB connection to the server: You can’t connect a device to a VPS in a data center. The first flash must always be done through the browser on your PC (Web Serial or ESPHome Web).
- No automatic discovery: mDNS doesn’t work from a data center or through a VPN. The Device Builder won’t automatically show devices at your home. Use fixed IP addresses instead.
- Network updates require a VPN: Without a VPN, you’ll need to download the file, use a browser, and access the device’s web page.
- No connection without internet: If your internet connection goes down, Home Assistant on the VPS will lose contact with the devices. The devices themselves will continue running, and their own automations (
on_...triggers) will work even without a connection. - Protect your login details:
secrets.yamlcontains your Wi-Fi credentials. Never run the Device Builder without a password or share your password.
You’ve set up the ESPHome Device Builder on your VPS, created your first device, flashed its firmware over USB, and added it to Home Assistant. With a VPN to your home network, you can then conveniently install updates over Wi-Fi and build new sensors directly in your browser.
Prefer to avoid the Docker setup? Use the easy One-Click App option described above under “Easy option: ESPHome as a One-Click App.”