92
submitted 4 days ago* (last edited 4 days ago) by Maroon@lemmy.world to c/selfhosted@lemmy.world

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.

top 50 comments
sorted by: hot top controversial new old
[-] JigglySackles@lemmy.world 14 points 3 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.

[-] Auli@lemmy.ca 16 points 3 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 4 points 2 days 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 2 points 2 days 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...

load more comments (1 replies)
[-] poVoq@slrpnk.net 89 points 4 days 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.

load more comments (14 replies)
[-] traches@sh.itjust.works 26 points 3 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 2 points 3 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.

I’ve been thinking of trying this (or using Caddy instead of nginx) so I could get Nextcloud running on an internal server but still have an external entry point (spousal approval) but after setting up the subdomain and then starting caddy and watching how many times that subdomain started to get scanned from various Ips all over the world, I figured eh that’s not a good plan. And I’m a nobody and don’t promote my domain anywhere.

[-] Darkassassin07@lemmy.ca 25 points 4 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.

[-] hsdkfr734r@feddit.nl 49 points 4 days ago* (last edited 4 days 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.)

[-] thirdBreakfast@lemmy.world 37 points 4 days ago

+1 for the main risk to my service reliability being me getting distracted by some other shiny thing and getting behind on maintenance.

[-] TheButtonJustSpins@infosec.pub 6 points 4 days ago
[-] dogsnest@lemmy.world 6 points 4 days ago

It's crowded.

[-] dogsnest@lemmy.world 12 points 4 days ago

...maybe use a reverse proxy...

+1 post.

I would suggest definitely reverse proxy. Caddy should be trivial in this use case.

cheers,

load more comments (21 replies)
load more comments (1 replies)
[-] MagicShel@programming.dev 26 points 4 days ago* (last edited 4 days ago)

DDoS and hacking are like taxes: you should be so lucky as to have to worry about them, because that means you're wildly successful. Worry about getting there first because that's the hard part.

[-] qaz@lemmy.world 6 points 4 days ago* (last edited 4 days ago)

You don't have to be successful to get hit by bots scanning for known vulnerabilities in common software (e.g. Wordpress), but OP won't have to worry about that if they keep everything up to date. However, this is also necessary when renting a VPN from said centralised services.

load more comments (3 replies)
[-] MangoPenguin@lemmy.blahaj.zone 13 points 3 days ago* (last edited 3 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.

[-] Evotech@lemmy.world 16 points 4 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

[-] fluckx@lemmy.world 14 points 4 days ago

Talk about a reverse UNO card.

[-] Presi300@lemmy.world 18 points 4 days ago* (last edited 4 days ago)

I feel like you have the wrong idea of what hacking acting a actually is... But yes, as long as you don't do anything too stupid line forwarding all of your ports or going without any sort of firewall, the chances of you getting hacked are very low...

As for DDOSing, you can get DDOSed with or without self hosting all the same, but I wouldn't worry about it.

load more comments (1 replies)
[-] HumanPerson@sh.itjust.works 11 points 4 days ago

You can. I am lucky enough to not have been hacked after about a year of this, and I use a server in the living room. There are plenty of guides online for securing a server. Use common sense, and also look up threat modeling. You can also start hosting things locally and only host to the interwebs once you learn a little more. Basically, the idea that you need cloudflare and aws to not get hacked is because of misleading marketing.

[-] Auli@lemmy.ca 3 points 3 days ago

Man if your lucky enough after a year I must be super duper lucky with well over a decade.

[-] jlh@lemmy.jlh.name 13 points 4 days ago

Self hosting can save a lot of money compared to Google or aws. Also, self hosting doesn't make you vulnerable to DDOS, you can be DDOSed even without a home server.

You don't need VLANs to keep your network secure, but you should make sure than any self hosted service isn't unnecessarily opens up tot he internet, and make sure that all your services are up to date.

What services are you planning to run? I could help suggest a threat model and security policy.

[-] Apollo2323@lemmy.dbzer0.com 11 points 4 days ago

Hey no to be harsh or anything but did you actually made your research? Plenty of people self host websites on their house without AWS , Google or Cloudfare and it works fine.

[-] qaz@lemmy.world 7 points 4 days ago* (last edited 4 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 3 points 3 days ago* (last edited 3 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.

Edit, I might have miss understood the definition of public. I have hosted stuff publicly, however everything was protected by a login screen. So it wasn't something a random person could make use of.

load more comments (2 replies)
[-] Confused_Emus@lemmy.world 9 points 4 days ago

I host a handful of Internet facing sites/applications from my NAS and have had no issues. Just make sure you know how to configure your firewall correctly and you’ll be fine.

[-] just_another_person@lemmy.world 8 points 4 days ago

Firewall, Auth on all services, diligent monitoring, network segmentation (vlans are fine), and don't leave any open communications ports, and you'll be fine.

Further steps would be intrusion detecting/banning like crowdsec for whatever apps leave world accessible. Maybe think about running a BSD host and using jails.

load more comments (2 replies)
[-] deafboy@lemmy.world 2 points 3 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.

[-] GravitySpoiled@lemmy.ml 9 points 4 days ago

Why would anyone ddos you? Ddos costs money andor effort. Noone is going to waste that on you. Maybe dos but not ddos. And the troll will go away after some time as well. There's no gain in dosing you. Why would anyone hack your static website? For the lulz? If everything is https encrypted on your local net how does a hacker infest everything on your network?

load more comments (2 replies)
[-] filister@lemmy.world 6 points 4 days ago* (last edited 4 days ago)

If you are behind 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.

[-] vzq@lemmy.blahaj.zone 7 points 4 days ago

It’s very possible. If you carefully manage your attack surface and update your software regularly, you can mitigate your security risks quite a bit.

The main problem is going to be email. I have found no reliable way to send email that does not start with “have someone else do it for you” or “obtain an IP block delegation”.

load more comments (1 replies)
[-] octopus_ink@lemmy.ml 7 points 4 days ago* (last edited 4 days ago)

I have servers on Digital Ocean and Linode and also one in my basement, and have had no problem. I do have all services behind NPM (not to suggest it's a panacea) and use HTTPS/SSH for everything. (not to suggest HTTPS/SSH are either) My use case could be different than yours - my immediate family are my only consumers - but have been running the same services in those locations for a few years now without issue.

[-] Lifebandit666@feddit.uk 4 points 3 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

load more comments
view more: next ›
this post was submitted on 26 Jun 2024
92 points (88.3% liked)

Selfhosted

37715 readers
552 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 1 year ago
MODERATORS