Skip to main content

Documentation

Configuration

2 min readEdit on GitHub

All Lights Pi configuration is managed through environment variables in the .env file.

Environment Variables

Copy the example file to get started:

bash
cp .env.example .env

Required Variables

VariableDescriptionExample
PI_HOSTHostname or IP of your Pilights.local
PI_USERSSH usernamepi
WIFI1_SSIDPrimary WiFi network nameMyNetwork
WIFI1_PSKPrimary WiFi passwordsecret123

Optional Variables

VariableDescriptionDefault
PI_HOSTNAMEmDNS hostname set on the Pilights
QLC_PORTQLC+ web UI port9999
SSH_KEYPath to SSH private key
BACKUP_STORAGELocal backup directory./backups
WIFI2_SSIDSecondary WiFi network
WIFI2_PSKSecondary WiFi password
AI_PROVIDERAI backend: openai, anthropic, or ollamaopenai
AI_API_KEYAPI key for the chosen provider
AI_MODELModel name (e.g. gpt-4.1)gpt-4.1
AI_SCENE_STYLEDefault scene stylecomplete

MCP Server Variables (Optional)

Used by lighting-mcp.service when the MCP server is installed.

VariableDescriptionDefault
MCP_HOSTBind address for the MCP HTTP server0.0.0.0
MCP_PORTPort the MCP endpoint listens on5001
MCP_PATHStreamable HTTP mount path/mcp
CONTROL_URLWhere the MCP server reaches the Flask control serverhttp://localhost:5000
MCP_BEARER_TOKENReserved for bearer-token auth — scaffolded, not yet enforced
MCP_HTTP_TIMEOUTSeconds for upstream Flask calls30

Note: Use PI_HOSTNAME, not HOSTNAME — the latter is a macOS shell builtin.

QLC+ Configuration

QLC+ workspaces (.qxw files) define your fixture layout, scenes, and show sequences.

Deploying a Workspace

bash
./lightsctl.sh deploy-workspace my-show.qxw

Pulling the Current Workspace

bash
./lightsctl.sh pull-workspace

Network Configuration

Static IP

For production setups, assign a static IP:

bash
./lightsctl.sh static-ip 192.168.1.100/24 192.168.1.1

Dual WiFi

Configure a backup WiFi network by setting WIFI2_SSID and WIFI2_PSK in your .env file. The Pi will automatically fall back to the secondary network if the primary is unavailable.

Security Hardening

The harden command applies security best practices:

bash
./lightsctl.sh harden

This enables:

  • UFW firewall (allows SSH + QLC+ web UI). Additional ports are opened automatically when control-install and mcp-install run.
  • Hardware watchdog (auto-reboot on hang)
  • Unattended security upgrades
  • USB device permissions for ENTTEC

Was this page helpful?