Skip to content

A micropython Gopher server tiny enough to run on a Raspberry Pi Pico W

License

Notifications You must be signed in to change notification settings

aittalam/PicoGopher

Repository files navigation

PicoGopher

PicoGopher is a Gopher server tiny enough to run on a Raspberry Pi Pico W.

Why Gopher?

As a protocol, Gopher has been around since 1991. It is best suited for sharing information in the form of plain text and for this reason it focuses on content much more than presentation. It is very simple, so one can implement a server in a few lines of code. It is very light, so it can run on small, cheap devices without breaking a sweat (which also means with a very low power consumption).

Using Gopher is also a stance. In a period when the default way to read and share contents goes through some large social networks, choosing to use it is a mindful choice which also provides some advantages: for instance, no tracking / sharing of personal information, no ads, no recommendation algorithms trying to keep you longer on a platform, just a (relatively small) community of real people sharing their thoughts.

Should I fully embrace Gopher and leave everything else?

Hell no :-) Gopher is not for everyone. I mean, technically yes: just install a Gopher browser and you are ready to explore it! But still, you might just realise you prefer other types of media/contents/topics. That's perfectly ok!

Also, Gopher is not the only alternative to social networks. It is just one of the many facets of the "Small Internet" movement, which is delightfully described in James Tomasino's talk Rocking the Web Bloat: Modern Gopher, Gemini and the Small Internet. Gemini, for instance, is another, more recent, super interesting protocol and another completely new world to learn more about.

What does it look like?

PicoGopher server Browsing a gopherhole while keeping its server in your hand

PicoGopher's WiFi essid PicoGopher's WiFi essid

PicoGopher bomb-looking edition PicoGopher "bomb-looking" edition: the good news is that PG runs on AAA batteries; the bad one is you might not be able to bring it on a flight ;-).

PicoGopher serving Gopher and HTTP protocols From v1.0, PicoGopher can serve the same gopherhole both as Gopher and HTTP: here is a side-to-side comparison with Chrome and Lagrange.

Will there be a PicoGemini?

Most likely yes... Especially if you don't expect me to be the one who codes it :-)

Running the code

PicoGopher's code is in an early stage... But it already works (yay!). To run it:

  • make sure you have micropython flashed onto your Pico
  • add your gopherhole to the /gopher folder on the Pico (e.g. using Thonny's file manager). Do not worry if you do not have a gopherhole yet! You can get started by copying on the Pico the /gopher example which is provided in this repo, then edit its files to customize it :-)
  • copy the four python files in the root folder on the Pico
  • connect the Pico to a power source: it will automatically start running the code in main.py.

When started, PicoGopher creates a new open WiFi AP with essid JOIN ¯\_(ツ)_/¯ ME. After joining the AP, one can browse your gopherhole contents by connecting to gopher://192.168.4.1.

Building PicoGopher from scratch

I am trying to document the steps that brought me to zero to pico (yeah they are very tiny ones...). In the /phlog_code folder you can find the code I refer to in the first three posts I wrote.

Of course everything I wrote is published on Gopher :-). You can find it at gopher://gopher.3564020356.org (if you do not have a Gopher browser you can connect here).

Updates

  • 20221113: PicoGopher now comes with its own (super experimental) PicoDNS, so you can build a captive portal with it (TL/DR: those who join your WiFi will not need to know the IP address of your gopherhole, but they will automatically be redirected to it). Also, for those willing to get started with their very first gopherhole, a template has been added to the gopher folder: just copy it to your Pico and then start customizing it!

  • 20221108: you can now stop installing Gopher clients on your friends' devices (I mean you should still do it, but you do not have to anymore!): PicoGopher now supports an experimental HTTP endpoint, so your gopherhole is served both through Gopher and HTTP

  • 20221105: PicoGopher Elon Edition is out (see the diff)

  • 20221031: PicoGopher is featured on Hackster.io

About

A micropython Gopher server tiny enough to run on a Raspberry Pi Pico W

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages