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

> Instructions for compiling ClickHouse from source or installing a CI-generated binary

# Source & CI builds

<h2 id="compile-from-source">
  Compile from source
</h2>

To manually compile ClickHouse, follow the instructions for [Linux](/resources/develop-contribute/build/build) or [macOS](/resources/develop-contribute/build/build-osx).

You can compile packages and install them or use programs without installing packages.

```xml theme={null}
Client: <build_directory>/programs/clickhouse-client
Server: <build_directory>/programs/clickhouse-server
```

You'll need to create data and metadata folders manually and `chown` them for the desired user. Their paths can be changed in server config (src/programs/server/config.xml), by default they're:

```bash theme={null}
/var/lib/clickhouse/data/default/
/var/lib/clickhouse/metadata/default/
```

On Gentoo, you can just use `emerge clickhouse` to install ClickHouse from sources.

<h2 id="install-a-ci-generated-binary">
  Install a CI-generated Binary
</h2>

ClickHouse's continuous integration (CI) infrastructure produces specialized builds for each commit in the [ClickHouse
repository](https://github.com/clickhouse/clickhouse/), e.g. [sanitized](https://github.com/google/sanitizers) builds, unoptimized (Debug)
builds, cross-compiled builds etc. While such builds are normally only useful during development, they can in certain situations also be
interesting for you.

<Note>
  Since ClickHouse's CI is evolving over time, the exact steps to download CI-generated builds may vary.
  Also, CI may delete old build artifacts, making them unavailable for download.
</Note>

For example, to download an aarch64 binary for ClickHouse v23.4, follow these steps:

* Find the GitHub pull request for release v23.4: [Release pull request for branch 23.4](https://github.com/ClickHouse/ClickHouse/pull/49238)
* Click "Commits", then click on a commit similar to "Update autogenerated version to 23.4.2.1 and contributors" for the particular version you'd like to install.
* Click the green check / yellow dot / red cross to open the list of CI checks.
* Click "Details" next to "Builds" in the list; it will open a page similar to [this page](https://s3.amazonaws.com/clickhouse-test-reports/46793/b460eb70bf29b19eadd19a1f959b15d186705394/clickhouse_build_check/report.html).
* Find the rows with compiler = "clang-\*-aarch64" — there are multiple rows.
* Download the artifacts for these builds.
