Skip to main content

Build

Cognee Docker

CogneeOfficialCertified

Use when the user wants to run cognee with Docker or docker compose — trying it out from the prebuilt image, starting the API server in a container, or bringing up the full stack (UI, MCP, Postgres, Neo4j) with compose profiles.

  • New
  • v1.0.1
  • Reviewed Aug 18
  • No reviews yet

Capabilities

  • Fastest path: prebuilt image, one file

    For a local try-out, do NOT clone or build anything

  • Full stack from the repo

    The repository's docker-compose.yml builds from source and adds opt-in

  • Gotchas

Getting started

Full instructions

Example command

Fastest path: prebuilt image, one file

docker compose up

Instructions: SKILL.mdv1.0.1

Start cognee from the Docker image

Fastest path: prebuilt image, one file

For a local try-out, do NOT clone or build anything. Follow
docs/minimal-docker-compose.md: save this as docker-compose.yml in an
empty directory:

yaml
services:
  cognee:
    image: cognee/cognee:main
    ports:
      - "8000:8000"
    environment:
      LLM_API_KEY: ${LLM_API_KEY:?set LLM_API_KEY to your OpenAI API key}
      # Single-user try-out: no auth, shared local databases.
      ENABLE_BACKEND_ACCESS_CONTROL: "false"

Then:

bash
export LLM_API_KEY="sk-..."   # OpenAI key (default LLM + embedding provider)
docker compose up
curl http://localhost:8000/health

Interactive API reference: http://localhost:8000/docs. First requests:

bash
echo "Cognee turns documents into AI memory." > note.txt
# remember = ingest + build the graph in one call (multipart form)
curl -X POST http://localhost:8000/api/v1/remember -F "[email protected]" -F "datasetName=main_dataset"
# recall = query it (JSON)
curl -X POST http://localhost:8000/api/v1/recall -H "Content-Type: application/json" \
  -d '{"query": "What does Cognee do?", "datasets": ["main_dataset"]}'

/api/v1/recall takes the question as query. Omit search_type (or pass
null) and the query is auto-routed by the same rule-based router the SDK
recall() uses, with HYBRID_COMPLETION as the fallback; pass a value such as
"search_type": "GRAPH_COMPLETION" to pin a strategy. The rule table is in
docs/recall-vs-search.md.

Request DTOs accept both snake_case and camelCase for every field
(alias_generator=to_camel + populate_by_name in cognee/api/DTO.py), so
search_type and searchType are equally valid.

The legacy /api/v1/add + /api/v1/cognify + /api/v1/search endpoints still
exist and are what remember/recall call underneath; use them only when you
need a single stage on its own. /api/v1/improve and /api/v1/forget complete
the memory API.

Data lives inside the container by default. To persist it, set
DATA_ROOT_DIRECTORY=/cognee-data/data and
SYSTEM_ROOT_DIRECTORY=/cognee-data/system and mount a named volume at
/cognee-data (full example in docs/minimal-docker-compose.md).

Full stack from the repo

The repository's docker-compose.yml builds from source and adds opt-in
profiles. From the repo root (needs a .env with at least LLM_API_KEY;
copy .env.template):

bash
docker compose up                                  # API server only, port 8000
docker compose --profile ui up                     # + frontend on port 3000
docker compose --profile mcp up                    # + MCP server on port 8001
docker compose --profile postgres --profile neo4j up   # + databases

Postgres profile: pgvector/pg17, user/password/db cognee/cognee/cognee_db
on 5432. Neo4j profile: neo4j/pleaseletmein on 7474/7687. When cognee runs
in a container and the database on the host, use DB_HOST=host.docker.internal.

Gotchas

  • With ENABLE_BACKEND_ACCESS_CONTROL unset (defaults to true), every API
    call requires authentication — the single-user try-out sets it to false.
  • The image defaults to OpenAI for both LLM and embeddings; configuring only
    one of them leaves the other on OpenAI, so keep a valid OpenAI key or
    configure both (see the cognee-integrations skill).

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

More from Cognee

View source →
self-hosted-companionChat with a companion that knows your notes folder (a journal, an Obsidian vault, any .md or .txt files) and every earlier chat, using cognee memory with local databases. Use when someone wants to ask questions about their own notes, or to…0 installsgoogle-workspace-memoryRemember a user's Google Calendar, Gmail and Drive in one cognee memory and answer questions across them, by default preparing their client meetings of the coming week (which orders are late or at risk, why, and what to say). Use when…0 installscompany-brain-follow-up-agentTurn your latest Granola call into next steps (owner, team, due date, and the Linear issue that already tracks each one) and post them to Slack, using cognee memory of your calls, Linear issues and Gmail inbox. Use when someone asks for…0 installsdocstring-criticReview a docstring-author patch in the Cognee pilot. Independently verify truthfulness and promotional tone, preserve supported positive framing, and write the claim ledger. Pass 2; corrects claims without expanding coverage.0 installscognee-permissionsUse when working with cognee's users, permissions, and multi-tenancy — creating users, tenants and roles, sharing datasets (read/write/delete/share grants), acting as a specific user in the SDK or authenticating over HTTP (login, API…0 installsdocstring-authorWrite or improve Python docstrings on the ten files in pilot_files.md, making supported Cognee benefits and connections between capabilities explicit. Pass 1 of the docstring pilot; a separate critic verifies the patch and writes the claim…0 installs

Frequently asked questions about cognee-docker

What does the cognee-docker skill do?

Use when the user wants to run cognee with Docker or docker compose — trying it out from the prebuilt image, starting the API server in a container, or bringing up the full stack (UI, MCP, Postgres, Neo4j) with compose profiles. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the cognee-docker skill?

Run `npx @skills-hub-ai/cli install cognee-docker` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/cognee-docker/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does cognee-docker work with?

cognee-docker runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the cognee-docker skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use cognee-docker after installing it?

In Claude Code, type `/cognee-docker` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the cognee-docker skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/cognee-docker)](https://skills-hub.ai/skills/cognee-docker)
HTML
<a href="https://skills-hub.ai/skills/cognee-docker"><img src="https://skills-hub.ai/api/badges/skill/cognee-docker" alt="Install on Skills Hub"></a>

More options in the badge docs.