# Cognee Server

Use when the user wants to run the cognee API server (and optional UI) on their own...

- Repository: https://github.com/topoteretes/cognee (32985 stars)
- Category: Design
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add topoteretes/cognee --skill cognee-server -g -a claude-code -y`
Codex: `npx skills add topoteretes/cognee --skill cognee-server -g -a codex -y`
Cursor: `npx skills add topoteretes/cognee --skill cognee-server -g -a cursor -y`
Gemini CLI: `npx skills add topoteretes/cognee --skill cognee-server -g -a gemini-cli -y`

## Description

Use when the user wants to run the cognee API server (and optional UI) on their own machine, starting it, checking it's healthy, connecting the SDK or other clients to it, and choosing the right auth posture.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Start the cognee server locally

## From an installed cognee (no Docker)

```bash
cognee-cli -ui
```

launches the full local stack: FastAPI backend on **http://localhost:8000**
and the UI on **http://localhost:3000**. Needs `LLM_API_KEY` in the
environment or `.env`. The interactive API reference is at
http://localhost:8000/docs, health at `/health`.

For API-only serving via Docker instead, use the cognee-docker skill (the
prebuilt `cognee/cognee:main` image or `docker compose up` from the repo).

## Auth posture

`ENABLE_BACKEND_ACCESS_CONTROL` decides everything:

- `true` (default): multi-tenant, auth required on every API call, per
  user+dataset database isolation.
- `false`: single-user local mode, no auth, shared local databases. Right
  choice for a personal dev server; never for anything exposed.

`REQUIRE_AUTHENTICATION=false` is ignored while access control is on; to turn
auth off you must set `ENABLE_BACKEND_ACCESS_CONTROL=false`.

Behind a TLS-terminating proxy set `AUTH_TOKEN_COOKIE_SECURE=true` so the auth cookie
gets the `Secure` attribute; leave it off for plain `http://localhost`, where a browser
refuses to store a Secure cookie.

## Connecting clients to the running server

- **SDK / CLI against the server** (instead of embedded local mode):

  ```bash
  cognee-cli serve --url http://localhost:8000        # local instance
  cognee-cli serve --url https://... --api-key ck_... # cognee cloud instance
  cognee-cli serve                                    # reconnect to the saved keyed instance
  cognee-cli serve --logout                           # disconnect
  ```

  In Python: `await cognee.serve(url="http://localhost:8000")`.

The rest: https://github.com/topoteretes/cognee/blob/HEAD/.agents/skills/cognee-server/SKILL.md
