How to install Apache Kafka on Mac with Homebrew

Install Kafka on Mac with Homebrew. Run brew install kafka, start the broker as a background service in KRaft mode, and verify the setup with the CLI.

By Stéphane Derosiaux · Updated October 16, 2026

Install and run Kafka on macOS with Homebrew

Homebrew provides a quick way to install Kafka on macOS. It handles Java dependencies automatically, places binaries in your PATH and prepares the storage for KRaft mode, so Kafka runs without ZooKeeper.

What you'll learn:

  • How to install Kafka using Homebrew
  • How to start Kafka
  • How to locate configuration files
  • Differences between Intel and Apple Silicon paths

Homebrew vs native installation

Homebrew is convenient but provides less control over versions: it installs the latest Kafka release. For development with specific Kafka versions, consider the native Mac installation.

Installation overview

Mac Kafka Homebrew install flow: install Homebrew, install Kafka, start Kafka

Step 1: Install Homebrew

If you don't have Homebrew installed:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Step 2: Install Kafka

Homebrew automatically installs Java as a dependency:

brew install kafka

The install also formats Kafka's storage for KRaft mode, so there's no cluster ID to generate by hand.

Verify the installation:

kafka-topics --version

Installation paths

Homebrew installs to different locations based on your chip architecture:

ComponentIntel MacApple Silicon Mac
Binaries/usr/local/bin/opt/homebrew/bin
Kafka config/usr/local/etc/kafka/opt/homebrew/etc/kafka
Kafka data/usr/local/var/lib/kraft-combined-logs/opt/homebrew/var/lib/kraft-combined-logs
Kafka logs/usr/local/var/log/kafka/opt/homebrew/var/log/kafka
The commands below use $(brew --prefix), which resolves to the right location on both.

Step 3: Start Kafka

Run Kafka as a background service that restarts with your Mac:

brew services start kafka

Or run it in the foreground, and keep the terminal window open:

kafka-server-start $(brew --prefix)/etc/kafka/server.properties

Kafka is now running at localhost:9092 in KRaft mode. Check that the broker answers:

kafka-topics --bootstrap-server localhost:9092 --list

To stop the background service, run brew services stop kafka.

Optional: Change the data directory

Stop Kafka, then edit $(brew --prefix)/etc/kafka/server.properties:

log.dirs=/your/path/to/data/kafka

A new directory has to be formatted before Kafka can start. Generate a cluster ID and format it:

kafka-storage format --standalone -t $(kafka-storage random-uuid) -c $(brew --prefix)/etc/kafka/server.properties

See it in practice with Conduktor

Conduktor Console can connect to your local Kafka cluster at localhost:9092 for visual topic management.

Next steps