Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
# Environment template. Copy it to the ignored root .env; it starts every
# service with every feature that needs no personal key turned on.
# Two sections: Required, then Optional grouped by feature. Each entry holds the
# value `pnpm dev` uses, which equals scripts/local-defaults.env or the built-in
# code default; an empty value turns its feature off. Entries derived from
# another one, or set only to move a listener, stay commented out or are named
# in prose. Images and deployments do
# not read this file: they set their own environment. Every variable runtime
# code reads must appear here or in scripts/env-inventory.json (checked by
# `pnpm env:inventory:check`). Rate limits, dispatch/retry/timeout budgets and
# optional tools use their code defaults.
# ============================================================================
# Required
# ============================================================================
# --- Deployment basics --------------------------------------------------------
# PostgreSQL 17 with pgvector of TeamHub. `pnpm dev` uses the database you run;
# the default matches the postgres service of the root docker-compose.yml.
TEAMHUB_DATABASE_URL=postgres://simplexai:simplexai@localhost:5432/simplexai_dev?sslmode=disable
# Origin users open in the browser; Local Computer installers and links use it.
WEB_PUBLIC_ORIGIN=http://localhost:3000
# At least 32 characters; every service derives the credential of each call
# direction from it with HKDF-SHA256: TeamHub to Node Services, Node Services
# to TeamHub, and Voice Runtime to TeamHub. No override exists. This public
# development seed works only with a loopback WEB_PUBLIC_ORIGIN; in production
# generate one (`openssl rand -base64 32`) and keep it in a Secret.
LINGER_SECRET_SEED=local-development-secret-seed-not-for-production
# The Runner Gateway URL handed to Local Computers. Without it no Computer can
# connect, so no Agent runs. A deployment sets its public wss:// address.
AGENT_RUNNER_PUBLIC_GATEWAY_URL=ws://127.0.0.1:4319/v1/runner-gateway
# ============================================================================
# Optional
# ============================================================================
# --- Local development owner -----------------------------------------------
# Owner email used by pnpm dev and the native source account CLI.
# The native CLI reads its password only from standard input.
# [email protected]
# --- Addresses and network --------------------------------------------------
# Where each service is reached, one URL per service: TeamHub 8080; Node
# Services 4319, where the Agent Service, Memory and LLM Wiki share one listener;
# Document Runtime 4321. Every caller of a service reads its one URL (TeamHub,
# Node Services, Web proxies and Voice Runtime alike), with the credential
# derived from LINGER_SECRET_SEED. Split deployments set their own.
TEAMHUB_BASE_URL=http://127.0.0.1:8080
TEAMHUB_NODE_SERVICES_URL=http://127.0.0.1:4319
TEAMHUB_DOCUMENT_RUNTIME_URL=http://127.0.0.1:4321
# Comma-separated proxy CIDRs whose X-Forwarded-For TeamHub trusts. Locally
# that is the Vite proxy on loopback; behind a reverse proxy, set its CIDR.
TEAMHUB_TRUSTED_PROXIES=127.0.0.1/32,::1/128
# Each process listens on loopback at its port above (TEAMHUB_HTTP_ADDRESS,
# NODE_SERVICES_HTTP_ADDRESS, DOCUMENT_RUNTIME_HTTP_ADDRESS as host:port);
# images and Compose listen on every interface. Set a listener only to move it,
# together with the URL above.
# Origin that serves Document previews to the browser; TeamHub itself
# (http://localhost:8080) unless a deployment names a separate origin.
# Docker Compose defaults this to WEB_PUBLIC_ORIGIN via the Web proxy.
# TEAMHUB_DOCUMENT_PREVIEW_PUBLIC_ORIGIN=https://preview.example.com
# --- Agent and Local Computer -----------------------------------------------
# Agent state and log root; a relative path resolves from the repository root.
# Without it the root is ~/.mirror.
AGENT_HOME=.linger-runtime/agent
# Runtime tool permission judge on the sponsor's Agent Runtime (true or false).
# Off, Runtime calls run as their own rules allow; on, every reviewed call
# waits for the judge and a call the judge cannot answer does not run.
TEAMHUB_PERMISSION_REVIEW=false
# TeamHub origin the Local Computer CLI calls when TEAMHUB_BASE_URL is not
# reachable from the Computer (a cluster-internal name). `pnpm stack:up` sets it
# to WEB_PUBLIC_ORIGIN, whose Web host forwards the CLI's /api/agent/ to TeamHub.
# TEAMHUB_CLI_BASE_URL=https://teamhub.example.com
# Computer release the Agent Service serves on /install/. Images
# ship it at /app/computer-release; `make computer-release-local` builds this one.
COMPUTER_RELEASE_DIR=.linger-runtime/computer-release
# Source Docker: Linger sets the host target; direct Compose defaults to the
# container platform. Left commented because the right value depends on the host.
# COMPUTER_RELEASE_TARGETS=linux-x64
# --- Memory and personal Wiki -----------------------------------------------
# Memory, Pocket Notes and the Wiki turn days over at midnight in the process
# time zone, which defaults to the host's (UTC in Compose containers). Left
# commented so the host zone applies.
# TZ=America/New_York
# --- TeamHub external apps and sources --------------------------------------
# Personal key. Composio Managed Auth turns on connected apps such as Gmail and
# GitHub (imports and their MCP tools); TeamHub finds or creates each app's
# managed auth config. The scoped project key needs connected-account
# link/read, auth-config read/create, proxy-execute, and tool
# catalog/read/execute access. Empty: people can save the key in Apps.
COMPOSIO_API_KEY=
# Encrypts the Composio key saved in Apps (32 bytes, standard base64). This is
# the public `pnpm dev` key; production generates its own
# (`openssl rand -base64 32`). Empty disables saving keys in the product.
TEAMHUB_SECRET_ENCRYPTION_KEY=iKtGNQf7Faous8Jl1FN9TBuJPyeLcA7Cml4Kf0ZDaJE=
# Prefixes Composio user IDs; change it when deployments share a Composio project.
TEAMHUB_COMPOSIO_ENVIRONMENT_KEY=default
# --- Storage ----------------------------------------------------------------
# Artifacts live under this local root (relative to apps/teamhub).
TEAMHUB_ARTIFACT_STORAGE_ROOT=.local/teamhub/artifacts
# --- Voice ------------------------------------------------------------------
# Voice keys are normally saved in the app; a key set here overrides it. The
# root docker-compose.yml runs LiveKit; `pnpm dev` runs livekit-server from
# PATH on the LIVEKIT_* below, with or without a voice key
# (scripts/dev-livekit.ts). node-services supervises
# the separate ASR, recorder and Live workers. Soniox enables recording,
# dictation and archive recovery; empty leaves them to a key saved in the
# app. Recordings go to
# the artifact store through TeamHub, which also needs ffmpeg and ffprobe on
# its PATH.
SONIOX_API_KEY=
# Enables Grok Live on its own; it does not need Soniox. With it set the Voice
# Mode button is Live; with only Soniox it dictates.
XAI_API_KEY=
# on|off: off tells TeamHub this deployment cannot run voice (no LiveKit).
TEAMHUB_VOICE_MEDIA=on
# Gateways that accept base64 PCM events require json; the direct provider
# uses binary microphone frames. The key must match the configured endpoint.
VOICE_RUNTIME_XAI_LIVE_WEBSOCKET_URL=wss://api.x.ai/v1/realtime
VOICE_RUNTIME_XAI_LIVE_AUDIO_TRANSPORT=binary
# The LiveKit server. These defaults match the LiveKit service of the root
# docker-compose.yml on its published port. TeamHub and Voice Runtime read
# these three; browsers dial LIVEKIT_URL. The LiveKit server takes the same key
# pair, so override both sides together; production uses its own pair.
LIVEKIT_URL=ws://127.0.0.1:17880
LIVEKIT_API_KEY=devkey
LIVEKIT_API_SECRET=devsecret-livekit-voice-local-only-32-bytes
# The root docker-compose.yml LiveKit serves this computer only. A host that
# serves browsers on other computers sets the address they reach it on,
# publishes the media ports (TCP 7881, UDP 7882) on every interface, and sets
# LIVEKIT_URL to the wss:// origin its reverse proxy forwards to port 17880.
# LIVEKIT_NODE_IP=203.0.113.10
# LIVEKIT_RTC_BIND_ADDRESS=0.0.0.0
# --- Local development ------------------------------------------------------
# `pnpm stack:up` host ports. They move only the published ports; the
# containers keep listening on the defaults. Left commented until a port clashes.
# POSTGRES_PORT=5432
# TEAMHUB_HTTP_PORT=8080
# WEB_HTTP_PORT=3000
# Host address the `pnpm stack:up` Web port binds. 0.0.0.0 serves other
# computers on the network; then set WEB_PUBLIC_ORIGIN and
# AGENT_RUNNER_PUBLIC_GATEWAY_URL to that address and LINGER_SECRET_SEED to a
# private seed. Web forwards every path browsers and Computers use.
# WEB_BIND_ADDRESS=127.0.0.1
# NODE_SERVICES_HTTP_PORT=4319
# DOCUMENT_RUNTIME_HTTP_PORT=4321
# A unique Compose project name per concurrent checkout, so two checkouts'
# `pnpm stack:up` stacks keep separate containers and volumes. Left commented:
# the directory name applies.
# COMPOSE_PROJECT_NAME=linger
# Images set production, which also prints Agent Service logs as JSON lines.
# Left commented: Vite reads this file, and a development NODE_ENV here would
# turn web production builds into development builds.
# NODE_ENV=development