Skip to main content
Version: 22.3

Installing Redpanda on Windows

You can only run Redpanda directly on Linux. However, you can run Redpanda on Windows in a Docker container. This guide helps you get started with Redpanda for development and testing.

See also: Deploying for Production.

Prerequisites

Verify that you have the following software installed:

Run directly from Docker repository

The Docker image for Redpanda is hosted in Docker Hub.

To get a cluster ready for streaming, either run a single Docker container with Redpanda running, or run a cluster of three containers.

Set up a one-node cluster

Copy and paste this command to create a one-node cluster:

docker run -d --pull=always --name=redpanda-1 --rm ^
-p 8081:8081 ^
-p 8082:8082 ^
-p 9092:9092 ^
-p 9644:9644 ^
docker.redpanda.com/vectorized/redpanda:latest ^
redpanda start ^
--overprovisioned ^
--seeds "redpanda-1:33145" ^
--set redpanda.empty_seed_starts_cluster=false ^
--smp 1 ^
--memory 1G ^
--reserve-memory 0M ^
--check=false ^
--advertise-rpc-addr redpanda-1:33145

Clean up a one-node cluster

When you're finished with the cluster, shut down and delete the container:

docker stop redpanda-1 ^
docker rm redpanda-1

Set up a three-node cluster

To test out the interaction between nodes in a cluster, set up a Docker network with three containers in a cluster.

Create network and persistent volumes

Set up a bridge network, so Redpanda instances can communicate with each other but still allow for the Kafka API to be available on the localhost. You also create the persistent volumes that let the Redpanda instances keep state during instance restarts.

docker network create -d bridge redpandanet && ^
docker volume create redpanda1 && ^
docker volume create redpanda2 && ^
docker volume create redpanda3

Start Redpanda

Start the nodes for the Redpanda cluster:

docker run -d ^
--pull=always ^
--name=redpanda-1 ^
--hostname=redpanda-1 ^
--net=redpandanet ^
-p 8081:8081 ^
-p 8082:8082 ^
-p 9092:9092 ^
-p 9644:9644 ^
-v "redpanda1:/var/lib/redpanda/data" ^
docker.redpanda.com/vectorized/redpanda redpanda start ^
--smp 1 ^
--memory 1G ^
--reserve-memory 0M ^
--overprovisioned ^
--set redpanda.empty_seed_starts_cluster=false ^
--seeds "redpanda-1:33145" ^
--check=false ^
--pandaproxy-addr INSIDE://0.0.0.0:28082,OUTSIDE://0.0.0.0:8082 ^
--advertise-pandaproxy-addr INSIDE://redpanda-1:28082,OUTSIDE://localhost:8082 ^
--kafka-addr INSIDE://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092 ^
--advertise-kafka-addr INSIDE://redpanda-1:29092,OUTSIDE://localhost:9092 ^
--rpc-addr 0.0.0.0:33145 ^
--advertise-rpc-addr redpanda-1:33145 && ^

docker run -d ^
--pull=always ^
--name=redpanda-2 ^
--hostname=redpanda-2 ^
--net=redpandanet ^
-p 8083:8083 ^
-p 9093:9093 ^
-v "redpanda2:/var/lib/redpanda/data" ^
docker.redpanda.com/vectorized/redpanda redpanda start ^
--smp 1 ^
--memory 1G ^
--reserve-memory 0M ^
--overprovisioned ^
--set redpanda.empty_seed_starts_cluster=false ^
--seeds "redpanda-1:33145" ^
--check=false ^
--pandaproxy-addr INSIDE://0.0.0.0:28083,OUTSIDE://0.0.0.0:8083 ^
--advertise-pandaproxy-addr INSIDE://redpanda-2:28083,OUTSIDE://localhost:8083 ^
--kafka-addr INSIDE://0.0.0.0:29093,OUTSIDE://0.0.0.0:9093 ^
--advertise-kafka-addr INSIDE://redpanda-2:29093,OUTSIDE://localhost:9093 ^
--rpc-addr 0.0.0.0:33146 ^
--advertise-rpc-addr redpanda-2:33146 && ^

docker run -d ^
--pull=always ^
--name=redpanda-3 ^
--hostname=redpanda-3 ^
--net=redpandanet ^
-p 8084:8084 ^
-p 9094:9094 ^
-v "redpanda3:/var/lib/redpanda/data" ^
docker.redpanda.com/vectorized/redpanda redpanda start ^
--smp 1 ^
--memory 1G ^
--reserve-memory 0M ^
--overprovisioned ^
--set redpanda.empty_seed_starts_cluster=false ^
--seeds "redpanda-1:33145" ^
--check=false ^
--pandaproxy-addr INSIDE://0.0.0.0:28084,OUTSIDE://0.0.0.0:8084 ^
--advertise-pandaproxy-addr INSIDE://redpanda-3:28084,OUTSIDE://localhost:8084 ^
--kafka-addr INSIDE://0.0.0.0:29094,OUTSIDE://0.0.0.0:9094 ^
--advertise-kafka-addr INSIDE://redpanda-3:29094,OUTSIDE://localhost:9094 ^
--rpc-addr 0.0.0.0:33147 ^
--advertise-rpc-addr redpanda-3:33147

Clean up a three-node cluster

When you're finished with the cluster, shut down and delete the containers.

docker stop redpanda-1 redpanda-2 redpanda-3 && ^
docker rm redpanda-1 redpanda-2 redpanda-3

If you set up volumes and a network, delete them:

docker volume rm redpanda1 redpanda2 redpanda3 && ^
docker network rm redpandanet

Run with Docker Compose

Another way to spin up a Redpanda cluster is with a docker-compose file.

Copy this code, and save it as docker-compose.yaml:

version: '3.7'
services:
redpanda:
# NOTE: Use the latest version here!
image: docker.redpanda.com/vectorized/redpanda:latest
container_name: redpanda-1
command:
- redpanda
- start
- --smp
- '1'
- --reserve-memory
- 0M
- --overprovisioned
- --set redpanda.empty_seed_starts_cluster=false
- --seeds "redpanda-1:33145"
- --kafka-addr
- PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092
- --advertise-kafka-addr
- PLAINTEXT://redpanda:29092,OUTSIDE://localhost:9092
- --pandaproxy-addr
- PLAINTEXT://0.0.0.0:28082,OUTSIDE://0.0.0.0:8082
- --advertise-pandaproxy-addr
- PLAINTEXT://redpanda:28082,OUTSIDE://localhost:8082
- --advertise-rpc-addr redpanda-1:33145
ports:
- 8081:8081
- 8082:8082
- 9092:9092
- 28082:28082
- 29092:29092

Start up with Docker Compose

In the directory where you saved the file, open your CMD and run:

docker-compose up –d

You should see the following:

Creating redpanda-1 ... done

You can also check Docker for Desktop for any container errors.

Clean up with Docker Compose

When you're finished with the cluster, stop and remove the containers:

docker-compose down