RaspAP-Webgui Installation on Raspi 4 Model B

1.Setting up Raspi 4 with Raspbian with ssh headless configs: https://www.raspberrypi.org/documentation/configuration/wireless/headless.md 
2. Plugin LAN to eth0 port
3. Find out the IP Using scanner or from Router control panel
4. Make ssh connection to the raspi and run this cmd:

sudo apt update
sudo apt dist-upgrade
sudo reboot
sudo curl -sL https://install.raspap.com | bash
sudo reboot

5. Login into Rasp-Webgui – Stop Hotspot
6. Configure Wi-fi Client and delete the current connection
7. Got error – Wifi settings updated but cannot restart (cannot execute “wpa_cli reconfigure”)
8. Run : 

sudo wpa_supplicant -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0
pi@raspberrypi:~ $ sudo wpa_supplicant -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0
Successfully initialized wpa_supplicant

9. Rescan Client settings – connect prefered wifi network
10. Configure Hotspot – Advanced – Enable Wifi-client AP mode
11. Start Hotspot and make sure interface uap0 created.
12. Configure DHCP Server – Select interface uap0 – put range 192.168.50.100 – 192.168.50.200 and put DNS. Save setting,  stop dnsmasq and start it back.
13. Reboot and unplug eth0
14. Scan wifi connect to SSID raspi-webgui with password ChangeMe
15. Done. RaspAP-webgui is at 192.168.50.1  – Login/Pass – admin / secret

This article was written by matn0t.