# Run ontlgy locally

Start the Docker stack from published images, index a repository and connect your coding agent.

Canonical page: https://ontlgy.io/docs/start/quickstart/

This guide takes you from nothing to a running installation. If your team already runs ontlgy, [join that installation](https://ontlgy.io/docs/start/join-a-team/) instead.

## Before you start

- Docker with Compose v2, running. Docker Desktop or Rancher Desktop with the `dockerd` engine works.
- Git, Bash, OpenSSL and curl. On Windows, use a suitable Bash environment such as WSL with Docker integration.
- About **4 GB of free memory** and **10 GB of disk** as an initial baseline; larger repositories need more.
- A [GitHub token](https://ontlgy.io/docs/sources/github/#create-a-github-token) with access to the repository you will index.
- Cursor, Claude Code or Codex, with a local checkout available for reading code.

Node.js and pnpm are not needed, and nothing is built on your machine. The installation runs ontlgy's published image, [`appsmithvivonk/ontlgy`](https://hub.docker.com/r/appsmithvivonk/ontlgy), together with the official Postgres and Neo4j images. The first start pulls the images and then indexes; there is no fixed setup-time guarantee.

## 1. Start the stack

```bash
git clone https://github.com/ontlgy/ontlgy-deployments.git
cd ontlgy-deployments/docker-compose
bash install.sh
```

The script creates `.env` with fresh secrets if it does not exist, pulls the images, starts the services and waits for the app. It keeps an existing `.env` unchanged. When it succeeds, it prints the app address, normally `http://localhost:8080`.

Useful options:

```bash
bash install.sh --check      # Check Docker and Compose without starting services
bash install.sh --port 9090  # Choose a port when creating a new installation
```

The Compose project is named `ontlgy`. Run one local installation at a time; starting a second copy can target the same stack. Use an existing installation if you already have one.

## 2. Complete setup in the browser

1. Open the printed address and **create the administrator account**. This initial setup runs once.
2. Open **GitHub** and connect your token.
3. Choose one repository in **Repositories**. A small repository you know well makes the first check easiest. Wait until its index finishes; open the error if indexing fails.
4. Open **Connect your agent** and create your API key. Save it privately when shown; it is displayed once.
5. Copy the configuration for your agent and use the connection test on that page.

[GitHub setup](https://ontlgy.io/docs/sources/github/) explains repository access and webhooks.

## 3. Connect and ask a question

Follow [Connect your agent](https://ontlgy.io/docs/agents/connect/), restart or reload its MCP connection, then complete [Your first useful query](https://ontlgy.io/docs/start/first-query/).

You are finished when the agent can call ontlgy, resolve a real symbol, report the indexed commit and read the cited file in your checkout.

## Stop and resume

Run these in the `ontlgy-deployments/docker-compose` directory:

```bash
docker compose ps
docker compose logs --tail 100 app worker
docker compose down                 # Stop services; retain data volumes
docker compose up -d                # Resume an existing installation
```

Do not add `-v` to `docker compose down` unless you intend to delete the installation's data volumes.

If the app does not start or the agent cannot connect, use [Troubleshooting](https://ontlgy.io/docs/reference/troubleshooting/). For HTTPS, webhooks, shared access and Kubernetes, continue with [Team installation](https://ontlgy.io/docs/operate/install/).
