Web Server OTA Updates
The Web Server OTA platform allows you to upload new firmware binaries to your ESPHome devices directly through the web interface. This provides a user-friendly way to update devices without needing command-line tools or the ESPHome dashboard.
When enabled, an “OTA Update” section appears on the device’s web interface where you can select and upload a firmware file. This is particularly useful for devices that are deployed in the field or when you want to allow non-technical users to perform updates.
⚠️ Warning
Enabling OTA updates through the web interface without authentication allows anyone with network access to your device to upload new firmware. It is strongly recommended to enable authentication on the web server when using this feature.
# Example configuration entry
web_server:
port: 80
auth:
username: !secret web_server_username
password: !secret web_server_password
ota:
- platform: web_serverConfiguration variables
- id (Optional, ID): Manually specify the ID used for code generation.
- All automations supported by Over-the-Air Updates.
ℹ️ Note
This platform requires the Web Server Component component to be configured in your device.
Migration from Legacy Configuration
Prior to ESPHome 2025.7.0, OTA functionality was built into the web_server component using the ota option.
This has been moved to a separate platform for consistency with other OTA methods.
Old configuration:
web_server:
port: 80
ota: true # or ota: false to disableNew configuration:
web_server:
port: 80
ota:
- platform: web_server # Add this to enable web OTAIf you previously had ota: false in your web_server configuration, simply remove that line and don’t add the
web_server OTA platform.
Example Configurations
Basic setup with web server OTA:
# Basic configuration
web_server:
port: 80
ota:
- platform: web_serverSecure setup with authentication:
# Recommended: with authentication
web_server:
port: 80
auth:
username: admin
password: !secret web_password
ota:
- platform: web_serverUsing the Web Interface
- Navigate to your device’s web interface at
http://<device-ip>/orhttp://<device-name>.local/ - If authentication is enabled, enter your username and password
- Scroll down to the “OTA Update” section
- Click “Choose File” and select your firmware file (
firmware.bin) - Click “Update” to start the upload
- Wait for the upload to complete - the device will automatically reboot with the new firmware
⚠️ Warning
- Always use
firmware.binorfirmware.ota.binfiles for OTA updates, notfirmware.factory.binfiles- The web interface may become unresponsive during the update process - this is normal
- Do not power off the device during an update