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)
@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
I'm sure your friends will love it when all the stuff they had on your nextcloud disappears when you have a disk failure.
Hosting stuff on your RPi at home is cool if you're just playing around with stuff, but if I and my friends were to rely on it, I'd opt for something a bit more high-availability.
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 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.
@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.
@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.
@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 the list is nice but to say that you can just easily host stuff on your box attached a dynamic home ip (with a slow uplink too, not to mention the complicated router setup ...) is an overstatement
@karl I was hosting stuff on a netbook for years on a dynamic ip. I could do it because I'm a #sysadmin. but 99% of the people can't do it because it requires a lot of tech know how. the ordinary person can't even configure a router or knows how to use a switch.
a static ip is expensive btw and we don't have fiber available in many places. @gc
@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 The only problem now is the ISP. Datacaps, stupid prices, and censorship. Probably best to host your server through a vpn.
@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 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