How to install Apache Kafka on Mac without ZooKeeper (KRaft mode)
Install Kafka in KRaft mode on Mac without ZooKeeper. Download Kafka for macOS, format storage with kafka-storage, and verify a single-node broker.
By Stéphane Derosiaux · Updated October 16, 2026
Install and run Kafka in KRaft mode on macOS
KRaft mode runs Kafka without ZooKeeper, simplifying deployment and reducing resource requirements. This guide walks you through setting up a single-node KRaft cluster.
What you'll learn:
- How to install Java (required dependency)
- How to generate a cluster ID and format storage
- How to start Kafka in KRaft mode
- How to configure your PATH for CLI access
KRaft vs ZooKeeper
KRaft is the only mode in Kafka 4.0 and later: ZooKeeper support was removed. If you have to run an older ZooKeeper-based setup, see the Mac ZooKeeper installation guide (legacy).
Installation overview
Step 1: Install Java JDK
Kafka 4 brokers require Java 17 or later. This guide uses Java 25, the version Kafka recommends today.
- Download Amazon Corretto 25, a free OpenJDK distribution: Apple Silicon or Intel
- Double-click the downloaded
.pkgfile - Follow the installation wizard
Verify the installation:
java -version Expected output (your patch version may differ):
openjdk version "25.0.4.1" 2026-08-18 LTS
OpenJDK Runtime Environment Corretto-25.0.4.10.1 (build 25.0.4.1+10-LTS)
OpenJDK 64-Bit Server VM Corretto-25.0.4.10.1 (build 25.0.4.1+10-LTS, mixed mode, sharing) Step 2: Download and extract Kafka
Download Kafka 4.3.1 (Scala 2.13 binary) and extract it to your home directory:
cd ~/Downloads
curl -O https://archive.apache.org/dist/kafka/4.3.1/kafka_2.13-4.3.1.tgz
tar -xzf kafka_2.13-4.3.1.tgz
mv kafka_2.13-4.3.1 ~/ A newer 4.x release from kafka.apache.org/downloads works the same way: replace 4.3.1 with its version in every command below.
Step 3: Generate cluster ID
KRaft clusters require a unique identifier:
~/kafka_2.13-4.3.1/bin/kafka-storage.sh random-uuid This returns a UUID like 76BLQI7sT_ql1mBfKsOk9Q. Save this value.
Step 4: Format storage
Format the log directory using your cluster ID (replace <uuid> with your generated UUID):
~/kafka_2.13-4.3.1/bin/kafka-storage.sh format --standalone \
-t <uuid> \
-c ~/kafka_2.13-4.3.1/config/server.properties This formats the directory specified in log.dirs (default: /tmp/kraft-combined-logs). The --standalone flag sets up this single node as its own controller.
Step 5: Start Kafka
~/kafka_2.13-4.3.1/bin/kafka-server-start.sh ~/kafka_2.13-4.3.1/config/server.properties Keep this terminal window open. Kafka is now running at localhost:9092 in KRaft mode.
Step 6: Configure PATH
Add Kafka binaries to your PATH for convenient access.
Edit your shell configuration file (~/.zshrc for zsh or ~/.bashrc for bash):
export PATH="$PATH:$HOME/kafka_2.13-4.3.1/bin" Reload your shell:
source ~/.zshrc Verify the setup:
kafka-topics.sh --version See it in practice with Conduktor
Conduktor Console can connect to your KRaft cluster at
localhost:9092for visual topic management.
Next steps
- Mac Homebrew installation for a one-command setup with managed services
- CLI tutorials to create topics and produce messages
- KRaft mode concepts for deeper understanding