How To Make A Raspberry Pi Pico W Web Server

Pico W Web Server
(Image credit: Tom's Hardware)

If you’re not looking to set up a major website on a hosting service, you can easily run a web server in your home. We’ve previously explained how to set up a Raspberry Pi web server using a regular Pi 3, 4 or Zero, but you don’t even need a full Pi to get the job done. With the Raspberry Pi PIco W, a Wi-Fi enabled micro controller that costs just $6, you can do some basic web serving. 

The Raspberry Pi Pico W isn’t the most obvious choice, but with a little MicroPython code, and some HTML, we can serve basic, static web pages from a Pico W. There are two parts to this project. The HTML and the MicroPython code. The HTML is what our browser will see, and MicroPython acts as the means to serve the code.   

Latest Videos FromTom's Hardware
Les Pounder
Associate Editor

Les Pounder is an associate editor at Tom's Hardware. He is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training program "Picademy".

  • LeDub
    Wow what a helpful guide. Especially given the stock shortage of raspberry pi's.
    Reply
  • jonbuder
    Good proof-of-concept. Might be very handy in conjunction with sensors or other things connected to the Pico.
    If ISPs were not so stingy with upload speeds, hosting a website from home would be a lot more feasible.
    Reply
  • Mpablo87
    I will Try it !!!
    Reply
  • luukbleb
    Hey, would it be possible to get the ip-adress of the divice entering the website?
    Reply
  • kjwkjw
    You write: 10. Set the Pico W to listen for connections on port 80 from any IP address.
    Please delete the "from any IP address" part. The API you use doesn't do that. Saying so is inaccurate.
    Reply
  • kjwkjw
    luukbleb said:
    Hey, would it be possible to get the ip-adress of the divice entering the website?
    Once a connection has been established, traditionally yes you can get the source IP. However I don't know if micropython supports that. Look up the API calls that work with the connection handle/object.
    Reply