Serving a Website on a Raspberry Pi Zero Running Entirely in RAM
A Raspberry Pi Zero v1.3 with 512MB RAM runs Alpine Linux diskless, serving a public static site over HTTP while a $4/year VPS handles TLS termination via HAProxy.
What Matters
-
Alpine Linux diskless mode loads the OS into tmpfs/ramfs; the SD card is only needed for boot and persisting config via
lbu commit -d. - darkhttpd is the recommended HTTP server for the Pi given its minimal footprint; nginx is offered as a flexibility alternative.
- TLS offloaded to a TierHive VPS (128MB RAM, 1GB NVMe, ~$4/year) using socat port-forwarding and HAProxy with automatic SSL renewal.
-
SD card can be physically removed after boot; backups are a single
ddcommand over SSH cloning the 512MB card image. - Dynamic home IPs require DDNS; DuckDNS is recommended. Static Pi IP assignment is flagged as mandatory to avoid routing failures.
- [HN: @dividuum] The setup isn’t truly diskless—real diskless Pi boots via TFTP or HTTP (Pi 4/5 support HTTP boot); SD card at boot contradicts the claim.
- [HN: @c0nsumer] Once TLS is offloaded to a VPS, the architectural question is why use the Pi at all—the VPS does the heavier lifting.