Starfia
Web Surfer
(Hobla-hey.)
Posts: 29
|
Post by Starfia on May 9, 2023 16:34:31 GMT
Bonjour, neighbours. I've had my main site on a paid hosting service for ages. But this year, I'm preparing to serve it from a dedicated computer at home, and I thought I would start a thread about the topic of doing that. But beyond just me sharing what I'm thinking… Why talk about self-hosting? • To increase our literacy around the Web and Internet's technical workings, even if we only ever plan to use Neocities or pay for hosting. https://forum.yesterweb.org/viewtopic.php?p=3616#p3616 • Because it's cool and fun. Even experimenting with my own server has been exciting and rewarding, not unlike the way that just experimenting and thinking about making your first site is exciting and rewarding. • For support. While it is exciting, it's more involved than just maintaining a site, and there's plenty to think about. So there's plenty to talk about. • To think about how the Web is arranged on Earth. When the Web was born, it seemed like the "default" way of having a site could be to self-host it. What happened? Should things have turned out as they did? So, to anyone here: Has anyone else here had experience with self-hosting, or ever considered setting out to do so? Does anyone want to chat or ask questions out of curiosity?
|
|
|
Post by purelyconstructive on May 9, 2023 21:02:18 GMT
Bonjour neighbor! I think all of those are wonderful reasons to talk about it (i.e.: to develop computer literacy, to create things that we can personally enjoy, to help each other, to learn about the history and contemplate alternatives together, etc.). I don't have any self-hosting experience, but I have considered it in the past. I am interested in talking about how The Internet is arranged on Earth and how that affects its use. [To aid that conversation, if anyone wants to develop a basic technical understanding of how The Internet "works", then an easy to understand introduction is this set of videos by Brian Will.] I also think that if we are going to start making personal social networks, it is important to get a deeper understanding of the "demands" that such a server might face, whether self-hosted or run from a "virtual private server" (VPS). I want to make DIY simple for others, so I will try to put together little technical guides and diagrams like this...
Some Hardware Considerations For Servers1. DrivesThe lifespan of hard drives is determined not only by how long we've had it, but also by how much data we put onto it and how many times it is erased. This is called a "program/erase cycle" (or "P/E" for short). Sometimes when we buy a hard drive it will have a P/E measurement. One can buy hard drives for specific uses that will have a higher rating. For example, there are so-called "enterprise grade" hard drives for use in servers. We need reliable hard drives within servers because the information on them will probably be accessed a lot! In the case of "solid state drives" (SSDs), it is good to leave about 10% of the drive space free. Filling it to max capacity shortens its lifespan. On average, one can expect a hard drive to last 3-5 years. Both studies and my limited personal experience with different hard drive manufacturers has shown that Seagate is one of the most unreliable brands. Recovery of data from a failed hard drive can be very expensive and is hit-or-miss depending on how that data was lost. If we are in a situation where we need to regularly backup a lot of data, we could try setting up a "redundant array of independent disks" (RAID). This is a system that automatically distributes data across multiple hard drives, so that if one fails, we can still recover all of the data. Whether using one drive or many, there are programs that will periodically make a backup of their contents in case something goes awry. Part of using a hard drive effectively is learning how this type of software works. Usually it is straightforward process. It may consist of setting a time and date for when we want those backups to be made, and then choosing some options on how detailed we want those backups to be. We may not care about all of the information on a hard drive, but some files are critical for keeping things working. 2. Power SuppliesServers can experience "downtime" when something keeps it from functioning normally. This includes loss of power. There are special power supplies that work something like a backup generator for when the power goes out. They are called "uninterruptible power supplies" (UPS). A UPS can vary in: - the total amount of its electrical input and output
- the number of outlets it has, and whether or not they have "automatic voltage regulation" (AVR) so that each device gets the appropriate amount of electricity
- how long its internal batteries last and how long they take to recharge
- other included features (LCD control panels, extra USB ports, and so on)
QuestionQ: "All of this sounds complicated and expensive. Does it have to be?" A: No! Not at all. Depending upon what we are hosting, it can be as simple as a single board computer (like a Raspberry Pi) connected to a power source and The Internet. If you don't mind "downtime", the power source doesn't even have to be consistent. A really interesting example is Low-Tech Magazine's solar powered website.
Looking forward to hearing of everyone's experiences and ideas!
|
|
|
Post by Cobra! on May 10, 2023 1:49:16 GMT
Hey, I’m actually wondering: What would be the best solution to self-host for the environmentally conscious, or someone who is concerned about leaving things on all the time, even when asleep or on holiday?
|
|
Starfia
Web Surfer
(Hobla-hey.)
Posts: 29
|
Post by Starfia on May 10, 2023 5:04:41 GMT
purelyconstructive –
Yeah! That's a good overview of hardware considerations. I'd visited your site before but hadn't found that dedicated section on computer literacy or the Brian Will videos; very well-paced and clear, and even though know most of what's in them, I've already learned a couple of things. It hadn't occurred to me that hosting companies generally pay for outgoing bandwidth and others pay them to accept incoming bandwidth, but that's an easy-to-understand explanation of why ISPs seem to care so much more about the cost and amount of customer uploads rather than downloads.
|
|
Starfia
Web Surfer
(Hobla-hey.)
Posts: 29
|
Post by Starfia on May 10, 2023 5:25:07 GMT
Oh, hey, Cobra. ^ ^
I imagine the main consideration is the power rating of the dedicated computer, and secondarily, how much work it's doing. If it's just a Neocities-grade site, it's probably doing very little beyond keeping the system running.
Raspberry Pis are one of the lowest-power-consuming popular small servers, as mentioned. I don't have one but might have to someday, if only to tinker and finally try some version of the famous Linux. I have an old Mac mini that I'm working with, largely because they're supposed to be the most power-efficient Macs when idle.
The Mac (and other systems?) even has a "wake for network access" option that it seems might even enable the Mac to be in sleep mode until network resources are requested, and it looks like that can even work across the Internet when properly set up and supported – I only just happened to discover that and I'll look more into it.
|
|
sixeyes
Web Surfer
what's going on lol
Posts: 18
|
Post by sixeyes on May 10, 2023 8:27:04 GMT
I did host my website from a raspberry pi for a couple of years. My main concerns then were size and noise, since i lived in a small studio apartment. Turned out to be incredibly resilient actually! A good thing they do is they wake on power. Back then i was away from the apartment for many weeks at a stretch, and we would have frequent power outages over the summer - but as soon as the power came back, the raspberry would automatically start and go online again.
Later i ran it off a laptop. While more powerful, i had much more problems with failing harddrives and later failing SSD's, dust getting in fans, etc. Plus takes more space etc. (I recall readning about this being a bad idea because the laptop doesn't know it's being used as an always-on server, and makes faulty power management decisions about like when to spin up harddrives etc)
Anyway. If you're looking to host from your own home, i would first try to see if your ISP and connection method allows you to open port 80/443 to the internet. This is not a given - some ISP's just forbid it, some force you to use routers/modems which already use those ports or make them unavaliable for other reasons. I would test it quickly by running some server on your computer and briefly do port forwarding there, and then try to access your public IP. If it doesn't connect or lands on some router login thing, you might be out of luck ((or just misconfigured, i suppose)). I imagine one could circumvent this with some VPN hijinks...?
|
|
Starfia
Web Surfer
(Hobla-hey.)
Posts: 29
|
Post by Starfia on May 10, 2023 19:35:27 GMT
I did host my website from a raspberry pi for a couple of years… Yeah! That's about what I'd have intuited if switching from a small, self-contained device to a laptop with hard disks and fans. What made you decide to switch? Did you ultimately stop self-hosting, and why, if so? Operating systems used to include and promote software meant to help you self-host, and ISPs even offered to host your home page as a feature of their basic service, so I'd be disappointed to hear that any ISP simply didn't allow for even low-resource-intensive self-hosting. It sounds correct to start by checking whether they even allow incoming traffic on the ports in question. My ISP's terms allow me to self-host on a technical level, but vaguely state that they prohibit self-hosting activity that puts a burden on their resources, such as "file sharing." Others have interpret this to mean they don't want you to self-host at all, but I infer they mean something on the order of making very large files available to frequent downloaders, which would exceed the bandwidth I'm paying for anyway. It's frustrating that it's so vaguely stated, but self-hosting is probably one of the most resource-efficient things I plan to do with my connectivity, so I don't see them minding.
|
|
|
Post by Cobra! on May 11, 2023 1:31:18 GMT
So whenever you guys go on holiday or whatever, what do you do? Just leave whatever it hosts offline for a couple of weeks or do you guys have a back-up solution?
|
|
sixeyes
Web Surfer
what's going on lol
Posts: 18
|
Post by sixeyes on May 11, 2023 8:25:58 GMT
I did host my website from a raspberry pi for a couple of years… Yeah! That's about what I'd have intuited if switching from a small, self-contained device to a laptop with hard disks and fans. What made you decide to switch? Did you ultimately stop self-hosting, and why, if so? Hehe, i switched just to try it out i guess, felt like a shame to not use the laptop for anything and i wanted to taste its power. I also run a nextcloud instance which benefited enormously from the better processor. Currently i'm hosting everything from a VPS in germany, because i'm renting second hand and they didn't give me admin access to the router... 🤷♀️ I'm getting kicked out in autumn and depending on where i end up i'll try to self-host again. but vaguely state that they prohibit self-hosting activity that puts a burden on their resources, such as "file sharing." Could be just to have something to get you for if it turns out you do large scale disney piracy or whatnot. In the age of streaming video, i doubt there's a bandwith issue around hyptertext..? So whenever you guys go on holiday or whatever, what do you do? Just leave whatever it hosts offline for a couple of weeks or do you guys have a back-up solution? I just left it running 🤷♀️ a raspberry pi doesn't draw much power or create a lot of heat, i figured it'd be okay. I had a SSH port open so i could do some maintenance remotely if needed. Although, one time thunder struck and fried the thing while i was away - then there was indeed some downtime 😁
|
|
modro
Web Surfer
Festive vibes in the city...
Posts: 20
|
Post by modro on May 13, 2023 6:51:06 GMT
I think self hosting is cool. and also the most safe thing (as long you know what youre doing). " i dont know what im doing" To have a machine running and connected to internet 24/7 can have many benefits - from running a website, chat communication instances, streaming content... it is quite usefull in the security aspect. your online/offline presence can be obscured, so you can have more space to navigate even if youre targeted. I think its fun to ssh into a machine and modify things. it gives you also a sense of how vunerable all this tools are. this are actualy basics if you want to analize the data-traffic, observe how the apps work, or - god forbid:"do some hacking" since the eth-minig ceased and the new assassins creed is still being developed, i will use for the server an desktop AMD machine with Nvidia graphics. For the OS i intend to use the BSD system.
|
|