I like how the author didn’t try to be overly clever with it. They could’ve used Docker to install and isolate dependencies, Caddy or Traefik to serve the site and manage SSL automatically, maybe even k3s to run a mini cluster for HA, Tailscale to avoid manual port forwarding, Terraform for future auto-provisioning without hassle, or Ansible to prepare the machine and all that jazz. Instead, they took the simplest po…
> installing the web server on bare metal, On top of a Linux distro is not what people usually call bare metal
How I built this website on a Raspberry Pi
31–40 of 94 posts
Re: How I built this website on a Raspberry Pi
#32I like how the author didn’t try to be overly clever with it. They could’ve used Docker to install and isolate dependencies, Caddy or Traefik to serve the site and manage SSL automatically, maybe even k3s to run a mini cluster for HA, Tailscale to avoid manual port forwarding, Terraform for future auto-provisioning without hassle, or Ansible to prepare the machine and all that jazz. Instead, they took the simplest po…
> installing the web server on bare metal, On top of a Linux distro is not what people usually call bare metal
Re: How I built this website on a Raspberry Pi
#33Regarding private keys and computers going in for repairs... I know it's not strictly best practice but store your private key in your password manager. That way if the worst happens you aren't up a creek...
Re: How I built this website on a Raspberry Pi
#34After using nginx and caddy for some time I can't fathom going back to apache config files.
To be honest, you can have both good and bad configuration in either.
I recently migrated one stack from Nginx to Apache2 (where an Nginx container would refuse to start when it was a reverse proxy for say 10 services and one of those took longer to start meaning that it had no DNS records, so Nginx would be in a restart loop and the other 9 would be unavailable) and it was fine.
Re: How I built this website on a Raspberry Pi
#35I like how the author didn’t try to be overly clever with it. They could’ve used Docker to install and isolate dependencies, Caddy or Traefik to serve the site and manage SSL automatically, maybe even k3s to run a mini cluster for HA, Tailscale to avoid manual port forwarding, Terraform for future auto-provisioning without hassle, or Ansible to prepare the machine and all that jazz. Instead, they took the simplest po…
> installing the web server on bare metal, On top of a Linux distro is not what people usually call bare metal
As much as I look back at the simplicity (Apache config was not that difficult for a small site, at least with Apache 2.0), the part of me that operates production software these days gets anxiety the idea of it all.
And yet, when I wrote a small website to host my wedding website last year, it was indeed Linux, (some webserver), Postgres and PHP, with me copying files manually to FTP. It was probably nginx but you know what, I paid a company £50 for a large amount of storage, bandwidth, a domain and SSL certificate, for year, and everything went dandy. Horses for courses and all that.
Re: How I built this website on a Raspberry Pi
#36If you’re using Apache2 you might also want to look at mod_md, not just certbot: https://httpd.apache.org/docs/2.4/mod/mod_md.html
Also, if you want to minimize the amount of JS, then just drop jQuery and use fetch, it’s reasonably pleasant too: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
Lovely article!
Re: How I built this website on a Raspberry Pi
#37Curious how well Caddy would run on an RPi. Not sure if it would come out ahead of Apache in practice. It's been my goto choice for a few years.
I'm running a small Caddy + Rust (Actix Web) service on my Raspberry Pi 2B. Not the snappiest service ever but usable. Part of the slowness might also be the fact that it's online using Cloudflare Tunnels.
Re: How I built this website on a Raspberry Pi
#38Re: How I built this website on a Raspberry Pi
#39Re: How I built this website on a Raspberry Pi
#40Earlier quoted context omitted.
I'm running a small Caddy + Rust (Actix Web) service on my Raspberry Pi 2B. Not the snappiest service ever but usable. Part of the slowness might also be the fact that it's online using Cloudflare Tunnels.
What is Cloudfare Tunnels? Is this for not applying a firewall rule in the home router?
Basically, you can have a computer available online through Cloudflare without having to open any ports, as it makes the computer available through outbound connections. Should also make it possible to host behind CGNAT.