Skip to main content

1. Clone the Workspace

Clone or fork the Litlyx repository from GitHub to your local machine. Open the file docker-compose.yaml.

2. Update MongoDB Credentials

In the mongo service, update the following fields with your preferred username and password:
  MONGO_INITDB_ROOT_USERNAME: root        # change this
  MONGO_INITDB_ROOT_PASSWORD: mongo_pass  # change this
Update the MongoDB connection string in both producer and consumer services:
  MONGO_CONNECTION_STRING=mongodb://root:mongo_pass@mongo:27017/Litlyx?authSource=admin
Update the same value in the dashboard service:
  NUXT_MONGO_CONNECTION_STRING=mongodb://root:mongo_pass@mongo:27017/Litlyx?authSource=admin

3. Update Redis Credentials

In the redis service, change the following fields:
  command: ["redis-server", "--requirepass", "redis_pass"]
  REDIS_PASSWORD: redis_pass
These values must match exactly.
Note: REDIS_USERNAME must remain the default one.
Update Redis credentials in producer and consumer:
  REDIS_PASSWORD: redis_pass
Update Redis credentials in dashboard:
  NUXT_REDIS_PASSWORD=redis_pass

4. Set the Authentication JWT Secret

In the dashboard service, set your session secret:
  NUXT_SESSION_PASSWORD=jwt_secret_here
This is required to keep your Nuxt instance secure.

5. Update Admin Credentials

Litlyx includes symbolic default admin credentials.
Replace them to keep your instance secure.
  NUXT_ADMIN_EMAIL=your_admin_email
  NUXT_ADMIN_PASSWORD=your_admin_password

6. Start the Docker Containers

Prepare your docker images by running this command:
npm run docker-prepare
Than run this command to start the containers:
docker-compose up
Docker will automatically download and start all Litlyx services from Docker Hub.
Litlyx depends on ts-node… so make sure you’ve that installed in your instance. Run npm install ts-node.

6.a Forward Data with a Script Tag

To forward data from your website to your instance, configure the script with:
  • data-host
  • data-port
  • data-securetrue for HTTPS, false for HTTP
Open the following ports:
  • 3000 for the dashboard
  • 3001 for incoming events
<script 
  defer
  data-workspace="workspace_id"
  data-host="your-host"
  data-port="your-producer-port"
  data-secure="false"
  src="https://cdn.jsdelivr.net/npm/litlyx-js@latest/browser/litlyx.js">
</script>
The Producer service collects events and queues them for storage. Default port: 3001, but customizable.

6.b Forward Data Using NPM

If using NPM:
Lit.init("workspace_id", {
  server: {
    host: "your-host",
    port: 3001,
    secure: true
  }
})
The Producer service queues data before storage. Default port: 3001.

7. Enable AI Features (Optional)

To enable Reports and AI Chat in the dashboard, set these fields:
  NUXT_PUBLIC_AI_ENABLED=true
  NUXT_AI_ORG=your_openai_org_id
  NUXT_AI_PROJECT=your_openai_project_id
  NUXT_AI_KEY=your_openai_api_key
These values are available in your OpenAI admin console.

8. Now is your turn.

Now you are up to go. You can use your own instance of Litlyx. Track analytics, easy way. Hero Light