Kafdrop is a lightweight Kafka Web UI for inspecting brokers, topics, partitions, consumer groups, and messages from your browser. If you want quick visibility into Kafka without using CLI commands for everything, Kafdrop is a practical option.
In this guide, you will install and configure Kafdrop on Linux using the JAR distribution, run it with systemd, and verify it against your Kafka cluster.
What You Will Learn
- Install Java for Kafdrop
- Download and run Kafdrop JAR
- Connect Kafdrop to Kafka brokers
- Expose Kafdrop on a custom port
- Run Kafdrop as a persistent
systemdservice - Lock down access for production
- Troubleshoot startup and connectivity issues
Kafdrop Features
- View Kafka brokers - topic and partition assignments, and controller status
- View topics - partition count, replication status, and custom configuration
- Browse messages - JSON, plain text, Avro and Protobuf encoding
- View consumer groups - per-partition parked offsets, combined and per-partition lag
- Create new topics
- View ACLs
- Support for Azure Event Hubs
Requirements
- Java 17 or newer
- Kafka (version 0.11.0 or newer) or Azure Event Hubs
Optional integration:
- Schema Registry
Kafdrop can run via JAR, Docker, or Kubernetes. This tutorial uses the JAR setup on Linux.
Related guide:
1. Install Java
Kafdrop requires Java. Install OpenJDK 17 (recommended):
| |
Verify:
| |
2. Download Kafdrop JAR
Kafdrop releases are published on GitHub: https://github.com/obsidiandynamics/kafdrop/releases
Create a directory for Kafdrop and download the latest release (example uses 3.30.0):
| |
3. Run Kafdrop from the JAR
Start Kafdrop and point it to your Kafka broker(s):
| |
If not set, kafka.brokerConnect defaults to localhost:9092.
Note: As of Kafdrop 3.10.0, a ZooKeeper connection is no longer required. All necessary cluster information is retrieved via the Kafka admin API.
Open the UI:
http://server_ip:9000/
To use a custom port:
| |
Optional runtime flags
Schema Registry:
| |
Schema Registry basic auth:
| |
Default message format:
| |
Valid format values are DEFAULT, AVRO, PROTOBUF. This can also be configured at the topic level via dropdown when viewing messages.
4. Create a systemd Service for Kafdrop
For production use, run Kafdrop in the background with systemd.
Create a dedicated system user:
| |
Create the service file:
| |
Add:
| |
Reload systemd:
| |
5. Start and Enable Kafdrop
Start the service:
| |
Check status:
| |
Enable on boot:
| |
6. Open Firewall Port (If Needed)
If you want remote browser access and use firewalld:
| |
For public environments, expose Kafdrop through a reverse proxy with authentication instead of opening it directly.
7. Secure Kafdrop in Production
Kafdrop is an admin/observability interface. Treat it as sensitive.
- Restrict network access to trusted IPs/subnets
- Put Kafdrop behind NGINX or Traefik with authentication
- Use HTTPS via reverse proxy (TLS certificates)
- Run with a dedicated low-privilege Linux user (as shown)
- Avoid exposing Kafdrop directly to the public internet
8. Navigating the Kafdrop UI
Open a browser and navigate to http://server_ip:9000/.
Cluster Overview
The landing page shows brokers, addresses, controller status, and partition ownership distribution.
Topics List
This is where you will spend most of your time. The topic list is searchable and highlights key metrics such as under-replicated partitions. A non-zero value may indicate broker, storage, or network issues.
Click any topic to open Topic Overview.
Topic Overview
The page shows:
- Topic summary and health
- Effective topic configuration
- Partition list and partition-specific drill-down
- Consumer groups and aggregate lag
Consumer View
Click a consumer group to view committed offsets, earliest/latest offsets, and lag by partition.
Message View
You can view topic messages from:
- Click the View Messages button in the Topic Overview screen.
- Click the individual partition link in the Topic Overview.
Messages are listed chronologically and include offset, key, timestamp, and headers. If a payload is valid JSON, Kafdrop can pretty-print it for easier debugging.
9. Troubleshooting Common Issues
Kafdrop does not start
- Check logs:
sudo journalctl -u kafdrop -n 100 --no-pager - Confirm Java version:
java -version - Confirm JAR path exists:
/opt/kafdrop/kafdrop.jar
Kafdrop starts but shows no topics
- Verify broker connectivity from the server host
- Confirm
--kafka.brokerConnectpoints to reachable broker endpoints - Check Kafka listener configuration (
advertised.listeners)
Browser cannot reach Kafdrop
- Confirm service is active:
sudo systemctl status kafdrop - Confirm Kafdrop is listening:
sudo ss -lntp | rg 9000 - Check firewall/security group rules
Final Thoughts
You now have a complete Kafdrop installation and production-friendly service setup on Linux. With Kafdrop in place, you can inspect topics, track consumer lag, and debug Kafka traffic much faster than using CLI-only workflows.
If you run Kafdrop in production, prioritize access control and TLS through a reverse proxy.