this post was submitted on 13 Mar 2024
71 points (90.8% liked)

Selfhosted

39980 readers
413 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

You may have noticed a few of my posts here, I am very interested in self-hosting and what advice can you give to a newbie? maybe some literature, video, I don’t know~

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 7 months ago

As another noob, Tailscale is great.

I've been playing with VPNs for a week or two, can't get anything running. Then I remembered I have Tailscale installed on my Home Assistant and I opened it up on my phone and connected up

And now I can access my network at work, and can use WhatsApp when I'm connected to works WiFi even though it's been blocked on their firewall.

I've just been listening to the Self Hosted podcast (who are sponsored by Tailscale) and learned that you can basically do networking with Tailscale by putting everything on the Tailnet. So now I'm going down that rabbit hole.

But I've run Home Assistant for years and used reverse proxies and Cloudflare to access it from outside my network, yet now I'm learning I can just have Tailscale on all the time on my phone and I'm on my own network wherever I am in the world, which is amazing considering I just put an add-on on my HA instance and scanned a QR code.

[–] [email protected] 1 points 7 months ago

Take deep breaths and remember to drink plenty of water.

[–] [email protected] 2 points 7 months ago

You don’t need to delve into networking too heavily at first. I recommend ProxMox as the most beginner friendly platform. It’s open source and based on Debian 12 underneath. That means that updates won’t hit you until they’ve been run in the wild for a while. This is what you want for a server.

It has a free backup server you can use to take automatic backups, and it can run virtual machines, lxc containers, and docker can be installed on an lxc or vm and you’re golden. If you install docker bare metal you limit yourself to docker.

The new SDN functionality also lets you make self-contained networks that isolate your vms. Couple with this opnsense eventually, and you can make a nice public setup and not worry too much about east west security.

[–] [email protected] 21 points 7 months ago (2 children)

Learn how to use Docker containers

[–] [email protected] 8 points 7 months ago* (last edited 7 months ago) (1 children)

Came here to write exactly this. It's a steep learning curve but well worthwhile. Although I'd specify and say: learn docker compose.

Edit: what I ment was learn docker cli tools (command line tools) and use Docker compose that way. It gives you a much better understanding of how Docker actually works behind the scene while still keeping it high level

[–] [email protected] 5 points 7 months ago (2 children)

Docker? Steep learning curve? You drunk mate?

When it comes to software the hype is currently setup a minimal Linux box (old computer, NAS, Raspberry Pi) and then install everything using Docker containers. I don’t like this Docker trend because it 1) leads you towards a dependence on property repositories and 2) robs you from the experience of learning Linux (more here) but I it does lower the bar to newcomers and let’s anyone setup something really fast.

In my opinion people should be very skeptical about everything that is “sold to the masses”, just go with a simple Debian system (command line only) SSH into it and install whatever is required / taking the time to actually learn Linux and whatnot.

[–] [email protected] 4 points 7 months ago* (last edited 7 months ago) (1 children)

I'd like to point out this is a hot take.

Enterprise infrastructure has been moving to containers for years because of scale and redundancy. Spinning up new VMs for every app failover is bloat and wasteful if it is able to be put in a container.

To really use them well, like everything in IT, understanding the underlying tech can be essential.

[–] [email protected] -1 points 7 months ago (2 children)

Yes, that’s a valid use case. But the enterprise is also moving to containers because the big tech companies are pushing them into it. What people forget is that containerization also makes splitting hardware and billing customers very easy for cloud providers, something that was a real pain before. Why do you think that google, Microsoft and Amazon never got into the infrastructure business before?

[–] [email protected] 4 points 7 months ago (1 children)

Why do you think that google, Microsoft and Amazon never got into the infrastructure business before?

Amazon was in the infrastructure business well before containers were the "big thing".

[–] [email protected] 0 points 7 months ago

You're missing the point.

[–] [email protected] 3 points 7 months ago* (last edited 7 months ago) (1 children)

What are you even claiming? Billing is the same ease VM or container.

Cgroups became a thing in 2004 and then Google and Amazon started container offerings in 2008.

And you don't even need docker there are plenty of alternative engines.

[–] [email protected] 0 points 7 months ago

What are you even claiming? Billing is the same ease VM or container.

Before containers, when hosting was mostly shared stuff (very hard to bill and very expensive when it comes to support) or VMs that people wouldn't buy because they were expensive.

[–] [email protected] 0 points 7 months ago (1 children)

Hmm I should maybe have added that I only ever touched docker cli tools and have never used a front end of any kind. I do know that they exists, but I like having my fingers in the mechanical room so to speak so it gave me a quite steep learning curve writing my own docker compose files from scratch and learning the syntax, environment variables and volumes working manually. I still to this day only use cli version of Docker because its the only thing I ever learned.

[–] [email protected] -2 points 7 months ago (1 children)

writing my own docker compose files from scratch and learning the syntax, environment va

But you know that most people don't even do that. They simply download a bunch of pre-made yaml files and use whatever GUI. You would still learn more without docker.

[–] [email protected] 1 points 7 months ago* (last edited 7 months ago)

I can see that quickly becoming an issue if people just run random yaml files without understanding the underlying functions. I'm happy I never took that route because I leaned so much

[–] [email protected] 5 points 7 months ago (2 children)

Is there a good resource for this?

[–] [email protected] 2 points 7 months ago (2 children)

This course might be an overkill for a home server, but here's my recommendation: https://www.udemy.com/course/docker-kubernetes-the-practical-guide/?couponCode=ST15MT31224 - it covers stuff from basic manually typed commands to kubernetes and aws.

[–] [email protected] 1 points 7 months ago* (last edited 7 months ago)

Sweet been interested in this myself. Thank you

[–] [email protected] 3 points 7 months ago (1 children)

Kubernetes is more than overkill for home use. I would say there's no point in ever touching it if you're only in self hosting as a hobby.

[–] [email protected] 1 points 7 months ago

I use it for my home services but that's because I also use it at work and understand it well. It is absolutely not something that a beginner should touch, especially if "docker" is a new term to them.

[–] [email protected] 3 points 7 months ago* (last edited 7 months ago)

I learned it from trying an error, look for Docker documentation and you can start self hosting something like NextCloud or Jellyfin. Any software which have a Docker image can work for you to learn. You can use "AI" like Bing if you have any doubt too

[–] [email protected] 5 points 7 months ago (1 children)

Try things out. Get an old pc with some old hard drives no one will want and get to it!

Just install whatever on it and start asking yourself what you want to do with it.

I started on Ubuntu Server and ended up on Unraid. Caused alot of problems along the way but in the end I learned alot to where I dont stress too much when stuff goes south.

Also, when you truly do invest into a proper server. Consider the drives you are buying are gonna die one day. It may take years to happen but it will happen!

[–] [email protected] 1 points 7 months ago* (last edited 7 months ago)

already have one old pc :)

[–] [email protected] 1 points 7 months ago

Depends a bit on what you'd like to achieve. I'd say play around with YunoHost on a VPS to get started and learn more. With YunoHost you will get XMPP and email server after installation, and then you can start installing other YunoHost apps.

[–] [email protected] 3 points 7 months ago (1 children)

That depends. How new are you? What do you already know?

[–] [email protected] 3 points 7 months ago (1 children)

I know the linux basis. That's all.

[–] [email protected] 4 points 7 months ago

Learn docker. That should probably be #1. That will open up a world of self hosting options.

[–] [email protected] 10 points 7 months ago (1 children)

Honestly the single biggest thing to self-hosting is breaking stuff.

Host stuff that seems interesting to you, and dick around with it. If it breaks, read the logs and try to fix. If you can't, revert to a backup and try to reproduce.

If you start out with things that interest you, you'll more likely stick with the hobby. From there you can move to hosting things with external access - maybe vpn inside your own network through your router?

From there, get your security in line and host a basic webserver. Something small, low attack vector, and build on it. Then expand!

Definitely recommend docker to start with - specifically docker compose. Read the documentation and mess around!

First container I would host is portainer. General web admin/management panel for containers.

Good luck :).

[–] [email protected] 4 points 7 months ago (1 children)

Breaking things is the best way to learn. Accidentally deleting your container data is one of the best ways to learn how to not do that AND learn about proper backups.

Breaking things and then trying to restore from a backup that...doesn't work. Is a great way to learn about testing backups and/or properly configuring them.

The corrolary to this is: just do stuff. Analysis paralysis is real. You can look up a dozen "right ways" to do things and end up never starting.

My advice: just start. If you end up backing yourself into a corner where you can't scale or easily migrate to another solution, oh well. You either learn that lesson or figure out a way to migrate. Learning all along the way.

Each failure or screw up is worth a hundred "best practice / how to articles".

[–] [email protected] 3 points 7 months ago (2 children)

So. I added home assistant and homarr to my docker compose stack. When I updated the stack to pull the new images. I lost all my saved info and files. Why is this? I’m imaging I need to define a storage point for the files ?

[–] [email protected] 3 points 7 months ago

Yep, that's exactly what you need. It's a right of docker passage to not have a volume set up and lose all of your settings/data.

What you are talking about is volumes. You can probably Google a dozen examples but I highly recommend trying chatgpt for questions like that.

It's pretty good about telling you what you need to do or how to fix a issue with your compose file.

[–] [email protected] 3 points 7 months ago

Look up docker volumes.

[–] [email protected] 56 points 7 months ago (2 children)

Don't provide services to others, including your own family, actually especially your own family, until you are quite comfortable with what is going on and what might be causing issues. Focus on helping yourself or keeping whatever other services you were using before just in case.

Trying to fix something at night, with a fuming partner who's already put up with a difficult to use service, because of your want for privacy even though they don't care care, whilst saying "it should work, I don't know what's wrong", is not a great place to be 😁.

Overall though, I found it so interesting that I am doing a part time degree in computer science in my 30s, purely to learn more (whilst being forced to do it to timelines and having paid for it).

I have a very comfortable and 'forget about it' setup my family are now using. Every now and then I add new services for myself, and if it works out, will give access to others to use, keep it just for me or just delete it and move on.

[–] [email protected] 5 points 7 months ago

I never thought of that but that's some of the best advice there. I happily host backups for family, but I only started this year after years of random crashes, out of memory, slowness, and a dozen other things with my stack that it took a long time to iron out. Host it for fun now, more seriously later.

[–] [email protected] 15 points 7 months ago

Trying to fix something at night, with a fuming partner who's already put up with a difficult to use service, because of your want for privacy even though they don't care care, whilst saying "it should work, I don't know what's wrong", is not a great place to be

I feel those words

[–] [email protected] 5 points 7 months ago

Separate everything into lab and production, starting with your network. Test everything in your lab, then move it to production when you've ironed out the kinks.

So setup an isolated network in your router (pretty much all can do it these days), and test everything there.

Alternatively, build an isolated test environment in a virtualization solution, like ESXi or Proxmox - though these are both advanced skillsets (or at least not beginner). ESXi is easier to learn than Proxmox, and you should still be able to get a copy.

load more comments
view more: next ›