Live data from Hacker News

Server Setup Basics for Self Hosting

becomesovran.com

41–50 of 75 posts

Re: Server Setup Basics for Self Hosting

#41
post #29

And for those of you that don't have an external IP, you can use services that provide egress for you like IPv6.rs. [1] [1] I'm DevOps there! ;)

Thanks for the link, product looks good. Maybe you should work a bit on the website, this is how it looks at my pixel phone on Firefox: https://photos.app.goo.gl/txpxvDQAMYQWRSmi7

Re: Server Setup Basics for Self Hosting

#42
post #32

At the end of the article, there's a link to a script[1] that does the steps covered in the article. That got me thinking: how do other self-hosters/homelabbers here go about automating their server setups? None/purely manual? One big shell script? Multiple scripts wrapped in a Makefile (or justfile, or other command runner)? More enterprisey provisioning/automation tools like Ansible, Puppet, etc.? [1] https://git.s…

I'm using a combination of pyinfra for provisioning and justfile for one-off operations. In fact, I also have separate pyinfra scripts for provisioning my desktop and laptops, so I can have a fresh install and they will set it up with proper apps and desktop environment settings.

https://github.com/pyinfra-dev/pyinfra

https://github.com/casey/just

Re: Server Setup Basics for Self Hosting

#43
post #32

At the end of the article, there's a link to a script[1] that does the steps covered in the article. That got me thinking: how do other self-hosters/homelabbers here go about automating their server setups? None/purely manual? One big shell script? Multiple scripts wrapped in a Makefile (or justfile, or other command runner)? More enterprisey provisioning/automation tools like Ansible, Puppet, etc.? [1] https://git.s…

I've written a couple, covering a bit of what's mentioned in the article but also setting up wordpress.

Written in bash also

Re: Server Setup Basics for Self Hosting

#44
post #21

I recommend checking out Caddy https://caddyserver.com/ >, which replaces both Nginx and Certbot in this setup. Tailscale https://tailscale.com/ > can remove the need to open port 22 to the world, but I wouldn't rely on it unless your VPS provider has a way to access the server console in case of configuration mistakes.

I've recently discovered, that Caddy config file has a neat support for imports: https://pastebin.com/vVQYrpmj

Re: Server Setup Basics for Self Hosting

#45

So... about docker, did they backtrack on their licensing landgrab? About a year ago I swear everyone was going to podman, but in the last few months I see nothing but docker references. Podman is supposed to be drop-in. Well, it was advertised. I haven't touched anything in six months.

Only use docker engine ("moby"). Docker desktop makes no sense on a Linux system as it introduces a VM into the mix, further adding complexity and reducing performance. https://docs.docker.com/engine/

Re: Server Setup Basics for Self Hosting

#46
post #34
post #32

At the end of the article, there's a link to a script[1] that does the steps covered in the article. That got me thinking: how do other self-hosters/homelabbers here go about automating their server setups? None/purely manual? One big shell script? Multiple scripts wrapped in a Makefile (or justfile, or other command runner)? More enterprisey provisioning/automation tools like Ansible, Puppet, etc.? [1] https://git.s…

For my use cases I found that just having a (updated) note with the things I would usually do works best. This is because I would not deploy everything anywhere and manually being aware of each step instead of hiding it within a script is somewhat a feature (e.g. you can easily insert a custom extra step etc). If I would do basically the same over and over I'd probably go with a script, ansible cookbook or similar, b…

Yeah I just have a note with my steps because other than the real basic stuff (set IP and DNS, set hostname, install tmux/htop/vim) the rest depends on what exactly I'm doing with that server. I have other notes for common stuff that could probably stand to be automated but it's not worth the effort in a https://xkcd.com/1205/ sense. Like, having a checklist is necessary, but fighting bash or whatever other automation tool isn't necessarily valuable since I'm only standing up one server every few months at most

Re: Server Setup Basics for Self Hosting

#47
post #15

Qq, do people doing their own server setup like this use containerization at all? When I looked at it, it was like “yeah you can run Docker or k3s,” and I think Hashicorp had their own version, but it seemed like folks didn't really bother? Also like setting up virtual networks among VPSes seemed like it required advanced wizardry.

Depends. Right now I mostly run 1 VM per app stack (eg web server & DB on the same VM) if it supports it, or if it's a single container I have a VM for all of those, or if it's a Docker Compose stack it'll get its own VM. So I'm mostly just using containers as a packaging solution. But I want to learn more about k8s so one of these days I'm going to move everything over to containers (that'll come when I refresh my hardware)

Re: Server Setup Basics for Self Hosting

#48
post #21

I recommend checking out Caddy https://caddyserver.com/ >, which replaces both Nginx and Certbot in this setup. Tailscale https://tailscale.com/ > can remove the need to open port 22 to the world, but I wouldn't rely on it unless your VPS provider has a way to access the server console in case of configuration mistakes.

For Tailscale backup access, another way is to block port 22 on a firewall and then only unblock it if you need access.

Re: Server Setup Basics for Self Hosting

#49
post #48
post #21

I recommend checking out Caddy https://caddyserver.com/ >, which replaces both Nginx and Certbot in this setup. Tailscale https://tailscale.com/ > can remove the need to open port 22 to the world, but I wouldn't rely on it unless your VPS provider has a way to access the server console in case of configuration mistakes.

For Tailscale backup access, another way is to block port 22 on a firewall and then only unblock it if you need access.

If you depend on the host behind Tailscale to access the firewall from the inside then that's not going to work. Most colos I have hardware at offer a separate network for iDRAC/ILO/your flavor of OOB management, I like to use the console through that to open/close stuff like this.

Re: Server Setup Basics for Self Hosting

#50
post #30

Especially when writing a tutorial for beginners - please use the long-form flags (e.g. sudo usermod --append --groups sudo newuser) instead of short-form flags (e.g. sudo usermod -aG sudo newuser). Short-form flags make commands look like arcane voodoo magic. They make sense only to help you save time entering commands if you know them by heart already. Tutorials are read by beginners who are not necessarily familia…

"Acronyms seriously suck" ~Elon
Post reply on HN