# Flashing ESPHome ESPHome can be flashed in few different ways, depending on your needs. !!! abstract All binary files generated by ESPHome will be in `.esphome/build//.pioenvs//`. The methods described below may require you to get a file from that directory. If you're using the GUI (ESPHome Dashboard) this path will be in your `configs/` directory. This path will be referred to as **build directory**. ## Built-in flasher === "CLI" The flasher program built-in LibreTuya is also available for ESPHome. - use `python -m esphome run yourdevice.yml` to recompile AND upload the firmware - use `python -m esphome upload yourdevice.yml` to upload without recompiling {% include-markdown "inc/uart-info.md" %} If your device is already running ESPHome, refer to the OTA guide below. === "GUI" The built-in flasher is not yet available in the GUI. Here are your options: - OTA, using the downloaded UF2 file (if you're already running ESPHome) - wired (also UF2), using ltchiptool - wirelessly, using tuya-cloudcutter Read below for more details on each of these methods. ## Over-the-Air (OTA) This method requires having ESPHome already installed on your device. - If you've added the Web Server component, navigate to the device's IP address (or `.local` name) in your web browser. Grab `firmware.uf2` from the build directory and drop it on the "OTA Update" field. - You can also use ESPHome CLI to flash via OTA. Add a `--device` argument to the command, as such: `python -m esphome upload yourdevice.yml --device yourdevice.local` {% include-markdown "inc/uart-ltchiptool.md" %} {% include-markdown "inc/ota-cloudcutter.md" %} {% include-markdown "inc/ota-openbeken.md" %}