Installation · TUTORIAL
How to Install OpenWrt on Your Router
OpenWrt replaces the factory firmware on your router with a Linux system you control. This guide walks through a safe first flash on a supported device, including backup and recovery.
Scope and assumptions
- OpenWrt version: OpenWrt 24.10 and 25.12 (current stable series). Available images and the exact flash procedure vary by device and target.
- Last verified against official sources: 2026-10-07
Hardware, target and driver assumptions
- Your exact model and hardware revision is listed on the OpenWrt Table of Hardware with a stable release image.
- You have physical access to the device and a wired connection; Wi-Fi is off during a first install.
- The stock firmware offers either a web upgrade page or a documented TFTP/failsafe recovery path.
Recovery and rollback warnings
- Never interrupt power during a flash. Many routers can only be recovered with a device-specific TFTP or serial recovery procedure.
- The recovery address and reset-button sequence differ per device. Read your device page before flashing.
- OpenWrt does not officially support sysupgrade straight from 23.05 to 25.12. Follow a supported upgrade path and keep a configuration backup.
Check that your router is supported
OpenWrt runs on hundreds of devices, but not every router. The first step is to confirm your model is listed on the OpenWrt Table of Hardware and has a stable release image for it.
Open the Table of Hardware, search for your exact model and revision. The revision matters: a "v1" and "v2" of the same router often use different chips and need different images.
If your device is only listed under "snapshot" builds, the image is experimental. For a first install, prefer a stable release such as 25.12 (current) or 24.10 (previous stable).
The correct first-install image and the recovery method are device-specific. The steps below are the common case; always confirm them on your device page.
- Write down the exact model, hardware revision and current stock firmware version.
- Confirm there is a factory or sysupgrade image for your device.
- Check whether the device uses a dual-partition layout, which changes the flash procedure.
Download the correct firmware image
From the device page, download the first-install image (often called `factory`) when coming from stock firmware. Do not use the sysupgrade image for the first flash; it is meant for upgrading an existing OpenWrt system.
Verify the checksum published next to the download against the file you received. A corrupt image can brick the router.
- Use the first-install image (often called `factory`; some targets use an `initramfs`/`kernel` image) when coming from stock firmware.
- Use the sysupgrade image only when upgrading an existing OpenWrt install.
- Save a copy of the original stock firmware file if the vendor provides one, in case you want to revert.
Back up the stock configuration
Before flashing, log into the router's stock web interface and back up the current configuration. Most vendor firmwares offer a "Backup" or "Restore" page that downloads a config file.
This backup is not used by OpenWrt, but it lets you restore the router to its previous state if you decide to revert. It also records your ISP connection details (PPPoE username, VLAN tag) that you will need later.
- Note your WAN connection type: DHCP, PPPoE, or static IP.
- For PPPoE or fiber connections, record the username, password and VLAN ID from your ISP.
- Take a screenshot of the wireless settings so you can recreate the SSID and password.
Flash through the web interface
The safest first flash uses the router's own web interface. Connect your computer to a LAN port with an Ethernet cable; do not flash over Wi-Fi.
Assign your computer a static IP in the same subnet as the router (for example 192.168.1.2 if the router is 192.168.1.1). Disable any VPN or other network adapters.
Open the stock firmware's upgrade page, select the OpenWrt factory image, and start the flash. Do not power off the router while the LED is flashing; this can take two to five minutes.
- Connect computer to a LAN port with Ethernet.
- Set a static IP on the computer in the router's subnet.
- Open the stock firmware upgrade page in a browser.
- Upload the OpenWrt factory image and confirm the flash.
- Wait until the LED stops flashing and stays on.
First boot into OpenWrt
After the flash, the router reboots into OpenWrt. The default address is 192.168.1.1, and there is no root password set. Because Wi-Fi is disabled by default, connect via Ethernet.
Set your computer back to DHCP, or keep the static IP at 192.168.1.2. Open http://192.168.1.1 — you should see the LuCI login page or a command prompt asking for SSH.
The very first thing to do is set a strong root password. Do not leave the router reachable without a password.
ssh root@192.168.1.1
passwdConnect over SSH and set a root password. LuCI also exposes the same password change under System → Administration.
Configure the WAN connection
Once you are logged in, recreate the WAN connection from your ISP notes. In LuCI, go to Network → Interfaces → WAN and set the protocol to DHCP, PPPoE or static IP as recorded before the flash.
For fiber or PPPoE connections that require a VLAN tag, create a VLAN device on the WAN port first, then attach the WAN interface to that VLAN device.
- DHCP: leave the defaults and click Save & Apply.
- PPPoE: enter the username and password from your ISP.
- VLAN-tagged WAN: create a VLAN with the ISP's tag and use it as the WAN device.
Recover from a bad flash
If the router does not boot after flashing, most supported devices have a recovery mode. The two common methods are TFTP (the router pulls a recovery image from your computer) and a failsafe mode that keeps a minimal OpenWrt running.
For TFTP recovery, set your computer to a static IP that matches the device's recovery address (often 192.168.1.2), serve the recovery image with a TFTP server, and power on the router while holding the reset button.
The exact recovery procedure varies by device. Always check the device-specific wiki page before attempting a flash.
Frequently asked questions
Can I install OpenWrt on any router?
No. OpenWrt must be ported to each device's chipset. Check the Table of Hardware before buying a router specifically for OpenWrt.
Will I lose my stock firmware settings?
Yes, flashing OpenWrt erases the stock configuration. Back up the settings and note your ISP connection details before flashing.
Do I need to connect over Ethernet?
Yes. Wi-Fi is disabled by default in OpenWrt and a wireless flash can fail mid-way, bricking the device. Always flash over a wired Ethernet connection.
Sources
- OpenWrt — Table of Hardware
- OpenWrt — Quick start guide for installation
- OpenWrt — Failsafe mode and factory reset
- OpenWrt — Releases
Checked against the official OpenWrt documentation on 2026-10-07. Behaviour that depends on release, target or hardware is called out in the steps above.
Written for wrtstudio.com. Tutorials are updated as OpenWrt releases evolve.