this post was submitted on 17 Jan 2025
118 points (99.2% liked)

Selfhosted

45106 readers
527 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 2 years ago
MODERATORS
 

For this new year, I’d like to learn the skills necessary to self host. Specifically, I would like to eventually be able to self host Nextcloud, Jellyfin and possibly my email server too.

I've have a basic level understanding of Python and Kotlin. Now I'm in the process of learning Linux through a virtual machine because I know Linux is better suited for self hosting.

Should I stick with Python? Or is JavaScript (or maybe Ruby) better suited for that purpose? I'm more than happy to learn a new language, but I'm unsure on which is better suited.

And if you could start again in your self hosting journey, what would you do differently? :)

EDIT: I wasn't expecting all these wonderful replies. You're all very kind people to share so much with me :)

The consensus seems to be that hosting your own email server might be a lot, so I might leave that as future project. But for Nextcloud and Jellyfin I saw a lot of great tips! I forgot to mention that ideally I would like to have Nextcloud available for multiple users (ie. family memebers) so indeed learning some basic networking/firewalling seems the bare minimum.

I also promise that I will carefully read the manuals!

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

Programming knowledge is largely irrelevant, as in to gain sensible benefits from it you have to be generalist software engineer with decade+ of experience of seeing it all. Then yeah, you can read any code, any stack traces and figure out the intent of developers of the system and what is undocumented/incorrectly documented.

Focusing on one particular language is the right and wrong answer at the same time. Wrong in a sense that you'll have to pick up other languages along your journey anyway and right because you need to achieve mastery in one of them to get to more advanced programming topics. Pick a language that you have fun using and don't care about anything else.

As for what to learn for self-hosting... Linux (pick a distro, let's say ubuntu LTS w/o gui, ssh there and get comfortable with it. It includes installation, filesystems, RAID setups), networking, HTTP/S (that's the main thing you'll be interacting with as self-hoster and knowing various nuances of reverse proxying is a must), firewalling, basics of security and hardening, docker, monitoring, backups.

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

Patience, most of all.

Also, backups and notes. The solution you use to host might take care of the backups. For example, I use Unraid, so if any drive fails the system can simulate the data on that drive until I can get it shut down to replace it, and then recreate the data on the new drive.

As for notes, those are important so that you can always know what you’ve done, and what you need to do. That way, if you ever have to do it again, say if you’re setting up another server or replacing one that failed, you know the steps you took to get it set up exactly how you like. It’s also handy because you’ll be doing things like assigning services to ports, and you’ll probably at some point want to know what services are on what ports without going through and checking each one. Things like that are handy things to stick in notes.

Other than that, you don’t need a lot of skills to set something like a home server up. You just need to read the documentation for each service you’re planning to use, and get familiar with how it works.

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

Unraid is not a backup. It is good, but if your data goes wrong for different reasons or you lose the entire device, you can't restore it. Dedicated backups are a must for anything serious!

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

Unraid absolutely is a backup. That’s the whole point of the OS. And furthermore , the backup can be backed up at any time and stored on another device, allowing you to restore the entire OS and its configuration. And by “lose the entire device”, I’m assuming you mean the OS is corrupted. At that point, you simply burn a new USB and reconnect the drives, or move them to any other system running Unraid.

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

Lots of people have been talking about products and tools. It's docker, tailscale, cloudflare proxmox etc. These are important, but will likely come and go on a long enough timescale.

In terms of actual skills, there's two that will dramatically decrease your headaches. Documention and backup planning. The problem with developing those skills is, to my knowledge, they've only ever been obtained through suffering. Trying to remember how to rebuild something when you built it 6 months ago is futile. Trying to recover borked data is brutal. There's no fail-safe that you haven't created, and there's no history that you haven't written. Fortunately, these are also the most transferable skills.

My advice is, jump in. Don't hesitate. The chops in docker/linux/networking will come with use and familiarity. If it looks cool, do it. Make mistakes. You will rapidly realise what the problems with your set up are. You will gain knowledge in leaps and bounds from breaking a thing vs learning by rote or lesson. Reframe the headaches as a feature, not a bug - they're highlighting holes in your understanding. They signpost the way to being a better tech, and a more stable production environment.

The greatest bit about self hosting for me is planning the next great leap forward, making it better, cleaner, more robust. Growing the confidence in your abilities to create a system you can trust. Honing your skills and toolset is the entirety of the excercise, so jump in, and don't focus on any one thing to master or practice before hand!

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

Networking is way more important than pretty much anything else. TCP/IP and http are going to stay for quite a while.

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

The ability to read, and maybe watch a video. And then persistence for some of the trial and error you will run in to. All skills you need can be picked up with the above.

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

Dude it sounds you're over skilled for the job. You just need to read some guides and you probably know already how networking works, very basic linux commands, linux folder structures, and then the concept of docker - primarily how it maps networking & folders from your "host machine" to the "docker container", and how it loads services using a docker compose file. Especially for nextcloud, domain dns management and dynamic dns etc would be very helpful knowledge.

Also, just a suggestion, chatgpt etc are super useful. You tell them what you want and it spits out custom instructions for your setup, and you're able to counter question at any point. If it does make mistakes, which it will, it's a learning opportunity for you to troubleshoot and figure out how everything works. All the best and if you have a question feel free to message me.

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

Working hands, ability to type characters into keyboard.

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

Honestly, you just need to pick a video on follow along these days. There's a load of YouTube videos out there that take you step by step.

Lewis rosman recently put out a 14-hour mega video of doing everything, well he might have made some controversial choices, The outcome is quite comprehensive.

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

Determination, patience, a willingness to learn anything you need to.

If you have those, in time, you will be able to get your lab up and running. I started mine with a minimal knowledge of Linux (I could install it from a USB and poke around). Now it’s the center of my families digital life.

You’ll get there in time.

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

Experimenting with VMs is the way forward.

Basic networking knowledge is vital. And being able to configure your own firewall(s) safely is an important skill. Check out something like Foomuuri, or Firewald. Shorewall is brilliant for documentation and description of issues (with diagrams!) but it does not use the newer Linux kernel nftables and is no longer actively developed.

Go for it with Nextcloud.

I would also recommend at least having a shot at setting up an email server, although I would recommend pushing through to a fully working system. It is possible, and is very satisfying to have in place. The process of setting one up touches so many different parts of internet function and culture that it is worth it even if you don't end up with a production system. The Workaround.org ISPMail stuff is a good starting point, and includes some helpful background information at every stage, enough so you can begin to understand what's going on in the background and why certain choices are being made - even if you disagree with the decisions.

Python is great for server admin, although most server config and startup shutdown snippets are written in BASH. You will no doubt have already begun picking that up as you interact with your VMs.

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

Take the time to properly understand Linux file ownership and permission. Permission will be the cause of many issues you will encounter in you self-hosting journey on Linux. Make sure you know the basics of chmod (change permission) and chown (change ownership), Linux users and groups. This will save you some head-scratching, but don't worry, you will learn by doing !

Remember that, if you setup everything right, especially with docker, running as root / with sudo is not required for any of the services you may want to run.

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

Give Nextcloud AIO a shot. I installed bare metal the first time, but AIO has decreased my maintenance burden to next to nothing. Before that, it felt like every update would break my system. I'm a year or two into my transition from Linux nerd to self-hoster. I still fail at things on occasion, but I have learned a lot. I hope it goes as well or even better for you.

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

I've hosted NC for a decade, and the AIO was the first method that doesn't make me dread updates. And I've used pretty much every method of installing it over the years, everything sucked.

I snapshotted every time before and update because I knew it was a crapshoot whether the update was going to crater the system, and I'd roll back and wait for a working update to come out. Before snapshotting, I had to fix borked updates about every second time.

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

One thing I would do differently is setup LDAP and OIDC so you can use the same authentication credentials for different apps (at least the ones that support them). I use LLDAP and Authelia for this purpose.

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

the patience to read lots of documentation.

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

And maybe patience to power through a lack of documentation.

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

These 1000% eventually your gonna run into a problem / situation that does not have much documentation. Powering through step by step logically can test the best of us. You can spend 56 hours in a day on one problem. Give up. The next morning figure it out in 10 minutes. It's a marathon not a sprint.

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

if you could start again in your self hosting journey, what would you do differently? :)

That's an excellent question.

If I were to start over, the first thing that I would do is start by learning the basics of networking and set up a VPN! IMO exposing services to the public internet should be considered more of an advanced level task. When you don't know what you don't know, it's risky and frankly unnecessary.

The lowest barrier to entry for a personal VPN, by far, is Tailscale. Automatic internal DNS and clients for nearly any device makes finding services on a dedicated machine really, really, easy. Look into putting a tailscale client right into the compose file so you automatically get an internal DNS records for a service rather than a whole machine.

From there, play around with more ownership (work) with regard to what can touch your network. Switch from Tailscale's "trusted" login to hosting your own Headscale instance. Add a PiHole or AdGuard exit node and set up your own internal DNS records.

Maybe even scrap the magic (someone else's logic that may or may not be doing things you need) and go for a plain-Jane Wireguard setup.

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

For sure use Tailscale for VPN. They have apps for iPhone, Android, macOS, and Linux, so setting up your own personal network will be easy. Hosting on the real internet is definitely advanced and not always necessary.

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

attentiveness

[–] [email protected] 8 points 2 months ago (1 children)
  • Docker: You can practice on your main computer before complicating things with networking.
  • How to set up a reverse proxy: DNS, certificates, etc. I recommend Caddy.
  • Backups: If you use Docker Volumes, make sure you back those up too and test the backups.

To self-host, you do not need to know how to code.

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

To self-host, you do not need to know how to code.

I agree but also say that learning enough to be able to write simple bash scripts is maybe required.

There's always going to be stuff you want to automate and knowing enough bash to bang out a script that does what you want that you can drop into cron or systemd timers is probably a useful time investment.

[–] [email protected] 4 points 2 months ago* (last edited 2 months ago)

I think if you have a mini PC or something you don't mins installing server specific OS on, proxmox VE is pretty great. It can be a bit of a headache depending on what you want to do but it also makes expanding your self hosting super easy/fun.

Proxmox let's you created virtual machines or containers and easily manage them.

Currently I run a mini PC.(Beelinks are great for this and pretty cheap with more power than a raspberry pi)

  1. Proxmox VE as the operating system
  2. Jellyfin as my media server
  • looking to install home assistant and some others as well.
  1. Tail scale to use as a VPN into my network privately from anywhere.

Simplest set up? No. But I also just started self hosting. You're gonna hit some.headaches regardless but it's also extremely rewarding and I've learned alot.

Edit: if you're only wanting to run one thing (say jellyfin) . A raspberry pi with tail scale and jellyfin is how I started. Works just fine.

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

I don't know a bit about programming. Yunohost is a great place to start for self hosting a variety of services. For Jellyfin/downloading, I use Swizzin Community Edition. I like both of these projects because neither uses Docker lol. I tried some Docker based setups but could never get my head around it. YMMV.

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

It depends on what you want to self host.

As an example, a family member self hosted home assistant. They didn't have to know anything really. That was all they were doing and they bought the canned implementation.

If you have multiple services, you may need to know nginx configuration with virtual hosting.

You may want to use podman or docker or kubernetes.

It all depends ..

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

I don't know how to code, but I did a lot of internet searching on the commands to use (since I was also new to Linux). When I started to self host I was lucky the projects I wanted were popular enough that they had good documentation. Eventually after spinning up a lot of services I got the hang of the general structure of docker compose files and that's the extent of any kind of new language I learned, haha

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

Patience, and knowing when to look for documentation. Keep notes of stuff as you go. Just like in real IT, documentation can go a long way. Forgetting simple things can cause everything to fall apart at some point.

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

Hey OP, I'm just starting my self-hosting journey as well. I can program a little bit in Python and C++ but I haven't needed any of that so far. As others have said, some familiarity with Linux would be very helpful. The things I've done so far:

  • Wireguard VPN server on my router(no programming or linux commands, just some config of my router which I was able to do in the router's GUI.
  • Wireguard VPN client on some of my devices. My phone setup was easy, still working on setting that up on my Windows/Ubuntu laptop.
  • Home Assistant on a Raspberry Pi (WIP).

Eventually I plan to set up a NAS with Immich and some local IP cameras and Plex or something similar.

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

Why are you wanting to use python for self hosting? Python is a programming and scripting language.

There are two big things I would focus on. The first thing is networking, the OSI model and http basics. The other thing I would look into is Linux containers. If you can get both of these you are golden. Learn how to use and write docker compose files and then looking into building your own containers with Dockerfiles. You don't really need to build your own containers but it is good for learning

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

Programming is generally not needed when self-hosting. At best you might learn Ansible, Puppet, Salt, or Terraform, but that's for advanced scenarios (e.g. easily shifting the workloads between machines or into the cloud).

Learning the ins-and-outs of containers will get you the biggest return on investment. They're not strictly necessary but most tools will expect that is the common use-case and the community won't be as much help. Until you know more about containers I would also recommend Docker over Podman. It has a few more "conveniences" than Podman and orgs like LinuxServer will target Docker as the engine.

load more comments
view more: next ›