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.
Prerequisites
Section titled “Prerequisites”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):
docker run \ -v ~/.letta/.persist/pgdata:/var/lib/postgresql/data \ -p 8283:8283 \ -e OPENAI_API_KEY="your_openai_api_key" \ letta/letta:latestConnecting Letta Code
Section titled “Connecting Letta Code”Set the LETTA_BASE_URL environment variable to point to your server:
export LETTA_BASE_URL="http://localhost:8283"Then run Letta Code normally:
lettaYou can also set it inline:
LETTA_BASE_URL="http://localhost:8283" letta