Live data from Hacker News

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

news.ycombinator.com

51–60 of 194 posts

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

#51

Y'know I'll probably make one. > But I have no clue about networking, and I don’t know where to start. Start here, because it's literally the foundation, but you don't need to be an expert. You probably understand more than you think if you have a VPS and can access it, though. As a start, you need to have working knowledge of the following: - The OSI model so you understand the layered model of networking, even thou…

Just the kind of concrete suggestions, of where to start, that I was hoping to get. Thanks!

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

#52
I expect you're going to get a lot of good advice. My small contribution is this: whatever you do, document it. Write down the date, what you did, what settings you tweaked. (or use Github to manage your changes - that still counts as documentation!)

Someday something's going to click for you and you'll realize you should have done something differently, but you won't remember what you did (or how to undo/change it). Keeping good documentation - especially as you're learning, is going to save you from wiping and re-installing your machine.

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

#53
Self-Hosting has been my most passionate hobby for the last decade+ and all of the resources below are aimed at people like you. Good luck sailor!

If I may be so bold as to self promote:

  * Podcast - https://selfhosted.show
  * Website(s)
    * My blog - https://blog.ktz.me
    * Perfect Media Server - https://perfectmediaserver.com
  * Github - https://github.com/ironicbadger/infra
  * Linuxserver - https://linuxserver.io
Finally, if you'd like real-time collab with other self-hosters, the podcast has a Discord - https://selfhosted.show/discord.

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

#54
post #2

Get a piece of hardware (old from Ebay is fine, consider power requirements, a small device with an SSD may be better) and throw the free VMWare ESXi on it, and start spinning up virtual machines at home. Play and experiment. That's how I started, and as long as you have lots of off-line backups, you can get pretty far. Tailscale makes two or more computers look like they're on the same network (simplification). Late…

I like this advice but would suggest proxmox instead of ESXi. (Seems to be a lot more traction in the homelab type of deployments and my own three-year experience has been really excellent.)

I thought about mentioning proxmox but in my (personal) experience it was easier to get up and running with ESXi.

Once I understood somewhat what ESXi was doing, it was easier to learn proxmox or Xen or whatever.

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

#55
I suggest installing Debian or Ubuntu on the NAS so that you will be familiar. Then install all the services on that NAS box. Next step is to learn iptables and make your own router. Could make the NAS into a router if it has two or more network ports. A router is just some iptables commands.

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

#56

Earlier quoted context omitted.

Why is the self host advice to always buy a Raspberry Pi, use an old crappy computer you have lying around, etc? I have a very beefy desktop for the first time in over a decade (maxed out Mac Studio) and I am wondering is there any real downside to having these services run on it?

The only downside is, I believe, the electricity bill. The reason to use a rpi is that it has enough computational power to do many useful self-hosting tasks while consuming only a fraction of the power of a beefy computer.

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.

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

#57

I expect you're going to get a lot of good advice. My small contribution is this: whatever you do, document it. Write down the date, what you did, what settings you tweaked. (or use Github to manage your changes - that still counts as documentation!) Someday something's going to click for you and you'll realize you should have done something differently, but you won't remember what you did (or how to undo/change it).…

This is great advice! I can vouch for it---I am no longer a young man and if I don't write it down it's gone. Just for the stuff I've done so far, it has saved my bacon countless times.

Looking at you, ~/.emacs.d/init.el. :-)

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

#58
post #54

Earlier quoted context omitted.

I like this advice but would suggest proxmox instead of ESXi. (Seems to be a lot more traction in the homelab type of deployments and my own three-year experience has been really excellent.)

I thought about mentioning proxmox but in my (personal) experience it was easier to get up and running with ESXi. Once I understood somewhat what ESXi was doing, it was easier to learn proxmox or Xen or whatever.

That could be. I came at Proxmox after other hypervisors as well, so I might be discounting the learning curve aspect; I did experience it as pretty close to zero, but that could be a measurement/framing error.

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

#59
I recommend setting up a web server on the smallest server offering of DigitalOcean -- $6 USD/month

Here are a couple links to get that started: - Ubuntu + nginx for https traffic: https://www.digitalocean.com/community/tutorials/how-to-secu...

- Getting a small nodejs project up and running: https://www.digitalocean.com/community/tutorials/how-to-set-...

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

#60
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 years (though obviously, don't leak it or something). I wouldn't bother with the complexity of fail2ban. If you have some out-of-band virtual console, you might not even need SSH, but it will be nice to have for git clones if you're self-hosting repositories. Totally reasonable to have SSH exposed to the Internet, in my opinion.

For HTTPS, run everything through a proxy, and maintain detailed access logs. Put your other services behind that proxy, and have them listen on 127.0.0.1 and not 0.0.0.0 (not that it really matters because you firewalled off all connectivity like that). Your HTTPS proxy should handle certificate provisioning for you. There are many options out there; I use Envoy, the self-hosting types should use Caddy or similar.

Anything that you expose to the Internet on a well-known port with an easy-to-guess password will be hacked instantly; SSH, MySQL, Wordpress, you name it, they'll own it. Seriously, your mind will be blown and your head will spin. Reduce the number of network ingress points to the bare minimum (though firewall rules), make sure absolutely everything not hardened is behind auth, and log aggressively so you can see what happened when something goes wrong.

I don't know what the state of the art these days is for auth. I wrote my own thing that uses WebAuthn; most people are probably using something like Keycloak. The Tailscale idea is also good; if you don't need this stuff on the Internet, then only put it on the Tailnet and let them handle auth.

Post reply on HN