Self-hosting the Members Portal
  • 29 Oct 2021
  • 2 Minutes to read
  • Comment

Self-hosting the Members Portal

  • Comment

You can customise your Nexudus portal in more detail by accessing the code used in the different pages.

Use this method when you need to host the members portal on your own infrastructure. For example:

  • You need to do a complete rewrite of all pages to apply radically different styles and layouts.

  • You want to use all or part of the portal features within your own marketing site or other platform features.


There are a few areas you may want to pay special attention when self-hosting the members portal:


Users can leave your Members Portal to complete an action on other system and then come back to your portal. A common example is off-site payment methods such as Stripe Direct Debit, GoCardless or even hosted payment page. 

When user go back to your portal and you host the portal, you should always make the required request to our servers to complete that action for the user. For example, if you receive a request to you should proxy that call to to complete the user action.

HomeUrl vs NativeHomeUrl

The business object in your portal's code has predefined variables to quickly obtain the domain for a given location (business). These are HomeUrl and NativeHomeUrl. When you are not self-hosting, those two variables point to Nexudus hosted servers but this is not the case when self-hosting. In this case, HomeUrl will return the domain pointing to your servers while NativeHomeUrl will always point to our servers. This can be useful if you want to make sure you always generate URLs pointing to us. 

For example, when constructing the URL for an image.


How is it built?

The Nexudus portal is build using ReactJS on top of NextJS. It uses MobX as state management. 

Downloading and running from source code

You can download the most recent version of the portal using GIT. You will need a version Node greater than 10.19.0 and Yarn.

You will need to ask to access the repository and agree to its LICENSE.txt

Once you have downloaded the code, you will need to edit the configuration file to make sure the code uses your Nexudus account. In the example below xyz is the subdomain of a Nexudus account. You can find yours in Settings > Website.


Replace the env/config.js file with the code below, replacing xyz with your own Nexudus account domain.

module.exports = {
 apiRoot: '',

Next, install all dependencies running yarn. This can take some time.


You will also need to install  i18next-parser to produce the translation files during the build process.

yarn global add i18next-parser

Once yarn has finished installing all packages, you can run the project using:

yarn run dev

If you want to create a release version to be published in the .next folder, run:

yarn run build


Was this article helpful?