I understand that people enter the world of self hosting for various reasons. I am trying to dip my toes in this ocean to try and get away from privacy-offending centralised services such as Google, Cloudflare, AWS, etc.

As I spend more time here, I realise that it is practically impossible; especially for a newcomer, to setup any any usable self hosted web service without relying on these corporate behemoths.

I wanted to have my own little static website and alongside that run Immich, but I find that without Cloudflare, Google, and AWS, I run the risk of getting DDOSed or hacked. Also, since the physical server will be hosted at my home (to avoid AWS), there is a serious risk of infecting all devices at home as well (currently reading about VLANS to avoid this).

Am I correct in thinking that avoiding these corporations is impossible (and make peace with this situation), or are there ways to circumvent these giants and still have a good experience self hosting and using web services, even as a newcomer (all without draining my pockets too much)?

Edit: I was working on a lot of misconceptions and still have a lot of learn. Thank you all for your answers.

  • hsdkfr734r@feddit.nl
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    3 months ago

    One aspect is how interesting you are as a target. What would a possible attacker gain by getting access to your services or hosts?

    The danger to get hacked is there but you are not Microsoft, amazon or PayPal. Expect login attempts and port scans from actors who map out the internets. But I doubt someone would spend much effort to break into your hosts if you do not make it easy (like scripted automatic exploits and known passwords login attempts easy) .

    DDOS protection isn’t something a tiny self hosted instance would need (at least in my experience).

    Firewall your hosts, maybe use a reverse proxy and only expose the necessary services. Use secure passwords (different for each service), add fail2ban or the like if you’re paranoid. Maybe look into MFA. Use a DMZ (yes, VLANs could be involved here). Keep your software updated so that exploits don’t work. Have backups if something breaks or gets broken.

    In my experience the biggest danger to my services is my laziness. It takes steady low level effort to keep the instances updated and running. (Yes there are automated update mechanisms - unattended upgrades i.e. -, but also downwards compatibility breaking changes in the software which will require manual interactions by me.)

  • JigglySackles@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    DDOS against a little self hosted instance isn’t really a concern I’d have. I’d be more concerned with the scraping of private information, ransomware, password compromises, things of that nature. If you keep your edge devices on the latest security patches and you are cognizant on what you are exposing and how, you’ll be fine.

  • Darkassassin07@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    Drink less paranoia smoothie…

    I’ve been self-hosting for almost a decade now; never bothered with any of the giants. Just a domain pointed at me, and an open port or two. Never had an issue.

    Don’t expose anything you don’t share with others; monitor the things you do expose with tools like fail2ban. VPN into the LAN for access to everything else.

  • Auli@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    The DDOSED hype on this site is so over played. Oh my god my little self hosted services are going to get attacked. Is it technically possible yes but it hasn’t been my experience.

    • markstos@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 months ago

      DDoSing cost the attacker some time and resources so there has to something in it for them.

      Random servers on the internet are subject to lots of drive-by vuln scans and brute force login attempts, but not DDoS, which are most costly to execute.

  • Evotech@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    A VPS with fail2ban is all you need really. Oh and don’t make ssh accounts where the username is the password. That’s what I did once, but the hackers were nice, they closed the hole and then just used it to run a irc client because the network and host was so stable.

    Found out by accident, too bad they left their irc username and pw in cleartext. Was a fun week or so messing around with their channels

  • poVoq@slrpnk.net
    cake
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    This is nonsense. A small static website is not going to be hacked or DDOSd. You can run it off a cheap ARM single board computer on your desk, no problem at all.

    • BearOfaTime@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      What?

      I’ve popped up a web server and within a day had so many hits on the router (thousands per minute) that performance tanked.

      Yea, no, any exposed service will get hammered. Frankly I’m surprised that machine I setup didn’t get hacked.

      • poVoq@slrpnk.net
        cake
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        Don’t leave SSH on port 22 open as there are a lot of crawlers for that, otherwise I really can’t say I share your experience, and I have been self-hosting for years.

        • youmaynotknow@lemmy.ml
          link
          fedilink
          English
          arrow-up
          0
          ·
          3 months ago

          Am I missing something? Why would anyone leave SSH open outside the internal network?

          All of my services have SSH disabled unless I need to do something, and then I only do it locally, and disable as soon as I’m done.

          Note that I don’t have a VPS anywhere.

          • poVoq@slrpnk.net
            cake
            link
            fedilink
            English
            arrow-up
            0
            ·
            3 months ago

            Some people want to be able to reach their server via SSH when they are not at home, but yes I agree in general that is not necessary when running a real home server.

            • JustEnoughDucks@feddit.nl
              link
              fedilink
              English
              arrow-up
              1
              ·
              3 months ago

              Then use Wireguard to get into your local network. Simple as. All security risks that don’t need to be accessed by the public (document servers, ssh, internal tools, etc…) can be accessed via VPN while the port forwarded servers are behind a reverse proxy, TLS, and an authentication layer like Authelia/authentik for things that only a small group needs to access.

              Sorry, but there is 1 case in 10000 where a home user would have to have publicly exposed SSH and 9999 cases of 10000 where it is not needed at all and would only be done out of laziness or lack of knowledge of options.