# Install OpenWRT on Raspberry Pi

## Things You Will Need

- A microSD card at least 512 MB https://amzn.to/36CpShC | https://amzn.to/3CXJngt | https://amzn.to/3JqyxSP

## Downloads and Flashing to MicroSD

1. Download OpenWRT for Raspberry Pi Download
   1. Search for the Raspberry Pi device
   2. Select the Factory (ext4) download
2. Download Balena Etcher Download
3. Run Balena Etcher
4. Burn the OpenWRT image to the microSD card
5. Safely remove the microSD

## Booting OpenWRT

1. Insert the microSD card into the Raspberry Pi and power it on
2. OpenWRT should begin booting
3. After the terminal has stopped scrolling press Enter to be logged in as root
4. Enter the following commands at the terminal prompt
   # set a root password
   passwd
   # enter and confirm a password
   # set the ip address
   uci set network.lan.ipaddr='192.168.0.137'
   # set the gateway
   uci set network.lan.gateway='192.168.0.27'
   # set dns server, usually the gateway or pi-hole
   uci set network.lan.dns='192.168.0.2'
   # restart network service for changes to take effect
   service network restart
   # update openwrt packages
   opkg update
   # install the luci web ui
   opkg install luci
5. Open a web browser and navigate to http://IP, http://192.168.0.137 in the example
6. At the login screen, enter the username root and the password set above > Click the Login button
7. Welcome to OpenWRT running on Raspberry Pi