Skip to content
Create a captive web portal for ESP8266
Python HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Blog post series

The code in this repo is the results of a blog series I wrote about building a captive web portal for a Wemos D1 Mini using MicroPython. You can find the articles here:

Starting the captive portal

Copy the .py and .html files to your ESP8266 board. If you already have a file, then just copy the contents of the file from this repo. There's only a couple of lines there.

Instantiating a CaptivePortal and calling its start() method will turn on your MCU's WiFi access point, and you can then connect to it and input your home WiFi credentials. Once you do, the MCU will turn off its AP, and connect to your home WiFi instead.


This is not really a standalone project, but rather a bit of useful functionality that I drop into other projects I make so that if I send one to someone else, I don't need to hardcode their home WiFi credentials to get the thing to work. Instead, they can easily enter their own WiFi SSID and password to allow the device to connect and start doing whatever it's supposed to be doing.

You can’t perform that action at this time.