Deployment guide

Litlyx

Overview

Litlyx is an open-source, privacy-first analytics platform: a cookie-free, self-hosted alternative to Google Analytics 4, PostHog and Mixpanel. It tracks page visits, unique visitors, referrers, devices and your own custom product events in real time, and shows them in a clean dashboard. It uses no cookies and does not profile individual visitors.

This image runs Litlyx 0.0.19 on Ubuntu 24.04 LTS. Litlyx self-hosts as a small set of services, orchestrated by Docker Compose and managed by systemd:

  • A lightweight producer service receives tracking events on an ingest endpoint and pushes them onto a Redis stream.
  • A consumer service reads that stream and writes visits and events into a local MongoDB database.
  • A Nuxt dashboard serves the analytics UI and API.

All of these run on the instance only. nginx on port 80 is the single public listener. It routes the tracking ingest paths to the producer and everything else to the dashboard. MongoDB and Redis are never exposed off the instance.

What you get:

  • Litlyx 0.0.19 self-host stack (producer, consumer, Nuxt dashboard) built from the pinned upstream source and run under Docker Compose via a litlyx.service systemd unit
  • The dashboard and tracking ingest on :80 (nginx routes /event, /visit, /keep_alive to the producer and everything else to the dashboard)
  • A per-VM admin account whose password is generated on first boot and recorded in a root-only file
  • Every application secret (MongoDB password, Redis password, session/JWT secret, admin password) generated fresh per VM on first boot, so no baked default survives into the image
  • MongoDB and Redis bound to the instance, with all analytics data on a dedicated Azure data disk at /var/lib/litlyx
  • An unauthenticated /healthz endpoint for Azure Load Balancer health probes
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.

Standard_B2s (2 vCPU / 4 GiB RAM) is a sensible starting size. Choose a larger size for busy sites.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp for the dashboard and the tracking script. Litlyx serves plain HTTP on port 80. For production, terminate TLS in front of it with your own domain, because browsers increasingly require HTTPS for pages that embed third-party scripts.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Litlyx by SecureAnyCloud, and select Create.

On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Review the dedicated data disk on the Disks tab, then select Review + create and Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:litlyx-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name litlyx \
  --image sac1647283583153:litlyx-ubuntu-24-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name litlyx --port 80 --priority 1010

Step 3 - Connect to your VM

ssh azureuser@<vm-public-ip>

On the first boot, litlyx-firstboot.service generates every per-VM secret, brings the Compose stack up and creates the admin account. On a fresh VM this takes a minute or two. Once it has finished, the commands below run without any further waiting.

Step 4 - Confirm the services are running

Litlyx runs as a Docker Compose stack behind nginx. Confirm that the systemd units are active and the five containers are up:

systemctl is-active docker nginx litlyx litlyx-firstboot
sudo docker compose -f /opt/litlyx/docker-compose.yml ps

Expected output:

active active active active SERVICE STATUS PORTS consumer Up 13 minutes dashboard Up 13 minutes 127.0.0.1:3000->3000/tcp mongo Up 13 minutes 27017/tcp producer Up 13 minutes 127.0.0.1:3001->3001/tcp redis Up 13 minutes 6379/tcp

Only the dashboard (3000) and the producer (3001) are published, and only to 127.0.0.1. MongoDB and Redis stay on the internal Compose network. nginx is the single public listener on :80.

Step 5 - Retrieve your admin password

On the first boot of every VM, litlyx-firstboot.service generates a unique administrator password, together with every other secret in the stack. It writes the admin email, password and dashboard URL into a root-only file. Read the file with:

sudo cat /root/litlyx-credentials.txt

Expected output (your password will differ):

# Litlyx self-host - generated on first boot by litlyx-firstboot.service
# These credentials are unique to this VM. Store them somewhere safe. LITLYX_URL=http://<vm-public-ip>/ LITLYX_ADMIN_EMAIL=admin@litlyx.local LITLYX_ADMIN_PASSWORD=<LITLYX_ADMIN_PASSWORD>

The upstream project ships fixed default credentials for its datastores, session secret and admin login. None of them survive into this image. Every one is regenerated on first boot, so no two instances share a secret and the upstream default never governs a running dashboard.

Step 6 - Confirm the stack and health endpoint

nginx serves an unauthenticated /healthz endpoint for load balancer probes. Confirm that it answers and the dashboard responds, then check the bundled MongoDB and Docker versions:

curl -sI http://127.0.0.1/healthz | head -1
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1/
sudo docker exec litlyx-mongo-1 mongod --version | head -1 sudo docker --version

Expected output:

HTTP/1.1 200 OK 200 db version v8.0.26 Docker version 29.6.2, build dfc4efb

Step 7 - Sign in to the dashboard

Browse to http://<vm-public-ip>/. Enter the admin email (admin@litlyx.local) and the password from Step 5.

Step 8 - Read the real-time dashboard

The Web Analytics view opens by default after you sign in. It summarises total visits, unique visitors, bounce rate and average visit duration across your project. A live trend chart shows views, visitors and events over your selected date range.

The view updates as traffic arrives, once you add the tracking script to your site.

Step 9 - Track custom events

Beyond page visits, Litlyx tracks your own custom events, such as a signup, a purchase or a download. Each event can carry optional structured metadata.

The Custom Events view ranks your most frequent events and charts them over time. You can measure the actions users take, not just the pages they see.

Step 10 - Add the tracking script to your site

Open Settings from the left navigation. Under General, find the project's Workspace id and a ready-made tracking Script tag. Copy the workspace id, then add the snippet to your own site. Point it at this instance so that events go to your self-hosted producer:

<script defer data-project="<your-workspace-id>" data-host="<vm-public-ip>" data-port="80" data-secure="false" src="https://cdn.jsdelivr.net/gh/litlyx/litlyx-js/browser/litlyx.js"></script>

Once the script is live, page visits appear on the dashboard in real time. To track a custom event from your own code, call Lit.event('signup'), optionally with a metadata object.

Litlyx sets no cookies and stores no personal data, so most jurisdictions do not require a cookie banner. Check your own compliance requirements before relying on this.

Step 11 - Confirm analytics data lives on the dedicated disk

All MongoDB and Redis data (every visit, event and session) and the built Litlyx images live under /var/lib/litlyx. This is the Docker data-root, relocated onto a dedicated Azure data disk that is captured into the image and re-provisioned on every VM. Confirm the mount:

df -h /var/lib/litlyx | tail -1 findmnt -no SOURCE,TARGET,FSTYPE /var/lib/litlyx
sudo docker info --format '{{.DockerRootDir}}'

Expected output:

/dev/sda 30G 213M 28G 1% /var/lib/litlyx /dev/sda /var/lib/litlyx ext4 /var/lib/litlyx/docker

The disk is mounted by UUID with nofail, so the mount survives Azure device-name reordering across reboots.

Maintenance

  • Back up your analytics data. Everything Litlyx stores lives in the MongoDB and Redis volumes under /var/lib/litlyx. Snapshot the data disk, or use mongodump/mongorestore against the mongo container for logical backups.
  • AI insights (optional). Litlyx can summarise your data with an LLM. This needs your own OpenAI key. Set NUXT_AI_KEY (and NUXT_PUBLIC_AI_ENABLED=true) in /opt/litlyx/.env and run sudo systemctl restart litlyx. No AI key is bundled, and the core analytics work fully without one.
  • Restart the stack. sudo systemctl restart litlyx brings the Compose stack down and back up. sudo docker compose -f /opt/litlyx/docker-compose.yml logs -f dashboard tails the dashboard logs.
  • Security updates. Unattended security upgrades are enabled, so the OS keeps itself patched. Reboot when a new kernel is installed.
  • TLS. For production, put Litlyx behind your own domain and a TLS-terminating reverse proxy or Azure Application Gateway. Set data-secure="true" in the tracking snippet, because most browsers restrict third-party script behaviour on plain HTTP pages.

Support

SecureAnyCloud provides 24/7/365 expert technical support for this image. Contact sales@secureanycloud.com. Litlyx is licensed under the Apache License 2.0. This image is provided by SecureAnyCloud; additional charges apply for build, maintenance and 24/7 support.

Deploy on Azure

Launch Litlyx on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure