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 😊

  • deeznutz@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    As others have suggested I would stick to internal only until you’re comfortable. Dealing with automated port scanning from all over the globe is a nightmare if you aren’t running a tight ship, and a collasal headache to deal with if they get in. I started with pihole, jellyfin, and some other simple docker services. Check out linuxserver.io if you go the docker route, they have good prebuilt compose files for you to use and the community has good info on their forums. You don’t need a domain but it’s preferred if you want to host something public-facing. Make sure you have fail2ban configured if you open stuff up to the web, it makes dealing with the automated attacks easier.

    • notasandwich1948@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I know I’m a bit late here but how exactly is automated port scanning a nightmare, I’ve had bots join my minecraft server, thousands of failed ssh logins and some bots in my nginx logs but i don’t see it as a very big issue

      • deeznutz@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Scanning isn’t a problem, it’s when someone gets in and sets up a c&c client that you’ve got issues. If you have open ports and out of date software, or bad password practices, it’s only a matter of time before someone turns automated port knocking into embedding malware in your printers and IOT devices.