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.
EDIT for future readers:
I think for now I’m not going to self host anything I intend to be accessed by the public. While I pay the internet bill, my name is on the account, and I own all the equipment, I’m not the only member of this household, so it would be somewhat inconsiderate of me to share our bandwidth with public traffic. In general I think those warning against self-hosting resources one intends to be accessed by the general public are pretty sound.
I tried the Cloudflare tunnel suggestion, but it doesn’t seem to play nice with NodeBB. I can access the forum, even over HTTPS, but I can’t log in. Some quick googling leads me to believe it has something to do with web sockets. The first fix I found involves exposing my IP, which defeats the purpose of using a cloudflare tunnel. There may be a way around it, but I frankly can’t be bothered.
I would do it. Its fun…
Will you mess up? Yes. Who cares, Do it, just ensure its data you can lose no worries.
I would host on a vps, just to keep you home safe from swat raids (assuming you in the us, other nations should be safe).
Don’t do it.
Hosting a public service with no real knowledge of security can only end badly.
Get a vpc, do it there, learn from mistakes.
It’s more than just HTTPS, you also need proper authentication, regular updates, emergency updates for critical vulnerabilities, ideally some sort of monitoring to detect potential misuse of the service or any escalations from the service to the OS.
Ask yourself this: If this was your first time driving a car, would you rather do it in an empty parking lot where at worst you will damage the car. Or would you rather do it in a busy street where at worst you can kill someone?
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.
Risk of people uploading images that are illegal and you would end up being liable for hosting them. Risk of being hacked…
I don’t know how big of a risk this really is these days… I used to host a PHPbb forum in the early 2000’s off my personal computer and it didn’t get any traffic beyond myself and the friends I told about it. Kinda curious about that, myself, with how things have changed over the last 25 years.
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.
Sounds like hosting outside the US is a possible solution. Many things to be careful of, regardless.
Don’t chose china or russia though ;-)
You don’t need to put the server in the DMZ, just port forward port 80 and 443. Most routers these days ignore all requests to ports that aren’t open. And stick it behind Cloudflare, so you don’t have to expose your IP. Cloudflare also allows you to generate SSL certs that are good for a decade.
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.
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