Live data from Hacker News

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

news.ycombinator.com

111–120 of 194 posts

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

#111
post #99
post #98

install ubuntu server either locally or on a cheap VM read the ubuntu server docs about setting up a firewall and get started setting up a firewall that only allows inbound ssh and https ( be careful and don't firewall yourself out of your system! :) ) https://ubuntu.com/server/docs/security-firewall from there, read the docs on setting up a webserver and create an index.html with just the text "hello world" https://…

I do basically this, plus I add WAF rules in Cloudflare to block access from any other country than my own (I live in a 1X mio country so no USA, Russia, China). Do I need to set up e.g. Tailscale etc to make it more secure?

well security is a very broad and deep problem. Keeping these things in mind will get you pretty far.

1. For firewalling, only allow what you need. For example, if your server is in your home then you don't need to forward port 22 in your router. You'll always be logging in to your server from your local network.

2. For services, see #1. if your using a linux distro that starts up a ton of server services you don't need then turn them off.

3. To secure specific services like sshd read their setup docs. SSHD, Nginx, Apache all have very good documentation on operating a secure server.

having said that, i don't think a VPN makes you more secure. Are you saying running a vpn endpoint on your server so that you can connect to it from outside your local network? like at a cafe or something? If you're connecting over SSH then i don't think so because SSH is already encrypted ( that's the "secure" in secure shell) and if you follow the SSH docs on secure connection best practice like disabling password auth and using keys then you're in pretty good shape.

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

#112

I do not know of an opinionated beginners guide, but would recommend browsing r/selfhosted and r/homelab a bit. Lots of these and similar questions are answered on a regular basis. Some starting points - photos: NextCloud - git: Gitea - BitWarden: Vaultwarden (even if you deploy this locally you want a SSL certificate as clients will refuse to connect otherwise) I'd suggest using official docker images to get started…

> - git: Gitea

"Why gitea and not bare repos?"

- Better repo, user, and access management, all from a browser.

- LFS support.

- Being able to browse code in... well, a browser, is really nice.

- GH-like workflows generally, if you want that.

You can have it use sqlite for the DB to make it extremely easy to manage and backup and such. I'd expect that to be fine up to at least 50 moderately-active users, and maybe much higher.

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

#113
post #92

This might be controversial, but I recommend picking up copies of: - K&R - Stroustrup's 'Tour of C++' - Programming Practice and Principles You don't have to do the exercises because your main goal isn't to become a programmer. But reading through these and getting an idea how data, types, memory, and files work at a low level will help add a LOT of context to using Unix-based operating systems. The first two books y…

I know enough to know who Kernighan, Ritchie, and Stroustrup are.

I know enough to know why this (sincere, and appreciated!) answer is being downvoted. :-)

(I encountered these gentlemen in the 1980s. Before I changed my major.)

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

#114
post #42

Earlier quoted context omitted.

> To understand networking: read a book. Much of my early networking knowledge came from https://dl.acm.org/doi/book/10.5555/1593414 > [Computer networking: a top-down approach, Kurose and Ross 2009] This is the kind of reference I was looking for. Anybody else have a favorite. Maybe more accessible? "For Dummies?" :-) Thanks for all these concrete suggestions. EDIT: "Free t-shirt"?! AWESOME :-)

I think this book is its own "for dummies" version: it starts at the very basic ("what is a HTTP?") and then slowly walks its way down to "how does conflict prevention in WiFi work?") Most of those chapters are probably not relevant to you. All the wireless stuff is nice if you want to dig into setting up your own radio network but you can stick to the internet stuff. Not even everything in there may be relevant to y…

Great to know! Thank you.

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

#115
For photos, Synology has a “moments” app which you can download on your iPhone and will back up photos to your NAS.

The only catch is that you have to manually open it to back up the photos, but I have found it to be the easiest way to get photos from my phone to the synology.

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

#116

I do not know of an opinionated beginners guide, but would recommend browsing r/selfhosted and r/homelab a bit. Lots of these and similar questions are answered on a regular basis. Some starting points - photos: NextCloud - git: Gitea - BitWarden: Vaultwarden (even if you deploy this locally you want a SSL certificate as clients will refuse to connect otherwise) I'd suggest using official docker images to get started…

> - git: Gitea "Why gitea and not bare repos?" - Better repo, user, and access management, all from a browser. - LFS support. - Being able to browse code in... well, a browser, is really nice. - GH-like workflows generally, if you want that. You can have it use sqlite for the DB to make it extremely easy to manage and backup and such. I'd expect that to be fine up to at least 50 moderately-active users, and maybe muc…

Fair enough. But I just want a place to put dotfiles that I can share between machines. If I had more complex needs than that, I would probably not have had to ask this question!

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

#117

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…

> 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.

This has been my suspicion all along! Yes, my goal is to learn the basics before I pull the Pi out of the drawer.

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

#118

It sounds like you have a good working base of knowledge to start from and might benefit from some high level concepts. Once you understand the basics you can likely cover what you're looking for with a small open source home router or some other similar hardware. If you prefer books check out https://www.amazon.com/Computer-Networking-Top-Down-Approach... Or for video lectures: https://www.youtube.com/playlist?list=…

That's two votes for that book, so I'll take a look. Thank you!

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

#119

For photos, Synology has a “moments” app which you can download on your iPhone and will back up photos to your NAS. The only catch is that you have to manually open it to back up the photos, but I have found it to be the easiest way to get photos from my phone to the synology.

Hm. In my experience, the Synology apps (client and server both) are ghastly. And I'm snobby about non-free software.

Better not to cut off my nose to spite my face, though, right? I suppose a non-Apple but closed/proprietary solution is a step in the right direction...?

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

#120

It depends on what direction you want take. You could purchase a $5/mo digital ocean server or a $5 raspberry pi and start by installing https://pi-hole.net , https://nextcloud.com , https://syncthing.net , https://www.plex.tv , or some other software to get the first (largest) thing you want resolved. Then move on from there and install the next package you need. Ad blocking for your phone? VPN for work? Self hosted…

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?

I had my home server on a pi and then an old laptop, and finally in a VM on my always-on Mac Mini. The hardware devices were nice for set-and-forget operation (especially the laptop, because the PSU acted as a UPS that kept it running during several power outages over the years).

I like the VM rather than running it directly on the Mac because it's trivial to copy the VM to another computer when I want to change hardware. Obviously, your services will be unavailable whenever the host machine restarts.

Post reply on HN