Raspberry Pi KVM

For remote access to my unRAID server I found a free and open source KVM project on GitHub you can build with a Raspberry Pi. They also offer a complete pre-built version, but I already had a couple of Pi's kicking around and thought it would make a fun project.

The KVM is accessible remotely over the network and is suggested to be setup with a Zero-Trust VPN such as Tailscale or Zerotier to operate without the need for port forwarding and poking holes in the firewall.

It allows remote system management, as well as troubleshooting at a deeper level than the OS can provide, including BIOS configuration and hard system reboots.

In my configuration, I chose to also connect the front panel headers of the PC case to the breadboard shown, to maintain the functionality of the case power button and LEDs etc. while adding the functionality of the PiKVM.

GitHub: https://github.com/pikvm/pikvm

Website: https://pikvm.org/

Here's an example demo of what a complete DIY PiKVM might look like. 

The Pi's GPIO ports are used, as well as a capture card (CSI2 capture card used in the pic - I used a no-name USB one).

GPIO ports are connected to solid state relays to send power and reset commands, as well as listen to the power and HDD  usage LEDs.

Seen to the right of the image is where the jumper wires would connect to the PC's internal front-panel headers.

Circuit diagram of the DIY Pi, shown using a Pi zero but it works with either the Zero or the 4.

The zero has the benefit of not requiring a power splitter to access the USB OTG port, but drawback of no on-board Ethernet and a mini ribbon connector, and no full-size USB for a USB capture card.

The Pi 4 must use a power splitter for the data and power in, and is physically larger, but the benefit of not requiring further adapters for additional peripherals.

This is a circuit diagram of the required USB splitter for use with the Pi 4 (not required for pi zero). This is because the Pi draws more power than a typical PC can output, but the data must be wired back to the target PC to provide mouse and keyboard inputs. Therefore, the data is separated and provided with no power.

I used the official Pi 4 USB-C power supply in a female USB-C port, a USB-A to USB-C cable from my server to a second female USB-C port, and connected the power lines from the former and the data lines from the latter to a third female USB-C port. I then simply used a USB-C to USB-C male-male cable between the combined port and the Pi's input.

I chose to make my own as the ports were cheap and I already had the soldering supplies, but pre-made cables can be found online relatively cheaply too.