Skip to content
Lovelace

Environment Variables

The local Lattice daemon reads its configuration from CLI flags, then environment variables, then the config file at ~/.lovelace/lattice/config.toml, then built-in defaults — highest priority first. Environment variables are the right place for values that change per machine or per shell, and for secrets you do not want in a version-controlled config file.

This page is the reference for the LATTICE_* variables. For the config-file format and precedence, see Configuration.

Provider and model selection#

VariablePurposeDefault
LATTICE_PROVIDEROverride the default provider (ollama, anthropic, …).Config file's default_provider
LATTICE_MODELOverride the default model for the selected provider.Config file's default_model
LATTICE_CONFIG_PATHPath to the TOML config file to load.~/.lovelace/lattice/config.toml

Local provider endpoints#

These point the daemon at a locally running model server. They are exactly the overrides you need when a personal runtime's LM Studio server is not on its default host or port. LATTICE_LMSTUDIO_BASE_URL is also the endpoint the daemon probes for local-first election and the one lattice-ctl voice setup and voice doctor check.

VariablePurposeDefault
LATTICE_LMSTUDIO_BASE_URLBase URL of the LM Studio OpenAI-compatible server.http://localhost:1234/v1
LATTICE_OLLAMA_BASE_URLBase URL of the Ollama server (deprecated; used only when orchestrator.default_provider is "ollama").http://localhost:11434
bash
# Point the daemon at an LM Studio server on a non-default port
export LATTICE_LMSTUDIO_BASE_URL="http://localhost:4321/v1"
lattice-ctl daemon start

Runtime paths#

VariablePurposeDefault
LATTICE_SOCKETUnix socket the daemon listens on for local IPC.A path under ~/.lovelace/lattice/
LATTICE_PID_PATHFile the daemon writes its process ID to.A path under ~/.lovelace/lattice/

Override these only when running more than one isolated daemon instance on the same machine.

Serving mode#

A freshly started daemon does not serve external compute until a serving mode is enabled. These toggles opt the daemon into serving; for a paired personal runtime, lattice-ctl relay connect sets the relay variables for you (see below).

VariablePurpose
LATTICE_ENABLE_SIDECARServe gateway-routed compute through the local sidecar.
LATTICE_ENABLE_RELAYServe personal-runtime work through the outbound relay.
LATTICE_ENABLE_COMPUTE_HTTPSet to 1 to also serve the compute-provider routes (/v1/catalog, /v1/execute) on the local API port.

Local OpenAI-compatible API#

The daemon serves an OpenAI-compatible API for local models at http://127.0.0.1:11435/v1 by default. See Local OpenAI-compatible API.

VariablePurposeDefault
LATTICE_LOCAL_API_ENABLEDSet to false to turn the local API off.true
LATTICE_LOCAL_API_PORTLoopback port of the local API.11435
LATTICE_LOCAL_API_ALLOWED_ORIGINSExtra browser origins, comma-separated, allowed to call it.None

Relay and pairing (managed by the CLI)#

When you run lattice-ctl relay connect, the CLI redeems the bootstrap token and writes the relay configuration the daemon needs — you normally do not set these by hand. They are listed here for debugging a paired runtime.

VariablePurpose
LATTICE_RELAY_BASE_URLRelay endpoint the daemon polls outbound.
LATTICE_RELAY_LATTICE_IDThe lat_... id of this runtime.
LATTICE_RELAY_ACCOUNT_IDThe account that owns this runtime.
LATTICE_RELAY_AUTH_TOKENThe daemon's relay authentication token.
LATTICE_RELAY_DISPLAY_NAMEHuman-readable runtime name.
LATTICE_RELAY_EXECUTION_BACKENDWhich backend the daemon executes work with.
LATTICE_GATEWAY_URLLattice Cloud gateway base URL.

For the full pairing flow, see Personal runtimes. For advanced tuning, see Advanced configuration.