Skip to main content
Version: 23.1

Redpanda Quickstart


Spin up a Redpanda cluster in Docker to evaluate Redpanda on your Linux, macOS, or Windows machine. Then, create a basic streaming application and explore your cluster in Redpanda Console.


Redpanda in Docker is supported only for development and testing. To deploy self-hosted Redpanda in production, use one of the following environments:


You need Docker Compose. For installation instructions, see the Docker Compose documentation.

To check if you have Docker Compose installed, run the following:

docker compose version

You should see the version of Docker Compose that's installed on your local machine.

Deploy Redpanda

For lightweight testing, you can start a single Redpanda broker, or you can use a more robust example with three Redpanda brokers. With three brokers, you can configure your topics with a replication factor of three so that the cluster can recover from a single-broker failure.

  1. Copy and paste the following YAML content into a file named docker-compose.yml on your local filesystem.

    Reveal the YAML content
    version: "3.7"
    name: redpanda-quickstart
    driver: bridge
    redpanda-0: null
    - redpanda
    - start
    - --kafka-addr internal://,external://
    # Address the broker advertises to clients that connect to the Kafka API.
    # Use the internal addresses to connect to the Redpanda brokers'
    # from inside the same Docker network.
    # Use the external addresses to connect to the Redpanda brokers'
    # from outside the Docker network.
    - --advertise-kafka-addr internal://redpanda-0:9092,external://localhost:19092
    - --pandaproxy-addr internal://,external://
    # Address the broker advertises to clients that connect to the HTTP Proxy.
    - --advertise-pandaproxy-addr internal://redpanda-0:8082,external://localhost:18082
    - --schema-registry-addr internal://,external://
    # Redpanda brokers use the RPC API to communicate with eachother internally.
    - --rpc-addr redpanda-0:33145
    - --advertise-rpc-addr redpanda-0:33145
    # Tells Seastar (the framework Redpanda uses under the hood) to use 1 core on the system.
    - --smp 1
    # The amount of memory to make available to Redpanda.
    - --memory 1G
    # Mode dev-container uses well-known configuration properties for development in containers.
    - --mode dev-container
    # enable logs for debugging.
    - --default-log-level=debug
    container_name: redpanda-0
    - redpanda-0:/var/lib/redpanda/data
    - redpanda_network
    - 18081:18081
    - 18082:18082
    - 19092:19092
    - 19644:9644
    container_name: redpanda-console
    - redpanda_network
    entrypoint: /bin/sh
    command: -c 'echo "$$CONSOLE_CONFIG_FILE" > /tmp/config.yml; /app/console'
    CONFIG_FILEPATH: /tmp/config.yml
    brokers: ["redpanda-0:9092"]
    enabled: true
    urls: ["http://redpanda-0:8081"]
    enabled: true
    urls: ["http://redpanda-0:9644"]
    - 8080:8080
    - redpanda-0
  2. Run the following in the directory where you saved the docker-compose.yml file:

    docker compose up -d
    [+] Running 4/4
    ⠿ Network redpanda_network Created 0.0s
    ⠿ Volume "redpanda-quickstart_redpanda-0" Created 0.0s
    ⠿ Container redpanda-0 Started 0.3s
    ⠿ Container redpanda-console Started 0.6s

Start streaming

To start building a basic streaming application, you can use rpk to create a topic, produce messages to it, and consume messages from it. rpk is a command-line tool for connecting to and interacting with Redpanda brokers.

Each Redpanda broker comes preinstalled with rpk, so you can use it inside one of the Redpanda broker's Docker containers or you can use install it on your local machine to test external connectivity. The docker-compose.yml file configured the containers to expose ports on your localhost so that you can communicate with the cluster outside the Docker network.

To use rpk inside the Redpanda broker's Docker container:

  1. Get information about the cluster.

    docker exec -it redpanda-0 rpk cluster info
  2. Create a topic called chat-room:

    docker exec -it redpanda-0 rpk topic create chat-room


    TOPIC       STATUS
    chat-room OK
  3. Produce a message to the topic:

    docker exec -it redpanda-0 rpk topic produce chat-room
  4. Enter a message, then press Enter:

    Pandas are fabulous!

    Example output:

    Produced to partition 0 at offset 0 with timestamp 1663282629789.
  5. Press Ctrl+C to finish producing messages to the topic.

  6. Consume one message from the topic:

    docker exec -it redpanda-0 rpk topic consume chat-room --num 1

    Your message is displayed along with its metadata,:

    "topic": "chat-room",
    "value": "Pandas are fabulous!",
    "timestamp": 1663282629789,
    "partition": 0,
    "offset": 0

To test external connectivity using your local machine:

  1. Install rpk on your local machine:


    The rpk binary is not supported on Windows.

    1. Download the rpk archive for Linux, and make sure the version matches your Redpanda version.

      • To download the latest version of rpk:

        curl -LO
      • To download a version other than the latest:

        curl -LO<version>/
    2. Ensure that you have the folder ~/.local/bin:

      mkdir -p ~/.local/bin
    3. Add it to your $PATH:

      export PATH="~/.local/bin:$PATH"
    4. Unzip the rpk files to your ~/.local/bin/ directory:

      unzip -d ~/.local/bin/
    5. Run rpk version to display the rpk binary version:

      rpk version
      v23.1.11 (rev 3cd5258)
  2. Get information about the cluster to test the connection.

    rpk cluster info --brokers

    The Redpanda broker returns a list of all broker addresses so that rpk can communicate with all brokers directly. Each broker returns its configured advertise-* address that matches the port to which the initial connection has been made.

Explore your topic

To explore your topic, you can use Redpanda Console, which you deployed in the docker-compose.yml file and is running locally on port 8080. Redpanda Console is a developer-friendly web UI for managing and debugging your Redpanda cluster and your applications.

  1. Open Redpanda Console in a web browser.

    All your Redpanda brokers are listed along with their IP addresses and IDs.

  2. Go to Topics > chat-room.

    The message that you produced to the topic is displayed along with some other details about the topic.

Clean up

If you don't want to continue experimenting with your cluster, you can shut it down and delete the containers:

docker compose down

To delete the volumes along with all your cluster data, run the following:

docker compose down -v

Next steps

Suggested reading

Explore the rpk commands that you used in this quickstart:

What do you like about this doc?

Optional: Share your email address if we can contact you about your feedback.

Let us know what we do well: