datacenters do not imbue computers with special powers. if you own a desktop less than a decade old, congrats! you already own a server more than capable of hosting any and/or all of these:
(for free, forever)
and if you wanna get REALLY crazy, you can take a bunch of those old desktops that you've got lying around (or that you bought for stupid cheap on ebay), network them together into a cluster, and bam, you now have your very own, truly private cloud that you can use to host whatever you want, for free, forever! and you can do it all from the comfort of your own bedroom! wow!!!
@gc >for free
electricity bills become an issue when you run a popular server for anything
disk space is also not free, and you need to watch after the disks and change them as soon as they show signs of failure
another thing is that it is not completely silent
@leip4Ier I don't want to run a popular server for lots of people - I wanna host things like gogs and nextcloud for myself and some friends. but if power usage is an acute issue, raspberry pis are cheap, plentiful, and sip power.
as for disk space, yes, it's not free, but the cloud ain't cheap. buying two 1tb disks for $50 each and setting up raid 0 costs less than a year's worth of 1tb of google drive at $10/month. assuming those drives last 5 years, you ultimately save ~$500
@gc the learning stage is exciting, yes. The problem starts when a few years down the line you realize that you *have* to support all this stuff even it's not interesting anymore, because your life depends on it. Speaking as someone running his email server for 10+ years :-)
Datacenters *do* imbue computers with always-on power, multiple redundant internet connections, magic virtual disks that "just work", and out-of-band management tools (okay, the datacenter doesn't do that, but your old P4 probably won't have any!)
Yeah, I can get those things in my house, but not cheaper than $2.50 per month, and not nearly as good as I get them from my datacenter. Self hosting is cool and fun, and all, but I want reliability. And that means taking it out of my house.
@paws scaleway is indeed cheap, but selfhosting is *always* cheaper in the long run! plus, the upfront cost is less than you think - old desktops are cheap, plentiful, and can even have much better specs than an entry level vps.
some great places to get desktops for stupid cheap (as in less than $20) are local goodwills, pawn shops, thrift stores, and ebay.
and don't forget to ask your friends and family! I'd bet money that one of them has an old desktop they'd happily give to you for free.
@gc Hm okay :O Is it possible to host a small website on my own laptop? Just for testing / learning, so I can later on use a raspberry pi
@paws yes! laptops are just as capable at selfhosting as desktops are.
btw, unless electricity costs are rly expensive, I wouldn't recommend getting an rpi. the board is $35, but you also need a 2a usb (~$10) charger and a microsd card (~$15). rpis are also just slow - it has a meh clock speed and the micro sd card has terrible r/w speeds. and since sd cards are designed to store pictures, not an OS, they can wear out and fail within a year. the rpi's only real benefit is that it sips power.
@gc Ahh Okay, Is there a way I can experiment hosting a website on my own laptop without spending money upfront and wasting it because I dont know how to host or anything? I know some websites probably provide a subdomain which I can hook up with my laptop or something? :O
@paws @gc I'm afraid doing it "the proper way" requires setting up dynamic dns and port forwarding, which may be really easy or impossible depending on your router and ISP. You can however get started really fast installing something like xampp+dokuwiki as a server and then exposing it to the internet using a service like ngrok https://ngrok.com/ which bypasses any network problem
@paws @gc As for installing the server and making a website, I think you can just download this https://download.dokuwiki.org/get?id=448964f905a6ada1ee262f33e21ffe04 and double-click "run" (if you're on windows). It's a wiki, but you can easily configure it so only you can edit it. You can also just put your html files in the dokuwiki folder. Then you have to expose it to the internet... but I'm afraid the ngrok solution I told you about is not good for prolonged use (8-hours sessions with random names). I'm not sure what to advise...
@paws @gc if you want to try ngrok anyway, you just have to download ngrok from the official website, run dokuwiki, run ngrok, then write "ngrok http 8800". It should give you an address like somenumbers.ngrok.io valid for 8 hours, that you can use to access the dokuwiki hosted on your computer.
Maybe someone else knows a better solution! Or maybe you can try the long route ("port forwarding"). I don't know of any specific documentation, sorry.
@paws like you can buy a 10 year old desktop with significantly better specs for less than the cost of just the raspberry pi board lol
@gc Well, that's true, but:
- your home connection may not be capable to serve decently enough those services (ex: asymetrical connection, with an upload throughput low compared to download)
- your home connection is easily succeptible to DDOS
- you may not have static IP address, or be behind a NAT without being able to configure the routes
- you may not have an unrestricted Internet access
The server is not the only thing to take into account when providing services over the Internet.
@gc What gives them special powers is internet bandwidth (and, to some degree, more reliable power). Oh, and fixed IP addresses.
Yes, I've self-hosted stuff on cheap home computers; I currently self-host MediaWiki, NextCloud, and Postfix/Dovecot at home, but their utility is limited by the above factors as well as a modem config issue I've been trying to solve for years.
@gc But, as someone who runs servers for a living, I’d rather pay for a share in someone else’s services than bring my job home every day.
Data centers offer power and internet redundancy, power conditioning, network redundancy, so on and so forth.
@gc Alright. How much time per week for keeping all theses software up-to-date?
Not saying everything as a SaaS is a good idea neither, but most of the users can't/have no time to self-host services and guarantee a 99.99+ % uptime in a secure way.
@gc This is a good point about the compute power available for relatively cheap costs to ordinary people. That said, running a (reliable) web service also requires having a reliable internet connection and power supply, which is harder
@gc I mantain a home server built with commodity desktop hardware myself, but where I live has a shitty large US ISP that doesn't really want people running servers on their home networks, and there's not much I can do about that right now
@meireikei what isp do you have? I have a large shitty isp too (spectrum, aka the isp formerly known as time warner cable) and selfhost a looot of things on my home network too, but they either don't care or haven't noticed lol.
@gc comcast. I spent a few hours last night getting my server to have a publicly-routable IPv6 address again after power-cycling the router because the internet connection kept dropping out for some reason. it's not impossible to run an outbound server on their network, it's just unreliable, which is why I don't run services for other people on it.
@meireikei oof, my condolences both for comcast and ipv6. I dread the day I have to start actually learning how to use ipv6 lol.
what aspect is unreliable? do you think it's your modem/router, or is it due to something comcast is doing upstream from you?
@gc I'm honestly not sure and I don't know how to debug it myself. I'm definitely less comfortable troubleshooting v6 than v4 networks, but v4 address space exhaustion is real so I don't mind being forced to understand v6.
@meireikei if you're using the router that comcast 'gives' to people (and charges $10/month for), there's a decent chance it might be your router. especially if it's made by arris.
a similar-ish thing happened to me w twc awhile back, so I went to the twc store, swapped my router for a new one, and the random disconnects stopped!
it still acted kinda weird though so I ultimately just bought my own router. I've had almost zero problems since and shaved $10 off the internet bill
@gc I appreciate the sentiment of the list, but there are very big hurdles in front of people in order to do this. These are really the first problems to solve in order to have self hosted services take off.
# if you're using a separate box from your daily browsing/computing, you need to have a way to interact with it, separate I/o peripherals and monitor, or knowledge of ssh, remote desktop
# installing and even running a service, especially ones without pre compiled binaries
@gc # managing the gap between traffic coming in to your network and forwarding it to the appropriate place
# being able to troubleshoot and diagnose any of a hundred places where things can go pear shaped, even before you get outside traffic.
A big thing is practice, building confidence by doing. I think that if we can separate a lot of these parts, reduce the points of failure as much as possible, then we could see an uptick in self sufficiency in serving
@rubah docker is witchcraft and has made selfhosting x100000 easier for me haha. I highly highly recommend trying it out
@wolf @gc If your ISP doesn't do mean things, it's just a matter of router settings (look up port forwarding). You might need to change which IP you use from time to time as your ISP changes your router's IP
My ISP does mean things ;C , so I would need to maintain a VPN connection with an internet-accessible server elsewhere (if you want to still be free, you need to find a friend with one), and use that server to access my home network.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!