Install ClickHouse using Homebrew
Installation using the Homebrew Formulae has now been deprecated and will be disabled on 2026-09-01. We recommend using the quick install method which works on any platform instead.
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:
- 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.
- 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.
- 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"
Install using the community Homebrew formula
To install ClickHouse on macOS using Homebrew, you can use the ClickHouse community homebrew formula.
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
The easiest way to remove the clickhouse executable from the quarantine bin is to:
-
Open System settings.
-
Navigate to Privacy & Security:
-
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".
-
Click Allow Anyway.
-
Enter your MacOS user password.
You should now be able to run clickhouse commands in your terminal.
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:
This should output something like:
Remove clickhouse from the quarantine bin by running xattr -d com.apple.quarantine followed by the path from the previous command:
You should now be able to run the clickhouse executable:
This should output something like:
Fix the issue by reinstalling ClickHouse
Brew has a command-line option which avoids quarantining installed binaries in the first place.
First, uninstall ClickHouse:
Now reinstall ClickHouse with --no-quarantine: