Get License Key and Add Domain
License validation requires the domain to be registered with the license.
Therefore, you must add your domain to the license before the solution can be used on your website. This ensures the license is properly validated and activated for that domain.
If You Do NOT Have an Account
-
Go to the AesirX Sign-Up page and register for a new account.
-
Choose the Solution you want to use.
-
Enter the Domain where the solution will be used.
-
Complete the registration process.

-
After registration:
-
You will receive a License Key.
-
You will also receive a confirmation email to finalize your account setup.
-
If You Already Have an Account
-
Log in to: https://aesirx.io/licenses
-
On the Licenses page, you will see your SSO credentials at the top:
-
SSO Client ID
-
SSO Client Secret
-
-
Scroll down to the Solution Block you want to use (for example: AesirX Consent Management Platform).
-
Click Manage License for the solution you want to use, or click Register License if you don't have a license yet.

-
On the license management page, you will see a list of your licenses. Each license contains:
-
License Key
-
Domains
-
Plan
-
License status
-
-
Add a domain to the license by clicking Add more domains, then enter the domain where the solution will run.

-
After adding the domain, the license will be validated and the solution can run on that domain.
Step 1: Setup First-Party Server
What is This?
AesirX First-Party Server is your own server for storing consent data from your websites, powered by AesirX Consent Management Platform
Technically, you will need Docker Compose to run the AesirX First-Party Server Docker image, which stores your website consent data in a MongoDB server (included in the Docker Compose file).
Technical Requirements:
- Docker
- Docker Compose. Setup instructions
Optional Technical Requirements:
You can specify your own MongoDB server for storing consent data. MongoDB 6.x is required.
Instructions for Setting Up:
1. Pull the Source Code
Clone the source code from the AesirX GitHub repository:
git clone https://github.com/aesirxio/analytics-1stparty.git2. Clone and Customize the aesirx-1stparty.env File
Clone the aesirx-1stparty.env.dist file into aesirx-1stparty.env and customize it as needed:
cp aesirx-1stparty.env.dist aesirx-1stparty.envUncomment / enable FIRST_PARTY_CMP=true
Note: If the First-Party Server is not shared with AesirX Analytics
- Remove
LICENSEfrom the aesirx-1stparty.env file
Customization options:
If you have a separate MongoDB server, specify the credentials using these variables:
- DBUSER
- DBPASS
- DBHOST
- DBPORT
- DBNAME
You can also change the HTTP_PORT variable (default is 80). Note that this is the port inside the container, and it is generally recommended not to change it.
Add the admin SoP IDs after the variable and separate them with commas, for example: ADMIN_SOP="@admin_1,@admin_2,...".
3. Clone and Customize the .env File
Clone the .env.dist file into .env and customize it as needed:
cp .env.dist .envYou can customize your ports:
- HTTP_PORT: published port of the server. If you want your server to listen to a different port, this is the configuration that you need to change.
- MONGO_PORT: published port for MongoDB
You can customize your DB settings (they need to be the same as in the aesirx-1stparty.env file).
- MONGO_INITDB_ROOT_USERNAME
- MONGO_INITDB_ROOT_PASSWORD
- MONGO_INITDB_DATABASE
4. Run
After configuring the files, execute the following command to run the setup, including the MongoDB server:
docker-compose up -dThis will start the server in detached mode, and your AesirX First-Party Server will be ready to store consent data.
Step 2: Setup CMP Admin
1. Install CMP admin:
git clone https://github.com/aesirxio/cmp-admin2. Update env
At aesirx-cmp-admin folder rename the .env.dist file to .env and replace the placeholder keys with your own keys.
- REACT_APP_BI_ENDPOINT_URL=[Replace with URL of First-Party Server in step previous step]
- REACT_APP_ENDPOINT_ANALYTICS_URL=[Replace with URL of First-Party Server in previous step]
- REACT_APP_DATA_STREAM=[{"name": "Domain name", "domain": "example.com"},{"name": "Domain name 2", "domain": "example2.com"}]
- REACT_APP_SSO_CLIENT_ID=[Replace with the provided SSO_CLIENT_ID]
- REACT_APP_SSO_CLIENT_SECRET=[Replace with the provided SSO_CLIENT_SECRET]
3. Install & build dependencies:
At cmp-admin folder:
- Get all submodule source code required for the project.
git submodule update --init --recursive- Install the dependencies.
yarn install- Build the dependencies.
yarn prepare4. Run App
- Run on webserver
- Build app
yarn build- Upload packages/aesirx-cmp-admin/build folder to webserver
- Dockerize
docker compose -f "docker-compose.yml" up -d --buildStep 3: Install Standalone CMP
Usage in SSR sites
- Download consent.js from https://github.com/aesirxio/consent/releases/latest
- Copy consent.js into your project.
- Add the following scripts inside the tag:
<script>
window.aesirx1stparty = "https://example.com"
</script>
<script src="YOUR_PROJECT_PATH/translations/en.js"></script>
<script async defer src="YOUR_PROJECT_PATH/consent-loader.global.js"></script>
<script id="aesirx-consent-loader-js-before">
window.aesirxConsentConfig = {
uiEntry: "YOUR_PROJECT_PATH/consent-simple-chunks/consent-simple.js"
};
</script>- https://example.com is the URL of your installed First-Party Server in step 1.
Usage in React
Install aesirx-consent package
yarn add aesirx-consentAdd the environment variables to your .env file:
REACT_APP_ENDPOINT_ANALYTICS_URL=https://example.com
(https://example.com is the link to your 1st party server)With react-router-dom v5
Create a ConsentContainer component:
import React from "react";
import { ConsentReact } from "aesirx-consent";
const ConsentContainer = ({ children }) => {
return <ConsentReact>{children}</ConsentReact>;
};
export default ConsentContainer;Wrap your component with ConsentContainer
<ConsentContainer>
<YourComponent />
</ConsentContainer>Usage in Nextjs
Install aesirx-consent package
yarn add aesirx-consentAdd the environment variables to your .env file:
NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL=https://example.com
(https://example.com is the link to your 1st party server)With next/router
Add this in _app.js:
import { ConsentNext } from "aesirx-consent";
function MyApp({ Component, pageProps }) {
return (
<ConsentNext>
<Component {...pageProps} />
</ConsentNext>
);
export default MyApp;See full setup details in the
Now that your CMP is installed and configured, you can start adding vendor integrations.



