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!

  • k4j8@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 hours ago
    • 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.

    • schizo@forum.uncomfortable.business
      link
      fedilink
      English
      arrow-up
      2
      ·
      28 minutes 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.

  • JackAttack@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 hours 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.

  • revanite@lemm.ee
    link
    fedilink
    English
    arrow-up
    3
    ·
    3 hours 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

  • electric_nan@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 hours 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.

  • jj4211@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 hours 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 …

  • Presi300@lemmy.world
    link
    fedilink
    English
    arrow-up
    21
    ·
    7 hours ago

    You don’t need to be a programmer to selfhost.

    The most important “skills” to have if you want to selfhost imo are:

    • Basic Networking knowledge

    • Basic Linux knowledge

    • Basic docker/docker compose knowledge

    But I’d say to not get lost in the papers and just jump right in. Imo, the best way to learn how to selfhost is to just… Do it. Most everything is free and fairly well documented

  • terminhell@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 hours 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.

  • ramenshaman@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 hours 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.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    35
    arrow-down
    1
    ·
    9 hours ago

    Docker really. If something goes bad, trash the container and start again without loosing your actual data.

    • RxBrad@infosec.pub
      link
      fedilink
      English
      arrow-up
      8
      ·
      8 hours ago

      Mostly Docker.

      Portainer and plugging Docker Compose XML into Portainer stacks makes Docker stupid-simple. (personally speaking as a stupid person that does this)

      Cloudflare tunnels for stuff people other than you might want to access.

      Tailscale if it’s only you.

      Reverse proxy & port forwarding for sharing media over Jellyfin without violating the Cloudflare Tunnel ToS.

    • Deckweiss@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      8 hours ago

      Dokploy is a pretty easy web gui and is itself a docker container.

      Makes it dead simple to manage multiple containers and domains. (Not for power users that need kubernetes level flexibility)

  • Lesrid@lemm.ee
    link
    fedilink
    English
    arrow-up
    5
    ·
    6 hours ago

    I would caution against self hosting email long term. It’s fine for the educational value but there’s a lot of annoying obstacles you can encounter repeatedly even after everything is established.

  • Avid Amoeba@lemmy.ca
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    6 hours ago

    If you want to program something, the closest you’re gonna get to programming is Ansible and Bash scripts.

    You might want to get self hosting hardware like Synology or the like if you’re not ready to dig.

    Otherwise here’s some things you need to know:

    • Docker
      • Easy, consistent deployment of services in their own environments. Think a VM but with almost no overhead.
    • Docker Compose
      • Run docker containers with consistent configuration in files.
      • Connect various containers to each other on the same or different networks.
      • Get multiple containers to start together and talk to each other.
    • Systemd
      • Manage any service on Linux. If anything needs to start on boot, restart when crashed, start on timer, you want Systemd.
      • You can manage your docker compose containers lifecycle via Systemd.
    • NGINX/Apache/Caddy
      • A web server for reverse proxy. You’d probably need one at some point, especially if you want HTTPS. Your services get hidden behind it.
    • ZFS
      • Reliable redundant storage. You’ll need storage. Use ZFS with 2-disk redundancy.
      • Supports automatic snapshots for recovering from oopsies. E.g. deleted something or some software shat on your data.
      • Can use recertified disks from serverpartsdeals.
      • Can use USB disks or USB box with multiple disks. If you end up going the USB route, ask me for tested hardware.
    • Backup system
      • Something to do backup. There are many options.
    • Ansible
      • If you want to write code that describes your services and make them happen, you want Ansible. You write code (well YAML) and Ansible installs things, writes config files, sets up Systemd services, restarts things. It can be convenient especially if you have a lot of stuff and you want to be able to see all of your infrastructure in code in one place and be able to version it.
    • Prometheus
      • Monitoring your stuff. Is my backup service running? If not send me an email.

    Oh and use Debian or Ubuntu LTS.

    • BrianTheeBiscuiteer@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 hours ago

      Ansible is nice but I’ll repeat (as I said in another thread) it’s kind of advanced and gives a much better return on investment if you manage several hosts, plan to switch hosts regularly, or plan to do regular rebuilds of the environment.

    • Onomatopoeia@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      7 hours ago

      Great summary!

      Why Debian or Ubuntu? (I have my own thoughts, but it would be useful to show even high-level reasons why they’re preferred).

      Re: Backup - Backblaze has a great writeup on backup approach today. I’m a fan of cloud being part of the mix (I use a combo of local replication and cloud, to mitigate different risks). Getting people to include backup from the start will help them long-term, so great you included it!

      • Avid Amoeba@lemmy.ca
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        7 hours ago

        Predictable cadence, stable operation, timely updates, huge community and therefore documentation. You can get up to 5 years from an LTS release of Debian or Ubuntu. With Ubuntu LTS and Ubuntu Pro (free) you could theoretically run a machine without upgrading for 10 years. If you run workloads in containers, it doesn’t matter how old the host OS is. As long as it’s security patches, you can keep on trucking.

    • LiveLM@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      7 hours ago

      If you end up going the USB route, ask me for tested hardware.

      Send these my way chief

      • Avid Amoeba@lemmy.ca
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        7 hours ago

        As briefly as possible:

        • Host side
          • If you use Intel, all is well.
          • If you use AMD…
            • Prior to AM5
              • Use an ASMedia PCIe USB card (StatTech, Sonnet)
              • X570 is especially bad, though I’ve had some success with B350, when using the chipset ports. The CPU ports are all bad. Small form factor PCs often only expose CPU USB ports. They work with single disk per port but if you peg a port with a multi-disk box, they crap out regularly.
            • Post AM5
              • Have only tested USB4 on X870 and it’s solid.
        • Client side
          • WD Elements / MyBook
            • If you get disconnects under load and you’re not on a shit AMD USB host, the USB-SATA controller is overheating. Open them and ahere a heatsink on it. Drill a hole in the case above it for better ventilation. Disconnections will stop. If you don’t want to deal with any of that buy the item below.
          • OWC Mercury Elite Pro Quad
            • Well built, solid controllers, no issues over a year of testing. I have 2, hosting an 8-disk RAIDz2 and 2 hosting a 5-disk RAIDz2.
          • Terramaster
            • A friend bought a 6-bay and tore it down for me. It has the same controllers as the OWC in a similar topology. If it’s cheaper it might be OK. I can vouch for the OWC though.
          • Cables
            • Get name brand cables, ideally higher spec than what you’d need! They aren’t important for a single USB disk but running a 4-disk box can max out the port bandwidth. If the cable can’t handle it… errors.
        • LiveLM@lemmy.zip
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          3 hours ago

          Much appreciated 🙏
          Gnarly stuff with the WD’s huh? Unfortunately I think that’s what I’ll end up having to put up with since I can’t really find the other options for a decent price around here.
          Funny enough I was half-considering just using a bunch of WD Elements. You think the MyBooks might fare any better?

          • Avid Amoeba@lemmy.ca
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            17 minutes ago

            I used a mix of Elements and MyBook for years. Upon opening to heatsink, I didn’t see any significant differences between them. They use ASMedia or Jmicron, mostly ASMedia. The overheating issue depends on ambient temp and load. I’ve had one machine in a basement never experience them. Either way the solution is pretty straightforward and cheap. Once heatsinked, I haven’t had a problem.

            The cables they come with are good.

  • NeatoBuilds
    link
    fedilink
    English
    arrow-up
    22
    ·
    9 hours ago

    Learn how to properly backup your data in case you nuke something you shouldn’t

    • Passerby6497@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      ·
      9 hours ago

      And regularly check them. I just found out the hard way this last week that my backups haven’t been running for a few weeks …

      • Onomatopoeia@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        3
        ·
        7 hours ago

        Yep.

        I have friends in the SMB space, one thing they do is a regular backup verification (quarterly). At that frequency, restoring even a few files (especially to a new VM), is very indicative, especially if it’s a large dataset (e.g. Quickbooks).

        In Enterprise, we do all sorts of validation, depending on the system. Some is performed as part of Data Center operations, some is by IT (those are separate things), some by Business Unit management and their IT counterparts.

        • Passerby6497@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          5 hours ago

          Unfortunately, that wouldn’t have done anything. Because I did that in December and they stopped running like 2 weeks after my verification. I would have caught it on my next scheduled validation, but that doesn’t help me now 😕

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    5 hours ago

    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

    • BrianTheeBiscuiteer@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 hours 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.

  • dontblink@feddit.it
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    6 hours ago

    Enough focus to read documentation.

    That’s really it. If your purpose is just self hosting learning bash could also be helpful. And yeah Linux would be a great choice.

    But mostly, if you want to self host an instance of Nextcloud correctly and without having to deal with too many unexpected things, you have to read the documentation and do not rush. Most self hosted stuff isn’t “install and use”, because you’ll be your own server manager, and everything requires attention to be managed.

    Docker or not docker you will have to deal with configuration, settings, requirements and updates.

    So understanding how to read the docs/search and open github issues and taking time to read everything would be the most important skill for me.

    Also writing down what you are doing would indeed be helpful too, in order not to lose track of what you’re doing on your server. (Check out Ansible).

    Most apps out there simply need you to know about permissions, systemctl services and package managers.

    Try to always find a specific package for your distro for everything you install (eg. .deb for Debian), and have strategies when this is not possible (aka using a Python venv when installing python programs).