Serve a webpage with port 80 on a pi

By | May 1, 2026

Currently the pi does not let you serve a webpage on port 80. They state there is a security concern. The problem is is you are serving this locally on your home network you already in your own environment and ioT devices can benifit from a simple web url to type in like mywebsite.local instead of needing to do something like mywebsite.local:8083.

To do this you need to give python permission to do this. So limit the scope of this change by using the following command.

sudo setcap 'cap_net_bind_service=+ep' $(readlink -f $(which python3))