this post was submitted on 17 Jan 2025
101 points (98.1% liked)

Selfhosted

41153 readers
287 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!

(page 2) 26 comments
sorted by: hot top controversial new old
[–] jj4211@lemmy.world 2 points 1 day 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 ..

[–] terminhell@lemmy.world 2 points 1 day 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 2 points 1 day 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.

[–] possiblylinux127@lemmy.zip 2 points 1 day ago* (last edited 1 day 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

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.

[–] sylver_dragon@lemmy.world 2 points 1 day 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.

[–] just_another_person@lemmy.world 2 points 2 days ago (3 children)

No special knowledge needed except the very basic ability to understand and run commands from documentation.

[–] habitualTartare@lemmy.world 2 points 2 days ago (1 children)

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.

[–] possiblylinux127@lemmy.zip 1 points 1 day ago

Why didn't you do a rollback?

[–] iopq@lemmy.world 2 points 2 days ago (1 children)

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

[–] just_another_person@lemmy.world 1 points 1 day ago (1 children)

Networking isn't specific to Linux. It's just networking. Nginx configs work the same on every OS.

[–] iopq@lemmy.world 0 points 1 day ago

Who said anything about linux

load more comments (1 replies)
[–] ALERT@sh.itjust.works 0 points 1 day ago

attentiveness

[–] SpeechToTextCloud@discuss.tchncs.de 0 points 1 day ago* (last edited 1 day ago) (2 children)

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.

[–] possiblylinux127@lemmy.zip 1 points 1 day ago

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

[–] avidamoeba@lemmy.ca 0 points 1 day ago

Absolutely can and should use docker in a VM. ☺️

load more comments
view more: ‹ prev next ›