Live data from Hacker News

How I built this website on a Raspberry Pi

mirawelner.com

61–70 of 94 posts

Re: How I built this website on a Raspberry Pi

#62
post #29

Earlier quoted context omitted.

> installing the web server on bare metal, On top of a Linux distro is not what people usually call bare metal

I've heard it called bare metal as opposed to a docker container or VM.

This is the Wikipedia definition which is the same thing as I said. If it's on top of an OS, it's not bare metal.

https://en.m.wikipedia.org/wiki/Bare_machine

Re: How I built this website on a Raspberry Pi

#63
post #33
post #22

Regarding 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...

At least encrypt your private key and store it somewhere private, and then store the decryption key in your password manager. Then if either one is compromised you are still safe.

I mean if my password manger is compromised I'm pretty screwed anyway but this is a good idea too.

Re: How I built this website on a Raspberry Pi

#64
I had set one (Pi 3B+)up to do both a website as well as a public service announcement slideshow display for a local Community TV. Used PHP/CMSimple for the site and wrote a custom slider.

Things I learned:

- set the pi to reboot on poweroff

- Given this was TV used the AV output on the PI displaying in NTSC 4:3 (to support customers with older TVs), so had to be aware of overscan margins

- Added a startup script to start chromium in kiosk mode and open the slider page for the show side. worked 95% of the time, if not just power off then on.

- part of the troubleshooting was just unplug and replug - but SD cards will choke on too many power cycles, so instead of SD use a USB->SATA cable and a regular spinning rust HDD - slower but VERY reliable, the journaling file system can recover after power-outage.

- Get the right USB->SATA cable, USB-3 models seem to be more responsive and the PI can boot from them, there are some are too slow and the Pi will fail to boot.

- Slider had it's own login page (outside of CMSimple) to remotely manage the slideshow.

- Also changed the SSH Port to something uncommon to thwart bad guys.

Re: How I built this website on a Raspberry Pi

#65
post #61
post #51

Earlier quoted context omitted.

It is the correct term

It is not https://en.m.wikipedia.org/wiki/Bare_machine

Now that's just goofy, I get why they have similar names but it's begging for misunderstandings. https://en.m.wikipedia.org/wiki/Bare-metal_server

Re: How I built this website on a Raspberry Pi

#66
post #65
post #61

Earlier quoted context omitted.

It is not https://en.m.wikipedia.org/wiki/Bare_machine

Now that's just goofy, I get why they have similar names but it's begging for misunderstandings. https://en.m.wikipedia.org/wiki/Bare-metal_server

Can't remember the name (if it has one), but there's a linguistic phenomenon where words take on opposite meanings from the original. The "Peacemaker" was a missile, "literally" now means "figuratively", "awful" used to mean "awe-inspiring". And apparently "bare metal" now means "runs on an operating system".

Re: How I built this website on a Raspberry Pi

#67
post #61
post #51

Earlier quoted context omitted.

It is the correct term

It is not https://en.m.wikipedia.org/wiki/Bare_machine

Although, there are multiple people in the talk section[0] arguing for the "'physical' machine" definition. Might have to get used to it, along with "crypto" and "algorithm".

[0] https://en.wikipedia.org/wiki/Talk:Bare_machine

Re: How I built this website on a Raspberry Pi

#68
post #22

Regarding 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...

You can also just have multiple keys? Most of my devices have an authorized_keys that gives access to a couple laptops and my phone (which runs the normal openssh client in termux), which solves a lot of these access problems.

Re: How I built this website on a Raspberry Pi

#69
post #59

Earlier quoted context omitted.

I really appreciated the blog post because it taught me something I’ve always wanted to learn but avoided because PaaS made me complacent. Three years ago, I tried to publish a website on a VPS in the morning to present it to a client at lunch. This was before ChatGPT. I spent hours trying but got nowhere. At the meeting, having failed to publish it, I had to run it locally and share my screen. I was frustrated. Late…

It took me much longer than I'd like to admit to publish my first bare-metal website on a VM. The main issue was SSL—I could never configure Nginx for multiple sites on the same server with TLS. Setting up DNS and pointing your domain to your server also requires some fiddling. It’s not intuitive, and there aren’t many people doing this, so resources with full end-to-end examples are limited. However, with tools like…

Nowadays, certbot can configure either Nginx or Caddy automatically. Make sure you install the appropriate plugin with apt (if you're using apt).
Post reply on HN