MCH2022

Building public, dynamic webapps using Micropython on the ESP32
2022-07-23, 10:00–13:00, DNA 🧬

This workshop will introduce upagekite, an open source micro-framework for building dynamic, public webapps using Micropython on the low-cost ESP32 system-on-a-chip.

This session will start with participants plugging the ESP32 (an ESP32-CAM devkit) into their laptops for the first time, and by the end of it they will have a running web server on the public Internet - running in a few hundred KB of RAM on a chip that costs only a few euro.


The ESP32 is a low-cost system-on-a-chip with built-in support for bluetooth and WiFi.

Although heavily resource constrained, with only a few hundred KB of RAM, it is possible to run Micropython on these devices and expose a live webserver: not just to the local network, but to the public web using open-source Pagekite reverse proxies.

Topics covered in the workshop will include:

  1. Flashing the latest version of Micropython to the chip
  2. Uploading custom Python code
  3. Creating a simple, dynamic webapp which interacts with peripherals, such as a camera or GPIO
  4. Exposing the webapp to the public web
  5. Security concerns and constraints

Advanced topics which may be covered, depending on time and interest:

  • Conserving RAM by "freezing" custom Python code into the Micropython binary
  • Creating a captive portal for configuring the device on a new network

Workshop requirements:

  • A laptop: if running Windows, please have WSL or a Linux VM with access to the USB ports
  • A data-capable micro-USB cable
  • Please be familiar with basic use of command-line git and Python
  • Optional: Bring your own ESP32 dev-board

Participants are welcome to bring their own ESP32s, but there will also be a few (max 25) ESP32-CAM modules handed out as giveaways (yes, you can keep it if you want), on a first-come, first-served basis. If we run out of chips, consider working in teams.

Bjarni Rúnar Einarsson is an Icelandic hacker who has been working on software development and systems administration since the mid-90s. He cares deeply about Open Source, digital autonomy and user privacy.

Bjarni created and runs PageKite (www.pagekite.net), and was one of the founding members and lead developer of Mailpile (www.mailpile.is). He still works on both projects as much as he can.

Bjarni tweets things at https://twitter.com/HerraBRE .

This speaker also appears in: