What is This?
AesirX First-Party Server is your own server for storing 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 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 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.envNote:
If the First-Party Server is shared with AesirX CMP:
- Uncomment / enable
FIRST_PARTY_CMP=true
If the First-Party Server is shared with
- Add the Analytics license key to the
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.



