- 28 Jun 2022
- 1 Minute to read
- DarkLight
Self-hosting the User Portal
- Updated on 28 Jun 2022
- 1 Minute to read
- DarkLight
We usually recommend you customize your User Portal using the code available in our built-in files, custom pages or by replacing and adding components.
You can also choose to host the User Portal through your own infrastructure. Self-hosting is a suitable option if you want to:
- Completely rewrite all pages of the User Portal and apply radically different styles and layouts.
- Use all or some of the portal features within your own marketing site or other platform features.
How the User Portal is Built
The User Portal is build using ReactJS on top of NextJS. It uses MobX as state management.
What You Need to Self-host
Node & Yarn
You need to install Node (greater than 10.19.0) and Yarn.
Your User Portal Default Subdomain
You'll also need your User Portal default domain. You can find this domain via Settings > Website on the Admin Panel.
In the example above, demo is the default subdomain. Keep this default subdomain handy.
Request Access to the Source Code
You can download the most recent version of the portal using GIT.
You'll need to accept the terms of the source code licence available below and then reach out to source@nexudus.com for us to provide access to the repository.
Editing the Configuration File
Once you have downloaded the source code, you need to edit the configuration file to make sure the code uses your Nexudus account.
Replace env/config.js with the snippet below, making sure you replace demo with your portal's default subdomain.
module.exports = {
apiRoot: 'https://demo.spaces.nexudus.com',
platformRoot:'https://spaces.nexudus.com',
};
Next, install all dependencies running yarn. This can take some time.
yarn
You should also install i18next-parser to produce the translation files during the build process.
yarn global add i18next-parser
Once yarn installed all packages, you can run the project:
yarn run dev
If you want to create a release version to publish in the .next folder, run:
yarn run build