Open source

Your Lenn, at home

Lenn’s code is open. Install the server in a few minutes, plug in your own AI providers, and keep your memories under your roof. Free, forever.

What you need

  • A server with Docker and Docker Compose: a small rented server, a computer at home, a recent NAS.
  • Memory: the compose file gives 1 GB to the web app and 4 GB to the worker that transcribes and understands your moments. Plan for about 6 GB. The optional audio service needs more; an NVIDIA GPU speeds it up.
  • An HTTPS address, for example lenn.yourdomain.com, behind a reverse proxy. A Caddy example is included.
  • Your keys at the AI providers, or nothing at all to start: demo mode works without any key.

Install in five steps

  1. Get the code

    Clone the repository on your server.

    Terminal
    git clone https://github.com/Synapsr/lenn.git && cd lenn
    
  2. Fill in three values

    Copy the example file, then set LENN_PUBLIC_URL (your server’s public address), LENN_AUTH_SECRET and POSTGRES_PASSWORD. Never change the secret afterwards: your saved keys and devices depend on it.

    Terminal
    cp deploy/.env.example deploy/.env
    openssl rand -base64 48    # LENN_AUTH_SECRET
    openssl rand -hex 24       # POSTGRES_PASSWORD
    
  3. Start Lenn

    One command starts PostgreSQL, applies the migrations, then runs the web app and the worker. The app listens on 127.0.0.1:3210, never directly on the internet.

    Terminal
    docker compose -f deploy/compose.yaml up -d --build
    
  4. Put it behind HTTPS

    Place a reverse proxy in front of Lenn. With Caddy, the certificate is automatic. Add LENN_TRUST_PROXY=true to deploy/.env. See the full example.

    Caddyfile
    lenn.example.org {
      reverse_proxy 127.0.0.1:3210 {
        flush_interval -1
      }
    }
    
  5. Open the assistant

    Open your address in a browser. The first visit creates the admin account, then the assistant helps you paste your keys and test them with one button. They are encrypted in the database; environment variables always take precedence.

Your keys, and what they do

Lenn only shows what is really configured on your server: without an OpenAI key, for example, there is no voice conversation button. You pay each provider directly, at their prices.

Keys to paste into the setup assistant
ProviderWhat it does for LennNeeded?
GroqTranscription: Whisper large v3 turbo, word by word with timestamps.Recommended
AnthropicThe companion and the understanding of moments (Claude): the gist, promises, people, answers.Recommended
OpenAISpoken conversation (GPT-Live) and answers read aloud on the Watch.Optional
Hugging FaceDownloading the audio service’s pyannote models: who speaks, recognised voices.Optional, with the audio service

With no key at all

Add LENN_AI=mock to deploy/.env: fake transcripts and answers, perfect to try it out, give a demo or contribute to the code.

Other providers, local ones included

  • Transcription: Deepgram, or any OpenAI-compatible Whisper server, including faster-whisper at home.
  • Companion: any OpenAI-compatible API, such as Mistral, or a local model with Ollama.

The audio service (optional)

A Python service that runs next to Lenn: noise reduction, speech detection, speaker separation with pyannote, and voiceprints to recognise who is speaking. It runs on CPU, faster with a GPU. Without it, Lenn still transcribes your moments.

Terminal
docker compose -f deploy/compose.yaml -f deploy/compose.audio.yaml up -d --build

Then set LENN_AUDIO_URL=http://audio:8000 and LENN_AUDIO_TOKEN in deploy/.env. The Hugging Face token requires accepting the pyannote model conditions once.

Licences

PartLicenceIn plain words
Server and web appAGPL-3.0Use it, change it, share it. If you offer a modified version to others over a network, share its code.
iPhone, Apple Watch and Mac appsMITFree to use, commercially too, as long as you keep the licence notice.
Design systemMITColors, type and the companion, reusable anywhere.
This websiteAGPL-3.0Same rules as the server. Phosphor icons under the MIT licence.

The code is on GitHub: server licence, Apple apps licence.

Contribute

  • A problem, an idea: open an issue.
  • The design system describes the companion, colours, voice and tone: one product everywhere.
  • Don’t feel like installing anything? Lenn Cloud does all of this for you.