Skip to content
Sign up
Reference

Docker

Use Letta Code with a Letta server running in Docker

Letta Code can connect to a Letta server running in Docker instead of the Letta API. When using Docker, you are responsible for setting up your own LLM providers and API keys.

Before connecting Letta Code, you need to have a Letta server running in Docker. See the Docker setup guide for detailed 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