WiFi provisioning for Raspberry Pi Zero W — Connect to hotspot, configure WiFi, done.
- Flash an SD card with this script
- Boot your Pi Zero W — it broadcasts "Zero-Setup" WiFi
- Connect with your phone, enter your WiFi password
- Pi reboots and joins your network
No internet required. No cloud. 100% open source.
# Flash your SD card (Linux)
sudo bash scripts/flash.sh /dev/sdX
# Replace /dev/sdX with your SD card device (check with lsblk)After flashing:
- Insert SD card into Pi Zero W
- Power on and wait ~30 seconds
- Connect to WiFi: Zero-Setup (open network, no password)
- Captive portal opens automatically
- Select your WiFi network and enter password
- Pi reboots and connects to your network
Default SSH credentials: pi / zero
- OS: Raspberry Pi OS Bullseye (32-bit)
- Stack: hostapd + dnsmasq + lighttpd + PHP
- AP IP: 192.168.4.1
- DHCP Range: 192.168.4.2 - 192.168.4.20
The Pi Zero W's brcmfmac WiFi driver is notoriously buggy in AP mode. This script includes all the workarounds discovered through extensive testing:
- Bluetooth disabled (shares antenna with WiFi)
brcmfmacmodule options to prevent crashes- WMM disabled in hostapd
- WiFi scanning done at boot (before AP starts)
- Mode switching via reboot (live switch crashes)
- Raspberry Pi Zero W (or Zero 2 W)
- MicroSD card (4GB+)
- 2.4GHz WiFi network (Pi Zero W does not support 5GHz)
MIT — Use it however you want.