Railway

Deploy Kafka + Kafka UI (KRaft)

Single-node Kafka in KRaft mode with Kafka UI on Railway

Deploy Kafka + Kafka UI (KRaft)

Just deployed

Just deployed

/var/lib/kafka/data

Deploy and Host Kafka + Kafka UI (KRaft) on Railway

Kafka + Kafka UI (KRaft) is a simple Railway template that deploys Apache Kafka in modern ZooKeeper-free KRaft mode together with Kafka UI for browser-based management. It is ideal for development, testing, prototypes, and small internal workloads that need a lightweight event streaming setup with persistent storage and an easy admin interface.

About Hosting Kafka + Kafka UI (KRaft)

This template deploys a single-node Kafka broker running in KRaft mode, plus Kafka UI for managing brokers, topics, and consumers from a web interface. It is designed for teams that want to start quickly on Railway without setting up ZooKeeper or a multi-node Kafka cluster. Persistent storage is included for Kafka data, and the configuration is optimized for internal development and small workloads. This setup is best suited for dev environments, prototypes, small internal queues, async processing pipelines, and event-driven services. It is not intended for high-availability production workloads that require multiple brokers and replication across nodes.

Common Use Cases

  • Event-driven development and internal microservice communication
  • Queueing background jobs and async workflows
  • Learning, testing, and prototyping with Kafka on Railway

Dependencies for Kafka + Kafka UI (KRaft) Hosting

  • Apache Kafka running in single-node KRaft mode
  • Kafka UI for browser-based cluster management

Deployment Dependencies

Implementation Details

This template uses a single Kafka node in combined broker/controller KRaft mode.

Example Kafka configuration used in this template:

KAFKA_NODE_ID="1"
KAFKA_PROCESS_ROLES="broker,controller"
KAFKA_CONTROLLER_LISTENER_NAMES="CONTROLLER"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP="PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT"
KAFKA_LISTENERS="PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093"
KAFKA_ADVERTISED_LISTENERS="PLAINTEXT://${{cp-kafka.RAILWAY_PRIVATE_DOMAIN}}:9092"
KAFKA_INTER_BROKER_LISTENER_NAME="PLAINTEXT"
KAFKA_CONTROLLER_QUORUM_VOTERS="1@${{cp-kafka.RAILWAY_PRIVATE_DOMAIN}}:9093"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR="1"
KAFKA_LOG_DIRS="/var/lib/kafka/data/kraft-combined-logs"
CLUSTER_ID="MkU3OEVBNTcwNTJENDM2Qk"
RAILWAY_RUN_UID="0"

Kafka UI connects internally using the Kafka private Railway domain and exposes a simple web interface for cluster inspection and topic management.

Why Deploy Kafka + Kafka UI (KRaft) on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Kafka + Kafka UI (KRaft) on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
smoothmq
A drop-in replacement for AWS SQS

poundifdef
View Template
Maildev
Ephemeral SMTP server for development purposes.

Six
View Template
Huey [Updated Mar ’26]
Huey [Mar ’26] (Run Background Tasks & Schedule Jobs) Self Host

shinyduo