Homelab

Building a PiKVM, and How It Compares to an ESP32 IP KVM

November 24, 2026 · 7 min read · admin
Raspberry Pi board and ESP32-P4 chip both connected to a monitor showing a BIOS prompt, inside a dashed ip-kvm frame

An IP KVM gives you a machine’s screen, keyboard and mouse in a web browser, and it works even when the machine has no working OS. That means BIOS screens, boot menus, a fresh install or a kernel that won’t come up. Commercial units get expensive fast, but you can build one yourself.

The proven way is PiKVM on a Raspberry Pi. The newer, cheaper way is ESP-KVM on an ESP32-P4 microcontroller. Below is how to build a PiKVM step by step, followed by an honest comparison with the ESP32 approach so you can pick the right one.

How an IP KVM works

Both builds do the same three jobs. They capture the target’s HDMI output, pretend to be a USB keyboard and mouse plugged into the target, and serve both to your browser over the network. Optionally, a few optocouplers wired to the motherboard’s front-panel header let you press the power and reset buttons remotely. Nothing gets installed on the target machine.

Part 1: Building a PiKVM (DIY V2)

Parts list

  • Raspberry Pi 4, 2 GB. More RAM doesn’t help, since PiKVM uses very little. A Pi Zero 2 W works too, but has no wired Ethernet.
  • HDMI-to-CSI bridge based on the Toshiba TC358743 chip. This is the recommended capture option: lowest latency, H.264 and automatic resolution detection. A cheap USB HDMI capture dongle also works but has higher latency and MJPEG only.
  • microSD card, 16 GB or larger, Class 10.
  • Power and USB Y-splitter. On a Pi 4, only the USB-C power port can act as a USB device, so it has to carry both power and the keyboard/mouse connection to the target. The easiest route is PiKVM’s USB-C power/data splitter with an official USB-C power supply. You can also use a USB splitter with a power blocker on the target side, or solder your own Y-cable.
  • HDMI cable and Ethernet cable.
  • Optional ATX control: four optocouplers, four 390 Ω resistors, two 4.7 kΩ resistors, a breadboard and dupont wires. Don’t substitute random relay modules.

Skip the Pi 5 for this build. It has no hardware video encoder, so it can’t use the CSI bridge or H.264.

Step 1: Flash PiKVM OS

Download the PiKVM OS image for V2, Raspberry Pi 4, HDMI-CSI bridge from the PiKVM docs (the image is different for a USB dongle, so pick the right one). Flash it to the microSD card with Raspberry Pi Imager, balenaEtcher or dd, then put the card in the Pi.

Step 2: Connect the CSI bridge

With everything unplugged, open the latch on the Pi’s CAMERA connector (the one nearest the big USB ports), slide the ribbon cable fully in with the contacts facing the right way and close the latch. Don’t force it. The CSI connection isn’t hot-pluggable, so never connect or disconnect it while the Pi is powered.

Step 3: Wire it up

  1. HDMI from the target machine to the CSI bridge.
  2. The Pi’s USB-C port to a USB port on the target, through your Y-splitter.
  3. Ethernet from the Pi to your network.
  4. If you built the ATX board, wire it in parallel with the motherboard’s power button, reset button, power LED and HDD LED headers. Check your board’s pinout and LED polarity.

Step 4: First boot

Power on the Pi and leave it alone for a few minutes while it generates its SSH keys and certificates. Don’t cut power during the first boot. Find its IP address in your router’s client list (or with arp-scan --localnet), then browse to https://<ip>/.

Step 5: Change the default passwords right away

The web login defaults to admin / admin and the Linux root password defaults to root. Open the Terminal in the web UI and run:

su -
rw
passwd root
kvmd-htpasswd set admin
ro
exit

PiKVM keeps the SD card read-only to protect it from corruption, so rw unlocks it for changes and ro locks it again. Get in the habit of doing that any time you edit config.

Step 6: Use it

Click KVM on the dashboard to get the target’s screen. If you see an empty desktop, the target OS is treating PiKVM as a second monitor, so set it to mirror displays. The CSI bridge tops out at 1920×1080 at 50 Hz (60 Hz at 1080p isn’t supported), so set the target to 1080p50 or a lower resolution like 1280×720 at 60 Hz. If the picture misbehaves, PiKVM’s EDID guide is the fix.

From there you can mount ISO images as a virtual USB drive or CD-ROM to install an OS remotely. Some HP and Dell boards won’t show the virtual drive in the BIOS until you adjust PiKVM’s USB settings.

Step 7: Lock it down and keep it updated

  • Turn on two-factor authentication for the web UI.
  • For access from outside your house, use Tailscale or another VPN. Don’t port-forward a KVM to the internet. Anyone who gets into it effectively has physical access to that machine.
  • Update with pikvm-update as root, ideally when you can physically reach the SD card in case something goes wrong.
  • Put custom settings in /etc/kvmd/override.yaml, not the main config file, so updates don’t overwrite them.

Part 2: The ESP32 alternative (ESP-KVM)

One clarification first: an ordinary ESP32 can’t do this. It has no way to take in video. The projects that work use the newer ESP32-P4, which has a MIPI CSI camera interface, hardware JPEG and H.264 encoders and USB OTG. Simpler ESP32-S3 “KVM” projects only forward keyboard and mouse, with no video, which isn’t the same thing.

The leading project is ESP-KVM, an open-source (Apache 2.0) firmware built on Jonathan Rowny’s earlier p4kvm work. It uses the same TC358743 HDMI-to-CSI bridge that PiKVM recommends, wired to an ESP32-P4 board instead of a Pi. There’s no Linux at all: the whole thing is about a megabyte of firmware.

Building one

  1. Get an ESP32-P4 board with Ethernet (the Waveshare ESP32-P4-ETH is the default target) and a TC358743 capture board such as the Geekworm C790, plus a CSI ribbon cable. All-in, it’s around $45. No soldering is needed.
  2. Flash the firmware straight from Chrome or Edge at espkvm.io/flash, or with esptool. Newer rev 3.x chips need their own firmware image.
  3. Connect Ethernet, the target’s HDMI and the board’s USB OTG port to the target. Which USB port is OTG depends on the board, so check the project’s board list.
  4. Browse to https://espkvm.local/, sign in as admin / admin and set a new password, which it forces you to do.
  5. Optionally add an optocoupler module for remote power and reset.

PiKVM vs ESP32-P4 KVM, side by side

PiKVM (DIY V2, Pi 4)ESP-KVM (ESP32-P4)
Approximate costRoughly $80 to $120 depending on Pi prices and splitter choiceAround $45
BrainsFull Linux (Arch-based PiKVM OS)Bare-metal firmware, about 1 MB
Video captureTC358743 HDMI-to-CSITC358743 HDMI-to-CSI
Max video1080p at 50 Hz, H.264 or MJPEG1080p MJPEG at about 20 fps; H.264 at 25 to 27 fps on rev 3.x chips, about 7 fps on rev 1.x
SetupFlash SD card, assemble Y-splitterFlash from the browser, no soldering
Virtual mediaMature ISO/USB drive emulationBoots images from microSD or flash
Power controlDIY ATX board, or official HATsOptocoupler or relay, plus Wake-on-LAN
Security2FA, mature and widely deployedLogin, 2FA and TLS, but no external security review, unsigned updates and secure boot off
Remote accessTailscale and many pluginsTailscale and WireGuard built in, off by default
Boot time and powerLinux boot, a few wattsNear-instant, very low power
MaturityYears of development, large community, commercial versionsNew and moving fast; several boards still untested

Where they’re the same

Both use the same TC358743 capture chip, both show up to the target as a plain USB keyboard and mouse, both work from the BIOS up with nothing installed on the target, and both run in a browser with no client software. Both also need the same care around security: keep them off the public internet and reach them through a VPN.

Where they differ

PiKVM is the mature, flexible option. Because it’s a full Linux box, you get an SSH shell, plugins, extensive docs, a big community and years of bug fixes. That flexibility also means more moving parts: an SD card that can corrupt, a longer boot and an OS to keep updated.

ESP-KVM is the cheap, minimal option. It costs roughly half as much, boots almost instantly, sips power and has a tiny attack surface with no general-purpose OS underneath. The trade-off is maturity. It’s young, video performance depends on which chip revision you get, and its own developers are upfront that it hasn’t had an outside security review and shouldn’t be exposed to the internet.

Which one should you build?

  • Build a PiKVM for anything you depend on: a production server, a client’s machine or your main homelab host. It’s proven, well documented and has the most features.
  • Build an ESP-KVM if you want a KVM on every box in the rack without spending much, enjoy tinkering with new hardware, or just need occasional BIOS access on a trusted network.

Honestly, at these prices there’s a good case for both: a PiKVM on the machines that matter most, and ESP-KVMs on everything else.

Leave a Reply

Your email address will not be published. Required fields are marked *