(no subject)
Aug. 11th, 2024 06:30 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
so i'm doing my research for the 'can you host a (kink) artist's personal site on a a rasbpi' idea. the "why is this necessary to self host?" is documented in this post.
this post is me sketching out the architecture(?) and the tools necessary for the plan, but if you really want the short details:
hardware: vitros raspberry pi zero w
SD card: this card, 64GB (?)
operating system: Raspberry Pi OS Lite
webserver: nginx
file manager: filezilla
security: UFW
the webserver
the first part was figuring out, hypothetically, which webserver to go with. there's lots of small boutique ones out there, but the four big contenders that i saw had been run on rasbpi (with documentation) were apache, nginx, lighttpd, and caddy.
apache was nixed right out because it's quite bloated for what i need it to do (reasonably small html/css static site), and would eat up precious memory since we only really have a few GB to play around in the raspbi itself -- every MB counts (and honestly, i like that? it forces me to be creative and not just go with the overly-complex defaults - and instead go for the lightweight tried and true tools that have been around since storage was much more precious).
caddy (while selling itself as a modern/slick/lightweight server) was nixed really quickly because i didn't like the vibes of the website and how it sold itself; it felt very ... bragaddocio, very heavy on the marketing angle, which is the biggest reason that's kept me from using 99% of new apps/languages/tools. i honestly look for crufty landing pages that look like they've been up since the 1990's, lol. (also my laptop fans start going crazy when that site loads.)
speaking of, i actually looked very extensively at lighttpd since it sells itself as a lightweight server for this style of server, and it fit the vibes more. but ultimately unless if something goes horribly wrong, i'm going with nginx because lighttpd's documentation was a little shakier versus nginx. the latter's been around since forever (and is apache's main competitor - means it's got some serious punching weight and longevity), and it's no nonsense plus lightweight.
the hardware
so for context, we have our rasbpi i brought back in 2022.
(i actually have two since i was thinking one would be an irc server and the other would do pi-hole; think i'm gonna switch the irc server idea to the site server since it feels more urgent and relevant to me now. in addition, i'm also already much more familiar with the front-end of a website versus irc so it's a little less complex/scary in that instance).
pi-wise i have had exactly "formatted half a pi" as experience - i was following along this tutorial for formatting the pi (for pi-hole) but it'll get me up and running to the point i can load in nginx as well.
so far, we have (and apologies for the 'zon links)--
hardware: vitros raspberry pi zero w
SD card: this card, 64GB if i remember (that's a little larger than what i thought lol)
operating system: Raspberry Pi OS Lite
webserver: nginx
eventually, i'd like to have backup hardware be my current android galaxy phone (with root/termux) because the power is unreliable here, and i love the idea of re-using electronics that already do a great job at self ventilating and having the battery as a built-in fallback for when the power goes out.
file manager
this is all nice and all but i'm a n00b, right?
i need either a control panel or file manager or something visual i can connect to this server via my laptop to push file updates to. i don't need a full on bells and whistles bullshit app or dependency, but i just need to be able to upload html/js/img files without a command line so it's not too much friction for me to push website updates. (otherwise the art logs will never be updated, defeating the purpose entirely).
i briefly looked at a few lightweight control panels - there's a dizzying array of open source ones out there, but they're all so, so complex or have landing pages that look like they're far too modern/market-y. i was saddened to learn cpanel doesn't(?)/has little to no documentation with running on rasbpi's and is not free; i've gotten used to it since it's my go-to with bluehost currently.
and then after some googling, my memory hit me. filezilla.
i've used filezilla off and on since ..... god, 2006? my first site? it's already on my laptop. it's exactly the kind of very basic 'move files around and upload them somewhere' GUI i need as a go-between. i've already used it for the current site for something else, so i don't even have to learn anything new, and the friction isn't a worry there. the best part is somebody's already written up a tutorial for filezilla with nginx/rasbpi here.
i can fuck with filezilla. <3
security
i'm a noob but we're gonna be better about security than crowdstrike ;)
a lot of people in the self hosting subreddits were talking about adding scripts like fail2ban or denyhosts.
i ... see the value in those but the complexity in scripts scares me. i need baby steps here, stuff that's a 'load once, toggle a setting, and forget'. i'm also not really keen on the idea of adding random scripts willy-nilly... i'm sure those two are trusted but they may bring on additional dependencies or bugs or at the very least, complexities.
googling a bit more made me stumble on a firewall that apparently already exists in most major linux distros - 'uncomplicated firewall aka UFW'. it apparently comes native with ubuntu but can be installed on rasbpi OS.
i'm still reading up on how to secure ports and such to prevent brute force attacks, but it looks like it's simple enough to only allow my filezilla connection to make modifications and basically nothing else (other than read-only the public files). i love that kind of security; you're reducing complexities, not adding them.
huzzah! now time to do it. :)
this post is me sketching out the architecture(?) and the tools necessary for the plan, but if you really want the short details:
hardware: vitros raspberry pi zero w
SD card: this card, 64GB (?)
operating system: Raspberry Pi OS Lite
webserver: nginx
file manager: filezilla
security: UFW
the webserver
the first part was figuring out, hypothetically, which webserver to go with. there's lots of small boutique ones out there, but the four big contenders that i saw had been run on rasbpi (with documentation) were apache, nginx, lighttpd, and caddy.
apache was nixed right out because it's quite bloated for what i need it to do (reasonably small html/css static site), and would eat up precious memory since we only really have a few GB to play around in the raspbi itself -- every MB counts (and honestly, i like that? it forces me to be creative and not just go with the overly-complex defaults - and instead go for the lightweight tried and true tools that have been around since storage was much more precious).
caddy (while selling itself as a modern/slick/lightweight server) was nixed really quickly because i didn't like the vibes of the website and how it sold itself; it felt very ... bragaddocio, very heavy on the marketing angle, which is the biggest reason that's kept me from using 99% of new apps/languages/tools. i honestly look for crufty landing pages that look like they've been up since the 1990's, lol. (also my laptop fans start going crazy when that site loads.)
speaking of, i actually looked very extensively at lighttpd since it sells itself as a lightweight server for this style of server, and it fit the vibes more. but ultimately unless if something goes horribly wrong, i'm going with nginx because lighttpd's documentation was a little shakier versus nginx. the latter's been around since forever (and is apache's main competitor - means it's got some serious punching weight and longevity), and it's no nonsense plus lightweight.
the hardware
so for context, we have our rasbpi i brought back in 2022.
(i actually have two since i was thinking one would be an irc server and the other would do pi-hole; think i'm gonna switch the irc server idea to the site server since it feels more urgent and relevant to me now. in addition, i'm also already much more familiar with the front-end of a website versus irc so it's a little less complex/scary in that instance).
pi-wise i have had exactly "formatted half a pi" as experience - i was following along this tutorial for formatting the pi (for pi-hole) but it'll get me up and running to the point i can load in nginx as well.
so far, we have (and apologies for the 'zon links)--
hardware: vitros raspberry pi zero w
SD card: this card, 64GB if i remember (that's a little larger than what i thought lol)
operating system: Raspberry Pi OS Lite
webserver: nginx
eventually, i'd like to have backup hardware be my current android galaxy phone (with root/termux) because the power is unreliable here, and i love the idea of re-using electronics that already do a great job at self ventilating and having the battery as a built-in fallback for when the power goes out.
file manager
this is all nice and all but i'm a n00b, right?
i need either a control panel or file manager or something visual i can connect to this server via my laptop to push file updates to. i don't need a full on bells and whistles bullshit app or dependency, but i just need to be able to upload html/js/img files without a command line so it's not too much friction for me to push website updates. (otherwise the art logs will never be updated, defeating the purpose entirely).
i briefly looked at a few lightweight control panels - there's a dizzying array of open source ones out there, but they're all so, so complex or have landing pages that look like they're far too modern/market-y. i was saddened to learn cpanel doesn't(?)/has little to no documentation with running on rasbpi's and is not free; i've gotten used to it since it's my go-to with bluehost currently.
and then after some googling, my memory hit me. filezilla.
i've used filezilla off and on since ..... god, 2006? my first site? it's already on my laptop. it's exactly the kind of very basic 'move files around and upload them somewhere' GUI i need as a go-between. i've already used it for the current site for something else, so i don't even have to learn anything new, and the friction isn't a worry there. the best part is somebody's already written up a tutorial for filezilla with nginx/rasbpi here.
i can fuck with filezilla. <3
security
i'm a noob but we're gonna be better about security than crowdstrike ;)
a lot of people in the self hosting subreddits were talking about adding scripts like fail2ban or denyhosts.
i ... see the value in those but the complexity in scripts scares me. i need baby steps here, stuff that's a 'load once, toggle a setting, and forget'. i'm also not really keen on the idea of adding random scripts willy-nilly... i'm sure those two are trusted but they may bring on additional dependencies or bugs or at the very least, complexities.
googling a bit more made me stumble on a firewall that apparently already exists in most major linux distros - 'uncomplicated firewall aka UFW'. it apparently comes native with ubuntu but can be installed on rasbpi OS.
i'm still reading up on how to secure ports and such to prevent brute force attacks, but it looks like it's simple enough to only allow my filezilla connection to make modifications and basically nothing else (other than read-only the public files). i love that kind of security; you're reducing complexities, not adding them.
huzzah! now time to do it. :)