Theoretically Possible

General Discussion
  • First let me start by saying that I have no interest in this set up at all, I was just curious about if it would feasibly function.

    If you ran two NodeBB installs on the same host with different ports, and Ngnx'd them to operate off different subdomains, could they use the same redis instance to retain user profiles across the separate boards?

  • Since everything is stored in Redis, you'd simply have a single NodeBB that can be accessed off of different subdomains. The fact that they're running separate NodeBB processes doesn't change the fact that the data is still one instance 🙂

  • @julian True, I hadnt considered that. If there were a way to have individual categories for each instance, this could address the want for sub-categories; albeit in a quite sloppy manner.

  • @Ted I was thinking about that yesterday. It would be really messy though and would need a lot of work.

    Basically you have your db that contains all your sub categories. You create x number of nodebb instances, each instance would be one category, then using the permissions in the ACP, give access only to the subcategories you want for that subdomain(category). Then on your main nodebb site, you would just create external links to each subdomained forum containing the subcategories.

    The issues that I can see straight away is that you would need to log in for each subdomain you visited, unless you can manipulate this to log you in to all your nodebb instances. Changing between nodebb instances would connect to a new socket, which would make initial page load slow, as it's a call to a new site technically. And you would have to re-route the breadcrumbs so that Home became (Category Name), then a new Home made before that which took you to the other site. See screenshot at the end.. I'm sure there's other issues you'd run into with this too. Like each instance would need it's own theme, and it's own plugins. Unless rather than running a full instance of nodebb, you could just duplicate a couple of files like config.json and app.js etc, @julian will confirm if that's even possible, which would allow you to use the same node_modules folder, and the same theme etc, sort of like a wordpress multi site.


    Having thought about this more, I'm not sure that would be possible, it depends entirely on where the permissions are saved, if you give a user access to a sub category on NodeBB instance 2, but not in NodeBB instance 1. If it saves to the DB, it will just use whichever permission was set last.

  • Seems like we're all on the same page of potentially possible - but a bad idea; just as anticipated.

Suggested Topics