Back to all templates
Apache Kafka logo

Apache Kafka

Database1024MB+ RAM

Distributed event streaming platform with KRaft mode (no Zookeeper)

messagingstreamingevent-drivenqueue

Deploy Apache Kafka in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select Apache Kafka

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
Do It Yourself

Deploy Apache Kafka via Command Line

Prefer the command line? Follow this step-by-step guide to deploy Apache Kafka manually on your VPS.

1

Open a Terminal Connection

Start by opening a terminal window and connecting to your VPS via SSH.

terminal
# Connect to your VPS
ssh root@your-server-ip

# Or with a specific SSH key
ssh -i ~/.ssh/your-key root@your-server-ip

First time? Docker required! Install it with: curl -fsSL https://get.docker.com | sh

2

Create Application Directory

Create a dedicated space for your application deployment.

terminal
# Create and navigate to project directory
mkdir -p ~/apps/kafka
cd ~/apps/kafka
3

Create Deployment Configuration

Create a docker-compose.yml file with the following configuration:

docker-compose.yml
services:
  kafka:
    image: apache/kafka:latest
    ports:
      - "9092:9092"
    environment:
      - KAFKA_NODE_ID=1
      - KAFKA_PROCESS_ROLES=broker,controller
      - KAFKA_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
      - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092
      - KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER
      - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
      - KAFKA_CONTROLLER_QUORUM_VOTERS=1@localhost:9093
      - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
      - KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1
      - KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1
      - KAFKA_LOG_DIRS=/var/lib/kafka/data
    volumes:
      - kafka_data:/var/lib/kafka/data
    restart: unless-stopped

volumes:
  kafka_data:
Configuration Variables
PORTKafka port(default: 9092)
4

Launch Your Application

Deploy the stack and monitor the startup process.

terminal
# Spin up containers
docker compose up -d

# Verify deployment
docker compose ps

# Check logs for errors
docker compose logs -f
5

Enable External Access

Set up firewall rules to permit incoming connections.

terminal
# Allow the application port through firewall
sudo ufw allow 9092/tcp
sudo ufw reload

# Access your app at:
# http://your-server-ip:9092
Skip the Terminal

Skip the command line. Deploy visually.

Deploy Apache Kafka with a beautiful UI instead. No SSH, no YAML editing, no terminal commands. Just click, configure, and deploy in under 3 minutes.

  • Visual config editor
  • Instant deployment
  • Automatic HTTPS
  • Smooth updates
  • Live monitoring
  • Quick rollbacks
Download Server Compass$29 one-time • Lifetime license

After Deployment

After deploying Apache Kafka with Server Compass, complete these steps to finish setup

1

Create topics

2

Test with kafka-console-producer and kafka-console-consumer

3

Configure retention policies

Need help? Check out our documentation for detailed guides.

Apache Kafka FAQ

Common questions about self-hosting Apache Kafka

How do I deploy Apache Kafka with Server Compass?

Simply download Server Compass, connect to your VPS, and select Apache Kafka from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.

What are the system requirements for Apache Kafka?

Apache Kafka requires a minimum of 1024MB RAM. We recommend a VPS with at least 2048MB RAM for optimal performance. Any modern Linux server with Docker support will work.

Can I migrate my existing Apache Kafka data?

Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard Apache Kafka backup and restore procedures.

How do I update Apache Kafka to the latest version?

Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest Apache Kafka image will be pulled and deployed with zero downtime.

Is Apache Kafka free to self-host?

Apache Kafka is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.

Ready to Self-Host Apache Kafka?

Download Server Compass and deploy Apache Kafka to your VPS in under 3 minutes. No Docker expertise required.

Download Server Compass