Install and run ClickHouse on Windows via Docker Desktop or the portable build, then connect with clickhouse-client for fast local analytics.
Windows developers want local analytics without spinning up Linux servers. ClickHouse pairs column-store speed with SQL syntax, letting teams prototype dashboards fast on their laptops.
Install Docker Desktop with the WSL 2 backend or enable Hyper-V. Allocate ≥4 GB RAM and 2 CPUs to Docker. Verify PowerShell 5+ is available.
Pull the latest image, then start a container that persists data and exposes native and HTTP ports.
docker pull clickhouse/clickhouse-server:latest
docker run -d --name ch_win ^
-p 9000:9000 -p 8123:8123 ^
-v C:\clickhouse\data:/var/lib/clickhouse ^
clickhouse/clickhouse-server:latest
View logs with docker logs -f ch_win
; stop and restart using docker stop ch_win
/ docker start ch_win
.
Yes. Download the portable build from builds.clickhouse.com, unzip to C:\clickhouse
, then launch:
cd C:\clickhouse
.\clickhouse-server.exe --config-file=config.xml
The server listens on 9000 (native) and 8123 (HTTP).
For Docker: docker exec -it ch_win clickhouse-client
. For the portable build: .\clickhouse-client.exe
. Supply --user
and --password
if you changed defaults.
Create ecommerce tables to confirm the install:
CREATE TABLE Customers (
id UInt32, name String, email String, created_at DateTime
) ENGINE = MergeTree ORDER BY id;
CREATE TABLE Orders (
id UInt32, customer_id UInt32, order_date Date, total_amount Decimal(10,2)
) ENGINE = MergeTree ORDER BY id;
Pin CPU/RAM limits in Docker. Store volumes on SSDs. Avoid exposing ports on public Wi-Fi. Map /var/lib/clickhouse
to OneDrive or enterprise storage for backups.
Low WSL 2 memory causes Cannot allocate memory
errors—bump resources in Docker → Settings → Resources. Port conflicts (e.g., SQL Server) block startup—map to free ports with -p 19000:9000
.
WSL 2 is required only for Docker Desktop’s backend. The portable build runs natively without WSL.
Stop the container, pull the new image, and start a new container re-using the same volume. For the portable build, replace binaries and run clickhouse-server --upgrade
.
Yes. Use the native port (9000) with the ClickHouse driver or the HTTP port (8123) with an HTTP client. Provide credentials if you enabled authentication.