Set up Kafka for development

Get a local Kafka cluster running for development: Docker, native macOS, Linux, Windows, or a Conduktor hosted Kafka cluster. Pick your setup and start.

By Stéphane Derosiaux · Updated October 20, 2026

Get your first Kafka cluster running

This section guides you through setting up Apache Kafka for development and learning. Choose from multiple installation options based on your operating system and preferences.

What you'll learn:

  • How to set up a Kafka cluster for development
  • Different installation methods and their trade-offs
  • How to verify your Kafka installation

Prerequisites:

  • Basic command line knowledge
  • Java 17+ installed (for local installations)
  • Docker installed (for container-based setup)

Choose your setup method

Kafka setup decision tree: choose Docker Compose if you have Docker, otherwise pick by OS (Homebrew or native on Mac, native on Linux, WSL2 plus native on Windows)

Installation options

MethodBest forTimeRequirements
Docker ComposeCross-platform, version switching5 minDocker
Mac nativemacOS development15 minJava 17+
Mac HomebrewQuick Mac setup10 minHomebrew
Linux nativeLinux development15 minJava 17+
Windows WSL2Windows development20 minWSL2, Java 17+

Which method should I choose?

For most users, Docker Compose is the best choice. It works on all operating systems, makes version switching straightforward, and keeps your system clean. Use native installation if you need direct access to Kafka binaries or prefer not to use Docker.

ZooKeeper vs KRaft mode

Kafka used to require ZooKeeper for cluster coordination. KRaft mode, introduced in Kafka 2.8, lets Kafka manage its own metadata, and Kafka 4.0 removed ZooKeeper support entirely.

ModeStatusRecommendation
KRaftProduction-ready since Kafka 3.3, the only mode in Kafka 4.0+Use for learning and production
ZooKeeperRemoved in Kafka 4.0, last supported in 3.9.xOnly to maintain an older cluster
All the installation options above use KRaft. If you maintain an older cluster, the ZooKeeper guides (legacy, Kafka 3.9.2) are still available:

See it in practice with Conduktor

Conduktor Console provides a visual interface for connecting to and managing your Kafka clusters once they're running.

Next steps