Skip to content
Sign up
Reference

Self-hosting

Use Letta Code with a self-hosted Letta server

Letta Code can connect to a self-hosted Letta server instead of the Letta Developer Platform. When self-hosting, you are responsible for setting up your own LLM providers and LLM API keys.

Before connecting Letta Code to a self-hosted server, you need to have a Letta server running. See the self-hosting guide for detailed setup instructions.

Quick start with Docker (see the full guide for more options):

Terminal window
docker run \
-v ~/.letta/.persist/pgdata:/var/lib/postgresql/data \
-p 8283:8283 \
-e OPENAI_API_KEY="your_openai_api_key" \
letta/letta:latest

Set the LETTA_BASE_URL environment variable to point to your server:

Terminal window
export LETTA_BASE_URL="http://localhost:8283"

Then run Letta Code normally:

Terminal window
letta

You can also set it inline:

Terminal window
LETTA_BASE_URL="http://localhost:8283" letta