Easily upgrade Tasmota to a newer version or different build while keeping all your settings
The first rule of upgrading: If it ain't broke, don't fix it!
In other words, ensure that there is a good reason to mess with a working installation (e.g., a need to use a new feature or address a found problem fixed in the current version).
Backup before upgrading
Any time you upgrade it is highly recommended to back up your device settings. That is easily done from the webUI using Configuration - Backup Config.
If you wish to switch to a different build or use development branch you need to download a binary file (gzipped or regular) or change the OTA Url link.
Download binaries from:
- Official firmware server:
- Current release
- Development branch
- Older release binaries: 9.1.0, 8.5.1, 7.2.0, 6.7.1. You can build a similar URL for another release.
- Your personal OTA server
Gzipped binaries can be used only once you've upgraded to atleast Tasmota 8.2
Trying to upgrade with a gzipped binary using versions older than 8.2 will fail.
Tasmota 8.2 introduced upgrading using gzipped binaries which are smaller in size and will likely skip the intermediary minimal build installation. This makes the upgrade process faster and straightforward.
To use simply add
.gz to the existing OTA Url or download the
.bin.gz binary from the official OTA Server and the next upgrade will use the compressed file.
Follow the path strictly to ensure success. Do not install only tasmota-minimal.bin but upgrade to full, working firmware. Linked
-lite.bin binaries will do the job. If you want to download binaries from the upgrade flow links, you may need to do a right-click and save the file, depending on your browser security rules.
Tasmota v9.1 introduced a major change in GPIO mapping
Downgrading is not recommended and will probably not work correctly.
Tasmota v8.1 introduced a major change in parameter storage.
Downgrading is not recommended and upgrading to 8.1 has to follow the recommended path and can still fail in some cases. Don't forget to backup!
Upgrade using webUI~
Upgrading the device firmware over-the-air, aka OTA, is the most convenient way to upgrade.
To start the upgrade, open a web browser to your device's web UI and select Firmware Upgrade.
You are presented with two choices:
- Upgrade by webserver - use an OTA server
- Upgrade by file upload - uploading a downloaded or self-compiled binary file from your computer
Upgrade by web server~
If you want to upgrade to the latest release version click the first Start Upgrade button. This screen should appear
During this process Tasmota will download the new firmware from the url and install it. If you're not using a gzipped binary it might need to download
tasmota-minimal.bin first, but all that happens automatically. All you have to do is wait 2 to 5 minutes.
After the upgrade is completed you can reconnect back to the web UI and check the firmware version on the bottom of the page or in the Information tab of the webUI.
Upgrade by file upload~
Go to Firmware Upgrade. This time browse to the binary you want to upgrade to with Choose File and click Start upgrade.
In our example it's
You will see an Upload starting... and then Upload successful message. Wait until the device restarts, reconnect back to the web UI and check the firmware version on the bottom of the page or in the Information tab of the webUI.
Minimal build upgrade step
If the binary you're upgrading with is larger than 500kb you also need to download the minimal build (
tasmota-minimal.bin(.gz)) since the upload process needs the space in flash memory to upload the new binary.
When you try to immediately upgrade with the new binary without using smaller minimal firmware you will be greeted with this error.
Upload Buffer Miscompare Error~
This step is necessary only if you get the "Upload buffer miscompare" error
This means your flash doesn't have enough free space to install the binary you're trying to upload. Use a .gz binary instead of the .bin one. If you still receive the same error download tasmota-minimal.bin(.gz) and follow instructions:
Browse to the minimal binary with Choose File. The chosen filename should be visible.
In our example it's
Wait until the device restarts. In the Main Menu web UI will display this warning message on top.
Proceed to upgrade
Your device can be upgraded using commands via MQTT, web requests or Console in the web UI.
OtaUrl is used to set your OTA address.
Initiate upgrade from OTA server
Upgrade over the serial connection using serial-to-USB adapter.
Upload the new version over serial using the same process as in Flashing but DO NOT erase flash. The new binary will overwrite the old one and keep your settings.
Tasmota Device Manager or TDM is a multiplatform GUI application written in Python for discovery and management of Tasmota devices. You can set up OTA url and initiate OTA upgrade from TDM using GUI.
openHAB - implement an automation rule to upgrade devices from openHAB
OTA over SCP - setup and configure "OTA over SCP" upload for PlatformIO
Deploy via HTTP - deploy .bin and .bin.gz files to your own web server via PlatformIO upload
Private OTA Server~
It is possible to create your own simple http OTA server (https is not supported) using Python and perform upgrades from there. Install Python3 and from the folder where the binary resides (make sure
tasmota-minimal.bin is located there too) run:
python -m http.server 8000
Change your OtaUrl to http://ipoftheserver:8000/yourbinary.bin(.gz) and start the upgrade process. Note: do not use
. characters in the name of
If your binary build (yourbinary.bin) is larger than the available free flash program space, Tasmota will need to first install the minimal version of Tasmota to make more space. To have this work via the web server OTA process, you have to copy the file
tasmota-minimal.bin in the same folder where
yourbinary.bin is placed, and rename
Until now several versions of Tasmota have been released starting with the C version Sonoff-MQTT-OTA followed by Sonoff-MQTT-OTA-Arduino, Sonoff-Tasmota and ultimately Tasmota.
DO NOT ATTEMPT TO UPGRADE VERSIONS PRIOR TO v7.x STRAIGHT TO THE CURRENT VERSION
Remember that you must take each individual step between the device firmware version and the latest available.You can find all the required binaries in Tasmota Releases listed by version number.
As a safeguard perform "Backup Configuration" before upgrading. If settings are lost "Restore Configuration" should bring them back.
Upgrading from one minor version to the next is mostly painless as the settings are saved in the same location in flash and newer settings are appended.
As said, mostly painless! There are some deviations to this rule as the flash settings changed.
Notice for versions between 22.214.171.124 and 126.96.36.199
If you've used development versions between 188.8.131.52 and 184.108.40.206 back up your device settings. Convert the backup to human readable form as you MUST restore these settings manually.
Reset 6 before upgrading the firmware and, for safe measure, after the upgrade completes.
While fallback or downgrading is common practice it was never supported due to Settings additions or changes in newer releases.
Starting with release v8.1.0 Doris settings in flash are re-allocated in such a way that fallback is only allowed and possible to v7.2.0. Once at v7.2.0 you're on your own when downgrading even further.
Backing Up Settings~
Tasmota uses flash memory to store options and settings. New versions add (or remove) features that use various regions of that memory. If you did not erase flash when you flashed your device, an updated version of Tasmota may be accessing areas with values left over from the old Tasmota or even the original factory firmware. This might cause unexpected and unwanted behavior or even major problems (constant reboots or reconnects).
To avoid this use our decode-config tool to easily create and restore backups in Tasmota:
- decode-config - OS independent Python program to backup and restore Tasmota configuration data, also available as precompiled executables for Windows, MacOS and Linux. See Using instructions for details.
If using one of the precompiled binary for your OS replace
decode-config_linuxfrom the instruction examples.
1. make a configuration backup:~
Create a new backup straight from your device
decode-config.py --source <deviceIP> --backup-file Config-@f
@fwill be replaced by decode-config to device's FriendlyName
- Create a backup from previously made
decode-config.py --source <dmp_filename> --backup-file Config-@f
2. perform a device reset~
Erase flash settings area but keep Wi-Fi and MQTT settings
3. upgrade the firmware via OTA or file upload~
4. restore configuration~
decode-config.py --source <deviceIP> --restore-file <backupfile>
...and you're done!
If you can't restore configuration directly you can configure the device manually referring to the Commands article and the settings (e.g., SetOptions, Rules, etc.) in the JSON file you created in step #1. You can paste the JSON into a JSON parser to make it easily readable.
If Backup Configuration -> Restore Configuration fails, reset to firmware defaults and use decode-config tool to restore your backed up configuration.