Helion

Get started with self-hosting

Deploy Helion on your own server in under five minutes using the automated setup script.

Prerequisites

  • A VPS or dedicated server running a modern Linux distribution (Ubuntu 24.04 recommended)
  • At minimum 2 GB RAM; 4 GB or more is recommended for production workloads
  • Docker and Node.js (the setup script installs them automatically if not present)

Helion has been validated on Ubuntu 24.04. The setup script is designed to work on most Debian-based distributions. If you already have Docker, Node.js, and pnpm installed, the setup step completes immediately.

A hosted option is available at helionlabs.dev if you prefer managed infrastructure.

Quickstart

git clone -b self-hosting https://github.com/Shrotriya-lalit/helionlabs && cd helionlabs/self-hosting && ./setup
# After setup is complete, run `./start` to launch all Helion services

Clone the repository

Clone the self-hosting branch to your server:

git clone -b self-hosting https://github.com/Shrotriya-lalit/helionlabs.git

Run the setup script

Navigate to the self-hosting directory and execute the setup script. The script will:

  1. Install Node.js (if not present and you consent)
  2. Install Docker (if not present and you consent)
  3. Run an interactive configuration wizard that sets all required environment variables

Setup typically completes in 30 seconds to 2 minutes depending on server speed and network conditions.

cd helionlabs/self-hosting
./setup

If ./setup fails to execute, ensure it is marked executable (chmod +x setup) or run the configuration wizard manually:

  1. Install Docker
  2. Install Node.js and npm
  3. Run npm run quiz from inside the self-hosting directory

Start Helion

Once the wizard completes, start all services:

./start

Configuration

Always use the correct API URL

When self-hosting, you must supply your own API URL when initializing the SDK. Set apiUrl to https://<your-domain>/api.

index.html
<script>
  window.hl=window.hl||function(){var n=[];return new Proxy(function(){arguments.length&&n.push([].slice.call(arguments))},{get:function(t,r){return"q"===r?n:function(){n.push([r].concat([].slice.call(arguments)))}} ,has:function(t,r){return"q"===r}}) }();
  window.hl('init', {
    apiUrl: 'https://your-domain.com/api', 
    clientId: 'YOUR_CLIENT_ID',
    trackScreenViews: true,
    trackOutgoingLinks: true,
    trackAttributes: true,
  });
</script>
<script src="https://helionlabs.dev/hl1.js" defer async></script>
helion.ts
import { Helion } from '@helionlabs/sdk';

const hl = new Helion({
  apiUrl: 'https://your-domain.com/api', 
  clientId: 'YOUR_CLIENT_ID',
  trackScreenViews: true,
  trackOutgoingLinks: true,
  trackAttributes: true,
});

Email

Password resets and invitations require a configured email provider. Helion supports Resend and standard SMTP.

Email configuration is optional for the initial setup but required for invitation and password reset workflows.

Features that require email:

  • Password reset
  • Team invitations

Option A — Resend

Create an account at resend.com, verify your sender domain, and configure the following in your .env file:

.env
RESEND_API_KEY=re_xxxxxxxxxxxxx
EMAIL_SENDER=noreply@yourdomain.com

Option B — SMTP

To use a custom SMTP server, set SMTP_HOST and Helion will route email through it instead of Resend.

.env
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=smtp-user@example.com
SMTP_PASS=your-smtp-password
EMAIL_SENDER=noreply@yourdomain.com

SMTP_HOST takes precedence over RESEND_API_KEY when both are configured. If neither is set, outgoing emails are written to the console instead of being sent.

For a complete email configuration reference, see the Environment Variables documentation.

AI integration

Helion includes an AI-powered analytics assistant for data analysis, report generation, and natural-language queries. It supports OpenAI and Anthropic models simultaneously — configure one or both, and the model picker will only surface models whose provider key is present.

Supported models

  • OpenAIGPT-4.1, GPT-4.1 mini
  • AnthropicClaude Haiku 4.5, Claude Sonnet 4.6, Claude Opus 4.8

Configuration

Add one or both API keys to your .env file and restart the API service:

.env
# OpenAI — obtain at platform.openai.com/api-keys
OPENAI_API_KEY=sk-your-openai-api-key-here

# Anthropic — obtain at console.anthropic.com
ANTHROPIC_API_KEY=sk-ant-your-anthropic-api-key-here

The AI assistant is entirely optional. Without either key configured, the chat interface remains accessible but prompts you to add a provider key. All other Helion functionality operates normally.

AI usage is billed by your provider based on token consumption and the model selected. Monitor usage through your provider's dashboard to avoid unexpected charges.

For complete AI configuration options, see the Environment Variables documentation.

Managed Redis

If you use a managed Redis service (e.g., Upstash, Redis Cloud), you may need to enable keyspace notifications manually:

redis-cli CONFIG SET notify-keyspace-events Ex

Helion uses expired-key events to track currently active visitors. Without this setting, the real-time visitor count will not function. A warning will appear in the API logs if this configuration is missing.

Registration and invitations

By default, registration is disabled after the first user account is created. To allow open registration:

.env
ALLOW_REGISTRATION=true

Invitations are enabled by default. To disable them:

.env
ALLOW_INVITATION=false

For a complete reference of all environment variables, see the Environment Variables documentation.

Utility scripts

All scripts must be run from within the self-hosting directory. Ensure they are executable (chmod +x <script-name> if needed).

Basic operations

./start    # Start all Helion services
./stop     # Stop all Helion services
./logs     # Stream real-time logs from all services

Maintenance

./rebuild <service-name>    # Rebuild and restart a specific service
                            # Example: ./rebuild hl-dashboard

Troubleshooting

./danger_wipe_everything    # Remove all containers, volumes, and data

danger_wipe_everything permanently deletes all Helion data including databases, configurations, and cached files. This action is irreversible. Use only when starting fresh.

Updating

To update to the latest Helion release, run the update script from the self-hosting directory:

./update

If the ./update script is not present, run git pull and then ./update. Also review the changelog for any manual migration steps required by the new release.

On this page