Live data from Hacker News

Ask HN: How can a total beginner start with self-hosting?

news.ycombinator.com

181–190 of 194 posts

Re: Ask HN: How can a total beginner start with self-hosting?

#181

I think you not start at home. That "last mile" of connectivity is fraught with challenges of dealing with your internet provider and all sorts of other things. It can be a headache, and it's very particular to your situation, and your provider. If you start "self hosting" on a cloud based instance, all that you learn in doing so will carry over to when you finally are able to move everything to a machine in house. I…

> If you start "self hosting" on a cloud based instance, all that you learn in doing so will carry over to when you finally are able to move everything to a machine in house.

I would say this, but first the exact opposite of this…

Run your own entirely local copies at home first. Then, when you are comfortable that you can set things up right, and you understand their security (setting up user accounts, handing out & managing access rights if you aren't the only non-read-only user, keeping things patched up-to-date, tweaking any options that have might have security repercussions, …), you can chuck a copy on a publicly accessible server for others to see.

Then, if you have the local resources for it (a decent speed and reliably enough connection) at home, consider moving it back “in house” but publicly available.

Those first test local-only instances can be on small machines (a Pi if you have one or are lucky enough to find one to purchase that isn't from a stupidly expensive scalper) or VMs on what-ever other machines you have. You can keep them around to play with to test new things later, before adding those new settings/add-ons/other to your public instance.

Re: Ask HN: How can a total beginner start with self-hosting?

#182
post #56

Earlier quoted context omitted.

Mac Studio idle is 11 W (max 115 W) compared to RPI 4 idling at 4 W (max 6 W). It's reasonable to assume that the 115 W on a Mac Studio will never be hit on a workload that could be supported by a RPI...so you're looking at an extra $10-20/yr to operate the Mac Studio. The biggest issue is just the upfront cost, since of course the Mac Studio is proportionally expensive to its capability.

Idle power consumption for Apple Silicon Mac is low despite it's workstation, it's outlier. Average Intel desktop consumes similar or a little more power for idle, that is acceptable IMO for flexibility and reuse. Maybe DIY PC consumes a bit more than average Dell desktop even if CPU is same. Average Intel workstation/server consumes much more than them so it's wasteful for almost idle server. So it depends on what i…

Oh for sure, if you pick out a high consumption CPU then it'll be high for sure

Re: Ask HN: How can a total beginner start with self-hosting?

#183
I am on the same path as you so my 2 cents are:

- I am using my raspberry Pi for hosting my services

- I had to configure my router and talk to my ISP to remove NAT restrictions (this was the hardest part! really hard.)

- The other router part was setting up port forwarding and firewall which were pretty easy to do

- For git I am doing it from scratch, as I just want to create a web interface, basically I run git-http-backend and a go server [1]

- If you do not want to do git from scratch I recommend using cgit.

--- [1](https://saucecode.bar/posts/09-hosting-your-git-server.html)

Re: Ask HN: How can a total beginner start with self-hosting?

#184

I am on the same path as you so my 2 cents are: - I am using my raspberry Pi for hosting my services - I had to configure my router and talk to my ISP to remove NAT restrictions (this was the hardest part! really hard.) - The other router part was setting up port forwarding and firewall which were pretty easy to do - For git I am doing it from scratch, as I just want to create a web interface, basically I run git-htt…

You don't need to do any port forwarding and/or router config if you don't mind using Cloudflare Tunnels. Seriously, these tunnels are a game changer when it comes to self hosting. I have one running on my main computer and another on a Jetson Nano being used as a webserver.

Re: Ask HN: How can a total beginner start with self-hosting?

#186

> I can HERPaDERP install packages on client and server, and copypasta configs I don’t understand. Where do I go to understand? Other commenters have a good bunch of resources on what to do, but if you're really interested in understanding the fundamentals imo there's no better way than to RTFM. Sometimes the manual will have things you don't understand, and then you'll have to google that thing. For networking I hig…

Yes! THANK YOU! I am so grateful for all the replies, but this may ultimately be among the most useful. If I could go back and reframe my question, it would be “Which FM should I R?” :-)

I almost forgot but back in my day there was a big effort in The Linux Documentation Project, or TLDP. They put out a bunch of good stuff at https://tldp.org/guides.html, but as you can see they haven't been updated in quite a while. Most of the stuff is still relevant though, since the basics of setting up web services really haven't changed in 20 years if you don't touch the new kubertenes/container stuff.

For your use-case, I think you'll gain a lot of benefit from just throughly reading this chapter (https://tldp.org/LDP/intro-linux/html/chap_10.html) of one of their books, and https://tldp.org/LDP/nag2/index.html is a more comprehensive view of the same. They encompasses almost everything a hobbyist linux server looked like 15 years ago, and is a good starting point for getting the fundamentals.

Re: Ask HN: How can a total beginner start with self-hosting?

#187

My thought on networking is to make sure you only expose SSH and HTTPS; firewall everything else off. SSH seems like a constant source of problems for people new to running servers; within seconds of your server coming online, people will be trying to guess usernames and passwords. Configure it so you can't log in as root, and you can only authenticate with a key. These folks will never guess your key in a billion ye…

> Put your other services behind that proxy, and have them listen on 127.0.0.1 and not 0.0.0.0 Apologies for this newb question, but if you will be adding a proxy, aren't you required to bind it to 0.0.0.0, since if you bind it to 127.0.0.1, only a request within the service's host will be able to receive a response? I'd like to know what I'm misunderstanding here.

They're saying bind the services to localhost so they're only accessible via the proxy.

"Put your other services behind that proxy, and have [the services] listen on 127.0.0.1 and not 0.0.0.0"

Re: Ask HN: How can a total beginner start with self-hosting?

#188

Earlier quoted context omitted.

Mostly because you want a dedicated device to serve off of. If your desktop is always on it isn't that much different. My desktop gets shut down, rebooted, crashed, wiped and reloaded, and otherwise abused as I get thoughts. My home server has been the same (don't worry I run updates) for a couple years, chugging along, sipping about 1/4 the power my desktop would take. In the beginning of your self hosting journey,…

I have Pi's and old, beefy computers and what I really need is an "elastic personal cloud" where I can bring up the high-powered computer(s) online on demand[1]. I have WiFi-connected sockets and a python script than can turn them on or off, but no orchestration or global state. 1. My 12-year old, former top-of-the-line laptop is much faster than my 3rd-gen Pi when periodically ingesting and indexing JSON into a Post…

I have used wake on LAN sometimes for this too, but that was close enough for me, and I lost interest.

WoW (wake on wife), worked pretty well from the office, but I seem to get a little bit of latency and packet loss. Now I work from home, so I just get up and hit the power button on the more powerful machines.

My shock with compute power was when I got the Pi 4. It was faster than the AMD e350 I was using for backups except for disk IO. The E350 was not a powerful machine new, but I didn't realize how far we had come.

A USB 3 enclosure brought it to a level that was good enough the entire mini ITX build was pointless to keep around.

Re: Ask HN: How can a total beginner start with self-hosting?

#189

Earlier quoted context omitted.

Yes! THANK YOU! I am so grateful for all the replies, but this may ultimately be among the most useful. If I could go back and reframe my question, it would be “Which FM should I R?” :-)

I almost forgot but back in my day there was a big effort in The Linux Documentation Project, or TLDP. They put out a bunch of good stuff at https://tldp.org/guides.html , but as you can see they haven't been updated in quite a while. Most of the stuff is still relevant though, since the basics of setting up web services really haven't changed in 20 years if you don't touch the new kubertenes/container stuff. For you…

Hugely helpful. Thank you.

Re: Ask HN: How can a total beginner start with self-hosting?

#190
post #48

* Buy a domain as Domain * Buy a Asustor AS5304T as NAS * Setup CloudFlare on Domain * Setup services as docker containers on NAS * Setup CloudFlare tunnel into NAS docker services with auth in CloudFlare * Enjoy services. Note, if any of that sounds hard I must kindly point out that you're playing a risky game trying to do all this yourself securely and should evaluate whether it's easier to just pay a service for a…

> Note, if any of that sounds hard I must kindly point out that you're playing a risky game trying to do all this yourself securely and should evaluate whether it's easier to just pay a service for all this. You articulated something I couldn't: an important goal for me is to know enough to be able to evaluate such risks and decide which things to hobbyist tinker and which things to pay to outsource.

My Dad once showed me how the moment he opened a port on our domestic router four different attempts to hack us were made. Good lesson for living on the net, here be dragons.
Post reply on HN