> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spaceduck.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# From Source

> Clone and build Spaceduck from source for development or manual control.

For contributors or if you prefer manual control over the installation.

## Prerequisites

* [Bun](https://bun.sh) v1.3 or later
* A chat model — either a local server (llama.cpp, LM Studio) or a cloud API key (Bedrock, Gemini, OpenRouter)

## Steps

<Steps>
  <Step title="Clone and install">
    ```bash theme={null}
    git clone https://github.com/maziarzamani/spaceduck.git
    cd spaceduck
    bun install
    ```
  </Step>

  <Step title="Install system dependencies">
    <Tabs>
      <Tab title="macOS">
        ```bash theme={null}
        # SQLite with extension support (required for sqlite-vec)
        brew install sqlite
        ```
      </Tab>

      <Tab title="Linux">
        SQLite with extension support is typically available by default. If you get sqlite-vec errors, install `libsqlite3-dev`.
      </Tab>

      <Tab title="Windows">
        SQLite is bundled with Bun on Windows. No additional steps needed.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Configure deployment settings">
    ```bash theme={null}
    cp .env.example .env
    ```

    The `.env` file controls deployment knobs only (port, log level). Provider settings are managed in the Settings UI.
  </Step>

  <Step title="Start the gateway">
    ```bash theme={null}
    bun run dev
    ```

    Open [http://localhost:3000](http://localhost:3000) in your browser.
  </Step>
</Steps>
