---
title: "Self-Hosting Quickstart"
sidebarTitle: "Quickstart"
description: "From zero to your first memory in under two minutes."
icon: "play"
---
## Install
```bash
curl -fsSL https://supermemory.ai/install | bash
```
```bash
npx supermemory local
```
```bash
bunx supermemory local
```
The installer detects your OS and architecture, downloads the right binary, verifies it, and (when run interactively) prompts you for an LLM API key. Supported platforms: macOS (Apple Silicon & Intel), Linux (x64 & arm64).
## Run
```bash
supermemory-server
```
First boot sets everything up — the embedded Supermemory graph engine, local embeddings, and your credentials:
```
┌──────────────────────────────────────────────────┐
│ url http://localhost:6767 │
│ database ./.supermemory │
│ api key sm_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx │
│ org id xxxxxxxxxxxxxxxxxxxxxx │
└──────────────────────────────────────────────────┘
```
Save that API key — it's your bearer token for every request.
In production, Supermemory runs proprietary models tuned for long-horizon data understanding. Self-hosted, you bring any model: if no provider key is set, first boot launches an interactive setup wizard — pick a provider (OpenAI, Anthropic, Gemini, Groq, or any OpenAI-compatible endpoint like Ollama), paste your key, and it's saved encrypted for every future launch. After the LLM key, you can optionally pick an embedding model (press Enter to keep local `Xenova/bge-base-en-v1.5`). See [all providers](/self-hosting/configuration#llm-providers), [embeddings](/self-hosting/embeddings), and [fully-offline local models](/self-hosting/configuration#fully-offline-with-local-models).
**Docker / non-interactive:** set an LLM key via env and, if you don’t want local embeddings, set `SUPERMEMORY_EMBEDDING_PROVIDER` / `MODEL` / `DIMENSIONS`. There is no wizard without a TTY.
## Add your first memory
```typescript
import Supermemory from "supermemory"
const client = new Supermemory({
apiKey: "sm_...",
baseURL: "http://localhost:6767",
})
await client.memories.add({
content: "I'm Dhravya. I love building dev tools and I'm allergic to peanuts.",
containerTag: "user_dhravya",
})
```
```python
from supermemory import Supermemory
client = Supermemory(
api_key="sm_...",
base_url="http://localhost:6767",
)
client.memories.add(
content="I'm Dhravya. I love building dev tools and I'm allergic to peanuts.",
container_tag="user_dhravya",
)
```
```bash
curl http://localhost:6767/v3/documents \
-H "Authorization: Bearer sm_..." \
-H "Content-Type: application/json" \
-d '{
"content": "I am Dhravya. I love building dev tools and I am allergic to peanuts.",
"containerTag": "user_dhravya"
}'
```
## Search it
```typescript
const results = await client.search({
q: "what food should I avoid?",
containerTag: "user_dhravya",
})
```
```python
results = client.search(
q="what food should I avoid?",
container_tag="user_dhravya",
)
```
```bash
curl http://localhost:6767/v3/search \
-H "Authorization: Bearer sm_..." \
-H "Content-Type: application/json" \
-d '{
"q": "what food should I avoid?",
"containerTag": "user_dhravya"
}'
```
That's it. Everything in the [Memory API](/quickstart) — documents, memories, user profiles, spaces, filtering — works identically against your local server.
## Where things live
By default, all state lives in a single directory you can back up or move:
| Path | Contents |
|---|---|
| `./.supermemory/` (or `$SUPERMEMORY_DATA_DIR`) | The Supermemory graph engine's data, auth secret, embedding model cache |
| `~/.supermemory/env` | API keys saved by the installer, loaded on every launch |
## Next steps
LLM providers, local models, performance tuning
Local default, OpenAI / Gemini / Ollama, multilingual
The full API — it all works against your local server