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!

  • @iAmTheTot@sh.itjust.works
    link
    fedilink
    English
    6
    edit-2
    8 months ago

    I self host many services without any coding languages under my belt. I use Unraid because I found it user friendly for a newb like me. The most important skills I needed were good data backup habits just in case I messed something up, a willingness to read and learn, and the persistence to try more than once.

    • @iopq@lemmy.world
      link
      fedilink
      English
      28 months ago

      It really depends. I actually needed to learn a bit about networking to be able to host multiple things on nginx on the same port. Internally they run on different ports, but they can get routed by the host name

    • @habitualTartare@lemmy.world
      link
      fedilink
      English
      28 months ago

      Setting up jellyfin, I used docker on debian, and an old Quadro card. What could possibly go wrong?

      Turns out that week the Nvidia drivers got a faulty update pushed to debian stable and caused an error with getting the GPU to work in any container. I could either wait a week or pull the simple fix from testing. So impatiently I pulled it from testing.

  • @sugar_in_your_tea@sh.itjust.works
    link
    fedilink
    English
    12
    edit-2
    8 months ago

    Persistence and reading comprehension.

    There’s no need to learn Python or any programming language to self host stuff, you just need to be able to follow blog posts and run some Docker commands.

    I’m a software dev and haven’t touched a single line of code on my NAS. Everything is docker compose and other config files.

  • @nnullzz@lemmy.world
    link
    fedilink
    English
    118 months ago

    You don’t really need to know a specific language to self-host anything. But things like YAML, JSON, Docker, and some networking basic will go a long way.

    If I could do anything different though, it would definitely be to write more documentation. Document the steps taking setting things up, log notes on when you have to fix something, archive webpages and videos that you used along the way. Currently doing that myself now after some time self-hosting.

    • @AbouBenAdhem@lemmy.world
      link
      fedilink
      English
      4
      edit-2
      8 months ago

      One under-appreciated aspect of Docker is that it forces you to document all your setup steps in your dockerfile and docker-config files.

  • MrPistachios
    link
    fedilink
    English
    308 months ago

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

    • @Passerby6497@lemmy.world
      link
      fedilink
      English
      138 months 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
        48 months 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
          28 months 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 😕

  • @k4j8@lemmy.world
    link
    fedilink
    English
    88 months 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
      48 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.

  • Synapse
    link
    fedilink
    English
    78 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.

  • @ramenshaman@lemmy.world
    link
    fedilink
    English
    28 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.

  • @rumba@lemmy.zip
    link
    fedilink
    English
    68 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.

  • sylver_dragon
    link
    fedilink
    English
    28 months ago

    Along with the things others have said (Backups, Linux, Docker, Networking) I’d also recommend getting comfortable with server and network security. A lot of this is wrapped up in the simple mantra “install your goddamn updates!” But, there is more to it than that. For example, if you go with Nextcloud, read through their hardening guide and seriously consider implementing all of the recommendation. Also think through how you intend to manage both the server and instance. If this is all local, then it is easier as you can keep SSH access to the server firewalled off from the internet. If you host part of your stuff “in the cloud”, you’ll want to start looking at limiting down access and using keys to login (which is good practice for all situations). Also, never use default credentials. You may also want to familiarize yourself with the logs provided by the applications and maybe setup some monitoring around them. I personally run Nextcloud and I feed all my logs into Splunk (you can run a free instance in a docker container). I have a number of dashboards I look at every morning to keep an eye on things. E.g. Failed/successful logins, traffic sources, URI requests, file access, etc. If your server is attached to the internet it will be under attack constantly. Fail2Ban on my wireguard container banned 112 IP addresses over the last 24 hours, for 3 failed attempts to login via SSH. Less commonly, attackers try to log in to my Nextcloud instance. And my WordPress site is under constant attack. If you choose to run Wordpress, be very careful about the plugins you choose to install, and then keep them up to date. Wordpress itself is reasonably secure, the plugins are a shit-show and worse when they aren’t kept up to date.

  • Human Crayon
    link
    fedilink
    English
    78 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.

  • @Lesrid@lemm.ee
    link
    fedilink
    English
    48 months 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.

  • @AMillionMonkeys@lemmy.world
    link
    fedilink
    English
    68 months ago

    As others have said, you don’t need to know how to code, but you do need to be comfortable editing structured documents, so knowing a little programming does help.
    Unfortunately, Nextcloud and email are two of the most difficult things to self-host. This is by reputation, I haven’t tried myself. Email is supposed to be particularly difficult and the usual advice is to not bother.
    Jellyfin is pretty straight-forward as long as you don’t have a weird hardware decoding setup and as long as you don’t want remote access. If you do want remote access you need to use third party tools to do it securely. If it’s just for your own use then Tailscale makes it really easy. If you want to share with non-technical users it gets messy.

    • Kaldo
      link
      fedilink
      18 months ago

      I remember reading that tailscale can’t be used for sharing media, was that wrong?

      • @Onomatopoeia@lemmy.cafe
        link
        fedilink
        English
        18 months ago

        Performance may be an issue. It’s not specifically designed for streaming performance, and being a software VPN, it will depend a great deal on the devices used at each end.

      • @AMillionMonkeys@lemmy.world
        link
        fedilink
        English
        18 months ago

        I believe the issue is only with Tailscale Funnels. With Funnels, the data runs through TS’s infrastructure so it’s subject to whatever kind of bandwidth limitation they feel like enacting.

  • Martin
    link
    fedilink
    English
    0
    edit-2
    8 months ago

    If you have a VM, there is no need for docker. Start by installing ssh. Enable public key auth. Disable password authentication. Set up fail2ban with ssh. Set up ufw. Set up nextcloud. Avoid hosting your own mail, that’s another level of complexity. If you really need it, try mailcow.

    If you have all that and didn’t touch a GUI on your way, you’re good to go.

    • Possibly linux
      link
      fedilink
      English
      08 months ago

      I would not run anything outside of docker honestly. Docker is so much easier to setup and maintain.

  • @MXX53@programming.dev
    link
    fedilink
    English
    38 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.