> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-sync-clickhouse-operator-docs-7e82242.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Install ClickHouse on MacOS

# Install ClickHouse using Homebrew

# Install ClickHouse using Homebrew

<Warning>
  Installation using the Homebrew Formulae has now been deprecated and will be disabled on 2026-09-01.
  We recommend using the [quick install](/core/get-started/setup/self-managed/quick-install) method which works on any platform instead.
</Warning>

<Steps>
  <Step>
    <h2 id="review-recommendations">
      Review recommendations
    </h2>

    Before installing ClickHouse, review the following recommendations:

    * **Swap:** Disable the operating system's swap file in production environments.
    * **Disk space:** The ClickHouse binary requires at least 2.5 GB of disk space for installation.
    * **Network:** For distributed deployments (clustering), use at least 10 Gbit network connectivity. Network bandwidth is critical for processing distributed queries with large amounts of intermediate data, as well as for replication.

    **Estimating storage requirements**

    To estimate the disk space needed for your data:

    1. **Estimate data volume:** Take a sample of your data and calculate the average row size, then multiply by the number of rows you plan to store.
    2. **Apply the compression coefficient:** Load a sample into ClickHouse and compare the original data size with the stored table size. Clickstream data, for example, is typically compressed 6-10x.
    3. **Account for replicas:** If you plan to store data in multiple replicas, multiply the estimated volume by the number of replicas.

    For more detailed hardware requirements, see ["Sizing and hardware recommendations"](/core/guides/oss/best-practices/sizing-and-hardware-recommendations)
  </Step>

  <Step>
    <h2 id="install-using-community-homebrew-formula">
      Install using the community Homebrew formula
    </h2>

    To install ClickHouse on macOS using [Homebrew](https://brew.sh/), you can use
    the ClickHouse community [homebrew formula](https://formulae.brew.sh/cask/clickhouse).

    ```bash theme={null}
    brew install --cask clickhouse
    ```
  </Step>

  <Step>
    <h2 id="fix-developer-verification-error-macos">
      Fix the developer verification error in macOS
    </h2>

    If you install ClickHouse using `brew`, you may encounter an error from MacOS.
    By default, MacOS won't run applications or tools created by a developer who can't be verified.

    When attempting to run any `clickhouse` command, you may see this error:

    <Image img="/images/knowledgebase/fix-the-developer-verification-error-in-macos/dev-verification-error.png" size="sm" alt="MacOS developer verification error dialog" border />

    To get around this verification error, you need to remove the app from MacOS' quarantine bin either by finding the appropriate setting in your System Settings window, using the terminal, or by re-installing ClickHouse.

    <h3 id="system-settings-process">
      System settings process
    </h3>

    The easiest way to remove the `clickhouse` executable from the quarantine bin is to:

    1. Open **System settings**.

    2. Navigate to **Privacy & Security**:

           <Image img="/images/knowledgebase/fix-the-developer-verification-error-in-macos/privacy-and-security-default-view.png" size="md" alt="MacOS Privacy & Security settings default view" border />

    3. Scroll to the bottom of the window to find a message saying \_"clickhouse-macos-aarch64" was blocked from use because it isn't from an identified developer".

    4. Click **Allow Anyway**.

           <Image img="/images/knowledgebase/fix-the-developer-verification-error-in-macos/privacy-and-security-screen-allow-anyway.png" size="md" alt="MacOS Privacy & Security settings showing Allow Anyway button" border />

    5. Enter your MacOS user password.

    You should now be able to run `clickhouse` commands in your terminal.

    <h3 id="terminal-process">
      Terminal process
    </h3>

    Sometimes pressing the `Allow Anyway` button doesn't fix this issue, in which case you can also perform this process using the command-line.
    Or you might just prefer using the command line!

    First find out where Homebrew installed the `clickhouse` executable:

    ```shell theme={null}
    which clickhouse
    ```

    This should output something like:

    ```shell theme={null}
    /opt/homebrew/bin/clickhouse
    ```

    Remove `clickhouse` from the quarantine bin by running `xattr -d com.apple.quarantine` followed by the path from the previous command:

    ```shell theme={null}
    xattr -d com.apple.quarantine /opt/homebrew/bin/clickhouse
    ```

    You should now be able to run the `clickhouse` executable:

    ```shell theme={null}
    clickhouse
    ```

    This should output something like:

    ```bash theme={null}
    Use one of the following commands:
    clickhouse local [args]
    clickhouse client [args]
    clickhouse benchmark [args]
    ```
  </Step>

  <Step>
    <h2 id="fix-issue">
      Fix the issue by reinstalling ClickHouse
    </h2>

    Brew has a command-line option which avoids quarantining installed binaries in the first place.

    First, uninstall ClickHouse:

    ```shell theme={null}
    brew uninstall clickhouse
    ```

    Now reinstall ClickHouse with `--no-quarantine`:

    ```shell theme={null}
    brew install --no-quarantine clickhouse
    ```
  </Step>
</Steps>
