Install ClickHouse using Homebrew

[Edit this page](https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/getting-started/install/macos.md)

Note

Installation using the Homebrew Formulae has now been deprecated and will be disabled on 2026-09-01.
We recommend using the [quick install](/docs/install/quick-install) method which works on any platform instead.

Review recommendations

## Review recommendations[​](#review-recommendations "Direct link to Review recommendations")

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"](/docs/guides/sizing-and-hardware-recommendations)

Install using the community Homebrew formula

## Install using the community Homebrew formula[​](#install-using-community-homebrew-formula "Direct link to Install using the community Homebrew formula")

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

```
brew install --cask clickhouse
```

Fix the developer verification error in macOS

## Fix the developer verification error in macOS[​](#fix-developer-verification-error-macos "Direct link to Fix the developer verification error in macOS")

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:

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.

### System settings process[​](#system-settings-process "Direct link to System settings process")

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

1. Open **System settings**.
2. Navigate to **Privacy & Security**:
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**.
5. Enter your MacOS user password.

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

### Terminal process[​](#terminal-process "Direct link to Terminal process")

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:

```
which clickhouse
```

This should output something like:

```
/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:

```
xattr -d com.apple.quarantine /opt/homebrew/bin/clickhouse
```

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

```
clickhouse
```

This should output something like:

```
Use one of the following commands:
clickhouse local [args]
clickhouse client [args]
clickhouse benchmark [args]
```

Fix the issue by reinstalling ClickHouse

## Fix the issue by reinstalling ClickHouse[​](#fix-issue "Direct link to Fix the issue by reinstalling ClickHouse")

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

First, uninstall ClickHouse:

```
brew uninstall clickhouse
```

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

```
brew install --no-quarantine clickhouse
```

- [Review recommendations](#review-recommendations)- [Install using the community Homebrew formula](#install-using-community-homebrew-formula)- [Fix the developer verification error in macOS](#fix-developer-verification-error-macos)
      - [System settings process](#system-settings-process)- [Terminal process](#terminal-process)- [Fix the issue by reinstalling ClickHouse](#fix-issue)

Was this page helpful?