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.

  • JigglySackles@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days 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.

  • deafboy@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days ago

    Of course security comes with layers, and if you’re not comfortable hosting services publically, use a VPN.

    However, 3 simple rules go a long way:

    1. Treat any machine or service on a local network as if they were publically accesible. That will prevent you from accidentally leaving the auth off, or leaving the weak/default passwords in place.

    2. Install services in a way that they are easy to patch. For example, prefer phpmyadmin from debian repo instead of just copy pasting the latest official release in the www folder. If you absolutely need the latest release, try a container maintained by a reasonable adult. (No offense to the handful of kids I’ve known providing a solid code, knowledge and bugreports for the general public!)

    3. Use unattended-upgrades, or an alternative auto update mechanism on rhel based distros, if you don’t want to become a fulltime sysadmin. The increased security is absolutely worth the very occasional breakage.

    4. You and your hardware are your worst enemies. There are tons of giudes on what a proper backup should look like, but don’t let that discourage you. Some backup is always better than NO backup. Even if it’s just a copy of critical files on an external usb drive. You can always go crazy later, and use snapshotting abilities of your filesystem (btrfs, zfs), build a separate backupserver, move it to a different physical location… sky really is the limit here.

  • Auli@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days 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
      0
      ·
      1 day 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.

    • tills13@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 day ago

      99% of people think they are more important than they are.

      If you THINK you might be the victim of an attack like this, you’re not going to be a victim of an attack like this. If you KNOW you’ll be the victim of an attack like this on the other hand…

      • gamermanh@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 day ago

        Many of us also lived through the era where any 13 year old could steal Mommy’s credit card and rent a botnet for that ezpz

        My MC server a decade ago was tiny and it still happened every few months when we banned some butthurt kid

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days ago

    If you do it right you shouldn’t get hacked. Even if you do you can keep good immutable backups so you can restore. Also make sure you monitor everything for bad behavior or red flags.

  • traches@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days ago

    Use any old computer you have lying around as a server. Use Tailscale to connect to it, and don’t open any ports in your home firewall. Congrats, you’re self-hosting and your risk is minimal.

    • OpossumOnKeyboard@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      Exactly what I do and works like a dream. Had a VPS and nginx to proxy domain to it but got rid of it because I really had no use for it, the Tailscale method worked so well.

  • MangoPenguin@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    2 days ago

    Getting DDOSed or hacked is very very rare for anyone self hosting. DDOS doesn’t really happen to random people hosting a few small services, and hacking is also rare because it requires that you expose something with a significant enough vulnerability that someone has a way into the application and potentially the server behind it.

    But it’s good to take some basic steps like an isolated VLAN as you’ve mentioned already, but also don’t expose services unless you need to. Immich for example if it’s just you using it will work just fine without being exposed to the internet.

  • LifeBandit666@feddit.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days ago

    I’ve self hosted home assistant for a few years, external access through Cloud flare now because it’s been so stablez but previously used DuckDNS which was a bit shit if I’m honest.

    I got into self hosting proper earlier this year, I wanted to make something that I could sail the 7 seas with.

    I use Tailscale for everything.

    The only open port on my router is for Plex because I’m a socialist and like to share my work with my friends.

    Just keep it all local and use it at home. If you wanna take some of your media outside with you, download it onto your phone before you leave

  • Darkassassin07@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days 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.

  • qaz@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    3 days ago

    You can simply set up a VPN for your home network (e.g. Tailscale, Netbird, Headscale, etc.) and you won’t have to worry about attacks. Public services require a little more work, you will need to rely on a service from a company, either a tunnel (e.g. Tailscale funnel) or a VPS.

    • Catsrules@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      2 days ago

      Public services require a little more work, you will need to rely on a service from a company, either a tunnel (e.g. Tailscale funnel) or a VPS.

      I have been hosting random public services for years publicly and it hasn’t been an issue.

      • qaz@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 days ago

        No, I’m currently using Tailscale but have been considering switching to Netbird to not be reliant on Tailscale.

  • Flax@feddit.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 days ago

    If your SSH is using key authentication and you don’t have anything silly as an attack vector, you should be grand.

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      People who ho get compromised are the ones who expose a password authentication service with a short memorable password

  • filister@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 days ago

    If you are CGNAT and use some tunnel (Wireguard, Tailscale, etc.) to access your services which are running on Docker containers, the attack vector is almost not existing.

      • 5ymm3trY@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 days ago

        Is this some sort of insider I am not aware of? I always see these kind of replies and I never understand them. Why even write anything if you don’t have anything meaningful to add to the conversation? This is a genuine question to both of you. I mean, yes, it might be true that everything is fine and dandy if you follow good security practices? But how does that help a beginner? Its like saying driving a car with manual transmission is easy. You just need to know the numbers from 1 to 6 and that a higher number makes the car go faster. Even though this might be technically true, it doesn’t help anybody.

  • Valon_Blue@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 days ago

    I’ve been self hosting for 2 or 3 years and haven’t been hacked, though I fully expect it to happen eventually(especially if I start posting my blog in places). I’d suggest self hosting a VPN to get into your home network and not making your apps accessible via the internet unless 100% necessary. I also use docker containers to minimize the apps access to my full system. Best of luck!

  • Evotech@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 days 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

  • ___@l.djw.li
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 days ago

    If your needs are fairly low on the processing side, you can snag a cloud VPS on LowEndBox for five or six dollars a month. Quality is highly variable ofc, but I’m reasonably my happy with mine.

    No AWS, etc (though I don’t know offhand where the actual box lives), SSH access defaults to a key, and the rest (firewall, reverse proxy if you like, and all the other best practices) are but an apt-get away and a quick searxng to find and dissect working configs.

    Incidentally, searxng is a good place to start- dead easy to get rolling,and a big step towards degoogling your life. Stand it up, throw a pretty standard config at nginx, and do a certbot —nginx -d search.mydomain.com - that all there is to it.

    YMMV with more complex apps,but there is plenty of help to be had.

    Oh…. Decide early on if anonymity is a goal,or you’re ok tying real life identity to your server if someone cares to look. Register domains and make public facing choices accordingly.

    Either choice is acceptable if it’s the right one for you, but it’s hard to change once you pick a path.

    I’m a big fan of not hosting on prem simply because it’s one more set of cables to trip over, etc. But for a latte a month in hosting costs, it’s worth it to me.