> ## Documentation Index
> Fetch the complete documentation index at: https://danswer-whuang-craft-v2-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker

> Deploy Onyx with Docker Compose

<Tip>
  Check out the [Resourcing Guide](/deployment/getting_started/resourcing) before getting started with Docker.
</Tip>

## Guide

**Note:** On Windows, the commands will be slightly different but all the steps are the same.

<Steps>
  <Step title="Install Requirements">
    * [Git](https://git-scm.com/downloads)
    * [Docker (with compose)](https://docs.docker.com/get-docker/)
  </Step>

  <Step title="Clone the Onyx repo">
    ```bash theme={null}
    git clone --depth 1 https://github.com/onyx-dot-app/onyx.git
    ```
  </Step>

  <Step title="Navigate to the compose files">
    ```bash theme={null}
    cd onyx/deployment/docker_compose
    ```
  </Step>

  <Step title="Launch Onyx">
    To pull images from Docker Hub and start Onyx:

    ```bash theme={null}
    docker compose up -d
    ```

    Alternatively, to build images from source:

    ```bash theme={null}
    docker compose up -d --build --force-recreate
    ```

    <Warning>
      If you've previously launched Onyx with the old `onyx-stack` service name,
      you'll need to add `-p onyx-stack` to your launch command.

      For example: `docker compose up -p onyx-stack -d`.
    </Warning>
  </Step>
</Steps>

After the containers come up,
the system needs to go through an initialization process after which you can access Onyx at
[localhost:3000](localhost:3000).

## Enabling Onyx Craft

To enable [Onyx Craft](/overview/core_features/craft), use the installation script with the `--include-craft` flag:

```bash theme={null}
cd onyx/deployment/docker_compose
./install.sh --include-craft
```

Then start the generated deployment:

```bash theme={null}
cd onyx_data/deployment
docker compose up -d
```

The install script adds the Craft compose overlay, enables `ENABLE_CRAFT=true`, creates the sandbox bridge network,
and configures the sandbox proxy.

<Warning>
  Docker Compose Craft uses the Docker sandbox backend. The API server, background worker,
  and sandbox proxy need access to the host Docker socket to provision and manage sandbox containers.
  Treat this as root-equivalent access to the host.
</Warning>

For existing deployments, enabling Craft is more than setting `ENABLE_CRAFT=true`.
You must also run the Craft compose overlay and set a `SANDBOX_API_SERVER_URL` that sandbox containers can reach.

Read the [Craft deployment guide](/deployment/local/craft)
before enabling Craft on an existing Docker Compose deployment.

## Next Steps

<CardGroup cols={2}>
  <Card title="Configure Authentication" icon="shield-check" href="/deployment/authentication/basic">
    Set up authentication for your Onyx deployment with OAuth, OIDC, or SAML.
  </Card>

  <Card title="More Onyx Configuration Options" icon="gear" href="/deployment/configuration/configuration">
    Learn about all available configuration options for your Onyx deployment.
  </Card>
</CardGroup>
