Hi Everyone! Lately I’ve been captivated by the idea of self-hosting, and 2 days ago I got an old laptop from my sister and now I think it’s time for me to actually try. I have ZERO experience: I’ve always been interested in Tech and I like to try and play with lot of stuff, but apart from super basic use of bash and some fun in Android modding (playing with ROM, kernels and recovery) I know nothing. My idea is to start simple by self-hosting a mastodon server to learn the basic and maybe later try something like jellyfin, joplin and airsonic.

I tried to read as much as I could online, but it seems like there’s a jungle of possibilities out there and so I came here to ask if what would be my approach is sound or if I am completely out of my mind.

I started by installing NixOs on the above mentioned old laptop. Installing it was actually easy, knowing how to use will be the problem.

My idea is the following:

  • Getting Cloudflare CDN with the Free-plan to hide my server IP
  • Learn the basic of SSH and use it to to authenticate only via keys
  • Learn and use nginx for reverse proxy
  • Set up a firewall
  • Install Mastodon code on NixOs
  • Set-up my instance
  • Use and maintain it

I understand that Docker is widely use to have multiple applications running on server and the advantage is that each application has its dependencies divided from the others. From my understanding though, also NixOs works in the same way (having dependencies divided for each package), so in theory once I install different applications on my machine I should be fine, or am I missing something?

Last but not least : do I need to buy a domain or is it just something cool/easier to have but that I can do without?

Many thanks in advance!

EDIT: Thank you all for the tips and suggestions! Really appreciate it! I will start by setting up my little media home server and then from there I’ll see 😊

  • Illecors@lemmy.cafe
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 year ago

    Can’t answer NixOS bits as I’ve not used it, but a few points to shoot off:

    • Starting with a Mastodon instance should not be the first step. Setting up an nginx webserver that says hello world! should.
    • There’s not much to learn about using SSH as much as setting it up. Key-only auth is a must. Changing the port to something high is a convenience - I hate my logs getting spammed by all the bots. Some are more than annoying enough. I have also enabled rate limiting on my SSH port for that reason alone, using iptables. I really need to have a look at nftables as that is faster and better.
    • Domain is only really necessary if you want to reach your stuff externally. Mastodon would count as such usecase. Whether you go proper paid or free - up to you, but do keep in mind the recent Mali situation into account. Domains are cheap anyway.
      • As a sidenote - you can set up your own authoritative DNS, your own VPN and then use whatever domain you desire. You can make your internal DNS serve your internal website on google.com if you wish :) It would, of course, only work on devices using your own DNS as the resolver. You would also most likely want to roll your own CA for that, but I’m getting distracted here :)

    In short - go for it! The worst that can happen is you will learn invaluable skills and have to start over.