As a business owner offering free Wi-Fi, someone monetizing network access, or a homeowner enforcing guest etiquette, a captive portal adds control and professionalism. With years of hands-on Raspberry Pi projects, I'll guide you through turning your Pi into a reliable captive portal hotspot using proven tools like RaspAP and Nodogsplash.
If you've connected to 'open' Wi-Fi at a coffee shop, hotel, or gym only to hit a login page requesting your email or terms acceptance, that's a captive portal in action. It intercepts browser traffic, forcing users to interact before granting full access.
Businesses use them for marketing or payments, but they're equally valuable at home—for instance, a kids' network with reminders about responsible browsing, even if they bypass via VPN.
To follow this tutorial:
Connect your keyboard, monitor, Ethernet, and power. Open a terminal:
sudo apt update && sudo apt -y upgrade
Reboot:
sudo reboot
Your Pi is now fully updated.
RaspAP simplifies access point setup. In terminal:
curl -sL https://install.raspap.com | bash
Connect to the new network (default password: "ChangeMe"). Change it immediately for security.
Set a strong PSK password and save.
Install dependencies:
sudo apt install git libmicrohttpd-dev
Clone and build:
cd ~
git clone https://github.com/nodogsplash/nodogsplash.git
cd ~/nodogsplash
make
sudo make install
Edit config:
sudo nano /etc/nodogsplash/nodogsplash.conf
Add:
GatewayInterface wlan0
GatewayAddress 10.3.141.1
MaxClients 250
AuthIdleTimeout 480
Save (Ctrl+O, Ctrl+X). Start:
sudo nodogsplash
Test by connecting—portal appears.
Edit rc.local:
sudo nano /etc/rc.local
Add nodogsplash before exit 0. Save and reboot.
Edit the splash page:
sudo nano /etc/nodogsplash/htdocs/splash.html
Add your branding, images, or rules.
Save, reconnect (clear cache if needed).
Bonus: Use your Pi for ad-blocking or a web server too. Share your setup in comments—home rules, business promo, or guest welcome?