1. Purpose
Flashing OpenWrt means replacing a router’s original vendor firmware with the OpenWrt operating system. OpenWrt is a Linux-based operating system for embedded networking devices. It provides a writable filesystem, package management, firewall control, VPN support, VLANs, traffic shaping, and advanced router administration beyond what most stock firmware allows. The OpenWrt project describes it as a Linux operating system for embedded devices that replaces static vendor firmware with a writable filesystem and package management.
This document explains how to prepare, choose the correct firmware image, flash OpenWrt safely, perform the first boot setup, and recover from common problems.
2. Safety and Authorization
Only flash OpenWrt on a router you own or are explicitly authorized to modify. Do not flash routers owned by an ISP, employer, school, hotel, landlord, or managed service provider unless you have permission.
Flashing firmware can permanently break a router if:
- The wrong image is used.
- The hardware revision does not match.
- Power is interrupted during flashing.
- A device-specific flashing procedure is ignored.
- A vendor firmware protection mechanism is bypassed incorrectly.
- The router has too little flash or RAM for modern OpenWrt.
OpenWrt distinguishes between first-time installation from vendor firmware and sysupgrade from an existing OpenWrt installation. A sysupgrade replaces the current OpenWrt installation and is not the same as a first-time factory installation.
3. Key Concepts
3.1 Factory Image
A factory image is normally used when the router is still running the original manufacturer firmware.
Typical filename examples:
openwrt-...-factory.bin
openwrt-...-factory.img
openwrt-...-factory.trx
Use this for:
- Vendor firmware → OpenWrt
OpenWrt’s factory installation documentation describes the first-time process as downloading the correct firmware, verifying the downloaded file, and flashing the firmware.
3.2 Sysupgrade Image
A sysupgrade image is used when OpenWrt is already installed and you are upgrading or reinstalling OpenWrt.
Typical filename:
openwrt-...-sysupgrade.bin
Use this for:
- OpenWrt → newer OpenWrt
- OpenWrt → same-version reinstall
- OpenWrt → clean reset with new OpenWrt image
OpenWrt’s sysupgrade documentation explains that sysupgrade replaces the entire current OpenWrt installation, including the kernel and filesystem partitions.
3.3 Snapshot Image
A snapshot is a development build. It may support newer hardware, but it is less predictable than stable firmware.
Use stable firmware unless:
- Your router is only supported by snapshot.
- You understand the risk.
- You are comfortable recovering the device.
- You know how to install missing packages manually.
The OpenWrt Firmware Selector lets users choose a stable build or nightly snapshot build.
3.4 Recovery Image
Some routers require a special recovery image or bootloader recovery method. This may involve:
- TFTP
- Vendor rescue mode
- Serial console
- Recovery web server
- Initramfs boot
- USB recovery
Recovery methods are device-specific. Do not assume one router’s recovery process applies to another.
4. Pre-Flash Checklist
Before flashing OpenWrt, collect the following information.
4.1 Router Identification
Record:
Brand:
Model:
Hardware revision:
Current firmware version:
Region variant:
Serial number:
MAC address:
Hardware revision is critical. For example, a router marked v1, v2, and v3 may require different firmware images.
4.2 Network Settings Backup
Save or screenshot:
- WAN connection type
- PPPoE username/password, if used
- Static IP settings, if used
- VLAN or IPTV settings
- LAN subnet
- DHCP range
- Wi-Fi SSID
- Wi-Fi password
- Port forwarding rules
- DNS settings
- VPN settings
- MAC clone setting, if used
After flashing, OpenWrt will not automatically know your vendor firmware configuration.
4.3 Recovery Preparation
Before flashing, find the recovery method for your exact device.
Save:
- Original vendor firmware file
- OpenWrt device page
- TFTP recovery instructions, if available
- Failsafe instructions
- Static IP settings needed for recovery
- Button sequence for recovery mode
OpenWrt’s recovery documentation notes that some vendors provide built-in rescue functions in the flash ROM boot partition that remain available even after an OpenWrt firmware upgrade.
4.4 Physical Setup
Use this physical setup:
- Computer connected by Ethernet
- Computer connected to router LAN port
- Router connected to stable power
- Wi-Fi disabled on computer if needed
- No unnecessary devices connected
- No firmware flashing over Wi-Fi
Do not flash firmware during a power outage, storm, unstable generator use, or when the router may be accidentally unplugged.
5. Finding the Correct OpenWrt Firmware
5.1 Use the Firmware Selector
Use the official OpenWrt Firmware Selector to search for your exact router model and hardware revision. The Firmware Selector is designed to download OpenWrt firmware for a selected device and choose either a stable or snapshot build.
Search by:
- Router brand
- Router model
- Hardware revision
Example search terms:
TP-Link Archer C7 v5
GL.iNet GL-AR750S
Linksys EA8300
Netgear R7800
5.2 Use the Table of Hardware
The OpenWrt downloads documentation recommends using the Table of Hardware or Firmware Selector to locate official firmware for a specific device.
Check:
- Supported version
- Installation method
- Known issues
- Required image
- Recovery notes
- Flash size
- RAM size
- Wi-Fi support
- Special warnings
5.3 Choose Stable Firmware
As of the current OpenWrt release documentation, the stable OpenWrt series is 25.12, with 25.12.4 listed as the current stable release.
Use stable unless the device page says you need snapshot.
6. Verifying the Firmware File
Before flashing, verify that the downloaded file is not corrupted.
Linux
sha256sum openwrt-*.bin
macOS
shasum -a 256 openwrt-*.bin
Windows PowerShell
Get-FileHash .\openwrt-*.bin -Algorithm SHA256
Compare the result with the checksum provided by OpenWrt’s download directory or Firmware Selector. If the checksum does not match, do not flash the file.
7. Flashing Method A: First-Time Install from Vendor Firmware
Use this method when the router is still running the original manufacturer firmware.
Step 1: Download the Factory Image
Use a file labeled something like:
factory.bin
factory.img
factory.trx
factory.chk
Do not use a sysupgrade image for first-time flashing unless the device-specific OpenWrt page explicitly says to.
Step 2: Connect by Ethernet
Connect:
- Computer Ethernet port → Router LAN port
Avoid:
- Wi-Fi flashing
- WAN port flashing unless device instructions say so
- USB Ethernet adapters with unstable drivers
Step 3: Log Into Vendor Firmware
Common vendor router addresses include:
http://192.168.0.1
http://192.168.1.1
http://192.168.8.1
http://10.0.0.1
Log in using the vendor firmware admin username and password.
Step 4: Open Firmware Upgrade Page
Common menu names:
- Administration → Firmware Upgrade
- System Tools → Firmware Upgrade
- Advanced → Firmware Update
- Maintenance → Firmware
- Router Update
- Manual Firmware Upload
OpenWrt’s generic flashing documentation describes using the OEM firmware web interface and its firmware upgrade option to install the correct OpenWrt factory image.
Step 5: Upload OpenWrt Factory Image
Before pressing upgrade, verify:
- Correct router model
- Correct hardware revision
- Correct region
- Correct file type
- Checksum verified
- Stable release selected
- Device page checked
Then upload the firmware.
Step 6: Wait for Reboot
Do not:
- Unplug power
- Press reset
- Refresh repeatedly
- Close laptop lid
- Disconnect Ethernet
- Interrupt the process
A normal flash may take several minutes depending on the router.
Step 7: Access OpenWrt
After reboot, set your computer to DHCP and open:
http://192.168.1.1
OpenWrt login documentation states that the default administrative username is root and the password field is initially empty until you set a password.
8. Flashing Method B: Upgrade Existing OpenWrt Using LuCI
Use this method when OpenWrt is already installed and LuCI is available.
Step 1: Download Sysupgrade Image
Download the correct sysupgrade image for your exact device.
Example:
openwrt-...-sysupgrade.bin
Step 2: Log Into LuCI
Open:
http://192.168.1.1
Go to:
System → Backup / Flash Firmware
The OpenWrt sysupgrade documentation lists LuCI’s Backup / Flash Firmware page as a standard firmware upgrade method.
Step 3: Create a Backup
Download a configuration backup before upgrading.
Save it somewhere safe:
- Computer
- External drive
- Password manager attachment
- Admin documentation folder
Step 4: Upload Sysupgrade Image
Select:
- Flash new firmware image
Upload the sysupgrade file.
Use Keep settings only if:
- The upgrade path is supported
- The device page does not warn against it
- You are not trying to clean-reset the router
- Your configuration is known-good
Use a clean reset if your configuration is broken or you are moving across a risky upgrade path.
Step 5: Flash and Reboot
Confirm the firmware image and start the upgrade.
Do not interrupt power.
After reboot, return to:
http://192.168.1.1
9. Flashing Method C: Upgrade Existing OpenWrt Using SSH
Use this method if LuCI is unavailable or you prefer command-line flashing.
Step 1: Copy Firmware to Router
From your computer:
scp openwrt-*-sysupgrade.bin root@192.168.1.1:/tmp/
Step 2: SSH Into Router
ssh root@192.168.1.1
OpenWrt provides SSH administration for command-line router management.
Step 3: Create Backup
sysupgrade -b /tmp/openwrt-backup.tar.gz
Copy the backup to your computer:
scp root@192.168.1.1:/tmp/openwrt-backup.tar.gz .
Step 4: Flash While Keeping Settings
sysupgrade /tmp/openwrt-*-sysupgrade.bin
Step 5: Flash and Reset Settings
Use this when you want a clean installation:
sysupgrade -n /tmp/openwrt-*-sysupgrade.bin
The -n option avoids restoring previous settings.
10. First Boot Setup
After flashing, connect to:
http://192.168.1.1
Login:
Username: root
Password: empty on first login
OpenWrt’s starter FAQ confirms that there is no initial password set for root.
Immediately set a password.
10.1 Set Root Password
In LuCI:
- System → Administration → Router Password
Using SSH:
passwd
Use a strong password.
10.2 Configure WAN
Common WAN types:
- DHCP client
- Static IP
- PPPoE
- VLAN-tagged WAN
- LTE/5G modem
- USB tethering
If your ISP uses PPPoE, enter the username and password from your previous router configuration.
10.3 Configure LAN
Default OpenWrt LAN is usually:
192.168.1.1/24
Change it if your upstream modem or existing network also uses 192.168.1.0/24.
Example alternative LAN:
192.168.10.1
10.4 Configure Wi-Fi
OpenWrt commonly disables Wi-Fi by default on devices with Ethernet ports for security reasons.
Set:
- Country code
- SSID
- Encryption: WPA2/WPA3 if supported
- Strong passphrase
Do not leave Wi-Fi open.
10.5 Confirm Firewall Defaults
OpenWrt normally allows LAN-to-WAN traffic and blocks unsolicited WAN-to-LAN traffic by default.
Do not expose:
- LuCI
- SSH
- Router admin ports
to the internet unless using a secure VPN-based management design.
11. Post-Install Hardening
Recommended hardening checklist:
- Set root password
- Disable password SSH login if using SSH keys
- Do not expose LuCI to WAN
- Do not expose SSH to WAN
- Use WPA2/WPA3
- Disable WPS if present
- Keep firmware updated
- Remove unused packages
- Create guest network for visitors
- Create separate IoT network if needed
- Back up configuration after setup
- Document recovery method
12. Common Problems and Fixes
12.1 Cannot Reach Router After Flash
Try:
- Set computer to DHCP
- Try http://192.168.1.1
- Try another LAN port
- Wait several more minutes
- Power cycle once after waiting
- Use Ethernet, not Wi-Fi
If DHCP fails, set a static IP:
Computer IP: 192.168.1.2
Subnet mask: 255.255.255.0
Gateway: 192.168.1.1
DNS: 192.168.1.1
Then open:
http://192.168.1.1
12.2 Vendor Firmware Rejects OpenWrt File
Likely causes:
- Wrong image type
- Wrong hardware revision
- Wrong region
- Firmware file too large
- Vendor blocks third-party firmware
- Special install method required
- Signed firmware restriction
Do not force the file. Return to the device-specific OpenWrt page.
12.3 LuCI Missing After Flash
Some images do not include LuCI, especially snapshots or custom builds.
For OpenWrt 25.12 and newer:
apk update
apk add luci
For OpenWrt 24.10 and older:
opkg update
opkg install luci
OpenWrt package documentation states that OpenWrt 25.12 and newer use apk, while 24.10 and older use opkg.
12.4 Wrong Settings Locked You Out
Use failsafe mode. OpenWrt’s failsafe documentation explains that failsafe mode and factory reset are used when configuration problems make the device inaccessible.
Common failsafe recovery sequence:
mount_root
firstboot
reboot -f
This erases configuration and returns OpenWrt to its default state.
12.5 Failed Firmware Upgrade
If LuCI or SSH cannot be reached, try:
- Failsafe mode
- Factory reset
- Vendor recovery mode
- TFTP recovery
- Serial console
OpenWrt recommends trying failsafe mode and factory reset first when the interface is unreachable after configuration or upgrade problems.
13. TFTP Recovery Overview
Some routers can recover firmware through TFTP.
A typical TFTP recovery process involves:
- Set computer to a specific static IP
- Rename firmware file to a required name
- Start TFTP server or client
- Hold reset/WPS button
- Power on router
- Wait for bootloader to request firmware
- Transfer firmware
- Wait for automatic flashing and reboot
OpenWrt’s TFTP recovery documentation describes using Ethernet, powering the router, and using a device-specific button sequence to start firmware recovery.
Important: TFTP details vary by router. Always check:
- Router recovery IP
- Computer IP
- Required filename
- Required Ethernet port
- Button timing
- Whether router acts as TFTP client or server
14. When Not to Flash OpenWrt
Do not flash OpenWrt if:
- The router is not yours
- The model is unsupported
- The hardware revision is unclear
- You cannot find recovery instructions
- The router is your only internet access and you have no backup plan
- The device has very low flash/RAM
- You need vendor-only features that OpenWrt does not support
- You are not prepared to reset or recover the device
15. Recommended Flashing Workflow
Use this exact workflow for most routers:
- Confirm you own the router.
- Identify exact model and hardware revision.
- Check OpenWrt device support.
- Read the device-specific installation page.
- Download the stable factory image for first-time install.
- Download the stable sysupgrade image only if OpenWrt is already installed.
- Verify checksum.
- Save current router settings.
- Download vendor firmware for recovery.
- Connect by Ethernet.
- Flash through the correct method.
- Wait for reboot without interrupting power.
- Open http://192.168.1.1.
- Log in as root with empty password.
- Set root password immediately.
- Configure WAN, LAN, Wi-Fi, and firewall.
- Back up the finished OpenWrt configuration.
- Document recovery steps.
16. Conclusion
Flashing OpenWrt is the process of replacing a router’s original firmware with a flexible Linux-based router operating system. The most important parts are not complicated commands; they are preparation and accuracy.
The safest installation depends on:
- Correct device model
- Correct hardware revision
- Correct firmware type
- Stable power
- Ethernet connection
- Verified checksum
- Known recovery method
Use a factory image when installing from vendor firmware. Use a sysupgrade image when upgrading an existing OpenWrt installation. After flashing, immediately set the root password, configure WAN and Wi-Fi, avoid exposing management services to the internet, and save a working backup.