I've wanted to do this for a long time. My current ADHD hyperfixation is NodeBB, but I think my questions fit most anything that you want to be available to the general public and not just yourself and your friends.
Basically, I want to host a NodeBB instance intended for the general public out of my house. What are the risks of doing this? In particular, what are the risks of doling out a web address that points to my personal IP address? Is this even a good idea? Or should I just rent a VPS? This is 80% me wanting to improve my sysadmin skills, and 20% me wanting to create a community.
I have a DMZ in place. Hosts in the DMZ cannot reach the LAN, but LAN hosts can reach the DMZ. If necessary, I can make sure DMZ hosts can't communicate with each other.
I have synchronous 1 Gb fiber internet. Based on the user traffic of similar forums, I don't anticipate a crush of people.
I know the basics of how to set up a NodeBB instance, and I've successfully backed up and restored an instance on another machine.
I'm not 100% on things like HTTPS certs. I can paste a certbot command from a tutorial, that's it.
Anything else I should know? Thanks!
EDIT:
I also have a domain, a couple of them, actually. They're like potato chips; you can't stop at just one.
I don't plan on self-hosting email used for forum registration and announcements. I'm not a masochist.
just cloudflare tunnel it - i set one up the other day and it works super well, proving external access to a locally hosted service all without having to set up your own SsL certs and worrying about exposing private ips or ports
Its so cheap to just get a vps from a littlecreekhosting deal, I checked them all on lowendtalk and its the cheapest for highest specs, you do have to comment your invoice to double ram, but its 4 core 8gb ram for 3.50 a month and 8core 16gb 7$ cogent amd epyc, and solid ssd space 140-160 idr exactly, they have multiple deals posted, the one with the prices I mention is the best one, they also had windows vps deals. Spent way too long testing hella, its not the best ping out there for me since I'm fairly far but I'm not hosting gameservers so its a non issue.
There are many other deals on lowendtalk but they are typically for way less resources or way more expensive for a lot more resources
Its so cheap to just get a vps from a littlecreekhosting deal
This site seems suspicious as hell. Incredibly basic site, no info on where they're located, and the "About Us" links aren't even links. There's no About Us page.
I think they would fall in the less resources category. But they offer unlimited data transfer, and you can use any distro you want. I run slackware btw.
The DMZ is the right idea. But it's the old way. You definitely want whatever is serving your website to be separated out from your house. You're hosting should be on an isolated VLAN. The internet should only be able to talk to the server it needs to talk to, no other ports. That box should only be allowed to talk to what it absolutely must talk to and only on the ports that are required. You should run an independent firewall on each one of the boxes that are involved in the hosting with only the proper ports open.
Giving up your private IP Will definitely give away your general location to everyone and your precise location to the authorities.
I would highly recommend using cloudflare or one of the other funnel options. A lot of people don't like cloud flare because they can capitalize on your traffic, The cloudflare also just won't shut you down and sell you out like your ISP will at the first request, They don't do shit about anything until there's a warrant or a court filing. On the upside you don't give out your private IP to anyone. You have DDOS protection, and a reasonable layer of anominity.
You need to check daily to make sure all of your software is updated. We're talking OS, middleware, plugins, application. Preferably via automation. All of the software and plugins you use for this type of hosting end up getting vulnerabilities.
Security is especially difficult on forums.
There's lots of opportunities there for skilled people who are pissed off at what you or someone else is saying to get butthurt. People know exactly what you're running, then they do some magic behind the scenes next thing you know there's a bunch of admins you didn't create.
You don't need to be hosting your own email but you are going to need an SMTP provider, most free services won't let you masquerade the from address.
If you are based in America, you will want to keep a close eye on the semi-regular attempts from congress to repeal Section 230 of the Communications Decency Act.
If it’s ever successfully repealed, you’d become liable for anything posted to your forum.
If it’s ever successfully repealed, you’d become liable for anything posted to your forum
unless you refuse to moderate it. then you are only criminally liable in the circumstances that have been codified, which usually has a takedown grace period.
By then you would have racked up thousands of dollars in legal fees. Not to mention if anyone posts anything negative about the current administration you could be used as an example.
We already have students on visas being kidnapped off the streets, let’s stop pretending the law actually matters for the people in power.
As some have already mentioned info regarding security I wont add to that.
The other thing you should consider in my opinion is the legal side of things. Depending on you jurisdiction, you as the operator of the instance may be held accountable for the data it stores and serves. This means that you may be liable for both possession and distribution of illegal contents. I am not knowledgeable in regards to laws that cover moderation of content, but I assume you will be required to remove any such content if you gain knowledge of it. Again, this depends entirely on your countries laws and regulations but also on the laws and regulations of the countries you make your service available to.
Please be careful with hosting public instances.
If anyone has more insight to this, please do add it and correct me if necessary.
This is especially necessary to consider if you live in the US right now. One of the things the current administration is pushing for even harder than past administrations is removal of Section 230 of the communications act that was enacted in the 90s. This provides a defense against liability for the content you host as long as you make a reasonable effort to remove content that is illegal. Problem is that this makes it really difficult to censor (maliciously or otherwise) content because it's hard to go after the poster of the content and easier to go after the host or for the host to be under threat to stop it from being posted in the first place. But it's a totally unreasonable thing, so it basically would mean every website would have to screen every piece of content manually with a legal team and thus would mean user generates content would go away because it would be extremely expensive to implement (to the chagrin of the broadcast content industries).
The DMCA created way for censors to file a complaint and have content taken down immediately before review, but that means the censors have to do a lot of work to implement it, so they've continued to push for total elimination of Section 230. Since it's a problematic thing for fascism, the current administration has also been working hard to build a case so the current biased supreme court can remove it since legislation is unlikely to get through since those people have to get reelected whereas supreme court justices don't care about their reputation.
So, check your local laws and if in the US, keep an eye on Section 230 news as well as making sure you have a proper way to handle DMCA takedown notices.
I liked this read when considering legal ramifications for hosting content. It is U.S. focused so it might not be applicable to someone in another country.
I just want to say that you should make sure to take notes on what you're doing and why. It helps when you break something and want to go through what you did and sometimes notes don't make sense unless you put why so you can research it again
You might consider using something like Cloudflared or Tailscale's Funnels to proxy the connections through to prevent DDOSing and apply ACLs. You can still use your domains with those.
You could host the server on its own vlan and use tailscale to tunnel from a VPS to your server. This way your IP isn't exposed to the public. You can also add crowdsec or similar on the VPS.
I do the same thing with traefik on my dirt cheap VPS.
I have dynamic dns through cloudflare that provides a proxy ip address for me in addition to some protections.
After that I use a reverse proxy to route specific domain names to services. My router is set up to forward only ports 80 and 443 to that reverse proxy, so there's a good layer of safety there. There could be a weakness on the router, but at this point traffic is pretty limited.
After that, at least for your service, if you can have some control or throttling of signings and be more selective about who you let in, then that could help.
I say do it. Sure there's risk someone could put something on there you don't want, but I wouldn't say it's big enough to not do it.
There's really not much that can end badly, someone gets in your network (unlikely anyone even knows it exists)? reformat all your shit. Just by knowing what a DMZ is you are already more qualified than half the people I've met self hosting
do you run a business out of your house? do you run a bunch of peoples personal info? does anyone else? If you answered no to all of these then there really isn't much that can "go wrong" you can just unplug your shit.
hosting email also isn't that big of a deal but your home ISP will block port 25, you need to have a "business" one for them to unblock it and even then sometimes have to directly request it. Things like mailcow docker make it dead easy.
and yea as the other guy said always update your stuff
scans for open ports ran continuously since the 1990s, it was never a big deal. Also they only run on lower ports (not that it matters)
what are you talking about killing your internet performance? You can have hundreds of thousands of scans per day (which isn't gonna happen, you won't even get 100) and it still won't bog down jank cable internet from early 2000s