Configuration
Configure a Lenso host, module sources, Runtime Console paths, telemetry, and module-local values.
Generated hosts read normal environment variables. Keep configuration boring:
host process config in env, operator-editable runtime config in the runtime
config system, and module-local boot config under LENSO_MODULE_*.
Required production choice
Outside local development, set the linked composition profile explicitly:
APP_ENV=production
LENSO_COMPOSITION_PROFILE=core
Use core for product hosts that opt into modules intentionally. Use demo
only when you want the demo linked modules enabled.
Local development defaults to demo when APP_ENV is local, dev,
development, or test.
Common host variables
| Variable | Purpose |
|---|---|
APP_ENV |
environment name; production-like values require explicit composition profile |
SERVICE_NAME |
service label used by the host |
DATABASE_URL |
Postgres connection string |
DATABASE_MAX_CONNECTIONS |
database pool size |
HTTP_HOST |
API bind host, default 127.0.0.1 |
HTTP_PORT |
API port, default 3000 |
CORS_ALLOWED_ORIGINS |
comma-separated Runtime Console dev origins |
RUST_LOG |
log level/filter |
LOG_FORMAT |
compact or json |
OTEL_EXPORTER_OTLP_ENDPOINT |
optional OpenTelemetry collector endpoint |
For health probes, structured logs, and Runtime Console runtime views, read Observability.
For the difference between core, demo, app-owned HostBuilder Modules,
and Service installations, read Host Composition.
Local dev auth refuses public HTTP binds by default. If you really need a local
host on 0.0.0.0, make that risk explicit:
HTTP_HOST=0.0.0.0
LENSO_ALLOW_DEV_AUTH_ON_PUBLIC_BIND=true
Lenso Console configuration
Lenso Console is configured in its own installation and Service environment;
business Hosts no longer serve copied Console assets or set
LENSO_CONSOLE_DIST_DIR, LENSO_CONSOLE_EXTENSIONS_DIR, or
LENSO_CONSOLE_BASE. Use lenso console doctor to inspect an installation and
lenso console upgrade to apply a reviewed Console Service Release.
Service installations
Independently running code is a Service. Install its Service manifest through
the CLI so the Host records SERVICE_MODULES, installation receipts, and
lifecycle state together:
lenso service install https://billing.example.com/lenso/service/v1/manifest
Do not hand-edit provider entries as a deployment mechanism. Service identity, credentials, health, and rollout evidence belong to the Service installation and System Plane contracts. The Host never forwards caller bearer tokens or cookies to a provider.
Module-local config
Module-local config is boot-time config for module code:
LENSO_MODULE_AUTH_PASSWORD__JWT_ISSUER=acme
LENSO_MODULE_AUTH_PASSWORD__JWT_TTL_HOURS=12
LENSO_MODULE_SUPPORT__DEFAULT_ASSIGNEE=usr_1
Names are normalized:
AUTH_PASSWORDbecomes moduleauth-passwordJWT_TTL_HOURSbecomes keyjwt_ttl_hours- JSON-looking values are parsed as JSON
- other values are strings
Module load toggles are separate:
LENSO_MODULE_SUPPORT_ENABLED=false
Use module-local config for values module code needs at boot. Use runtime config descriptors for values operators should edit through Runtime Console.
Redis
Lenso does not require Redis by default. The first-party auth module uses Redis
only when the auth dependency is built with the Redis feature and runtime config
sets auth.session_cache=redis.
Generated hosts can apply the install profile:
lenso module install auth --profile redis-session-cache
That profile writes REDIS_URL, enables the auth Redis feature, and records the
runtime default auth.session_cache=redis. You still need to provide the Redis
service yourself.