Turn your Raspberry Pi into a browser-based KVM.
- Raspberry Pi OS Stretch or later
- python3-venv
- Raspberry Pi 4 (all variants work)
- HDMI to USB dongle
- It has no brand name, but you can identify them by sight.
- They're available for $10-15 on eBay.
- USB-C to USB-A cable (Male/Male)
- USB to TTL serial cable
- 3 Amp USB wall charger
- microSD card (Class 10, 8 GB or larger)
- HDMI to HDMI cable
- Or [other] to HDMI, depending on how your target machine displays output.
See "TinyPilot: Build a KVM Over IP for Under $100" for a more detailed tutorial on how to assemble these parts to create a TinyPilot.
The following installation steps:
- Create a service account for TinyPilot with limited priviliges.
- Install TinyPilot as a systemd service so it runs automatically on every boot.
- Install TinyPilot's dependencies.
From your Raspberry Pi device, run the following commands:
curl -sSL https://raw.githubusercontent.com/mtlynch/tinypilot/master/quick-install | bash -
sudo reboot
When your Pi reboots, you should be able to access TinyPilot by visiting your Pi hostname in the browser. For example, if your device is named raspberrypi
:
If you have Ansible installed on your local machine, you can configure TinyPilot on a Raspberry Pi device using the TinyPilot Ansible role. To configure TinyPilot remotely, run the following commands from your Ansible control node:
PI_HOSTNAME="raspberrypi" # Change to your pi's hostname
PI_SSH_USERNAME="pi" # Change to your Pi username
# Install the TinyPilot Ansible role
ansible-galaxy install mtlynch.tinypilot
# Create a minimal Ansible playbook to configure your Pi
echo "- hosts: $PI_HOSTNAME
roles:
- role: mtlynch.tinypilot" > install.yml
ansible-playbook \
--inventory "$PI_HOSTNAME", \
--user "$PI_SSH_USERNAME" \
--ask-pass \
--become \
--become-method sudo \
install.yml
ansible \
"$PI_HOSTNAME" \
-m reboot \
--inventory "$PI_HOSTNAME", \
--user "$PI_SSH_USERNAME" \
--ask-pass \
--become \
--become-method sudo
After running these commands, you should be able to access TinyPilot through a web browser at:
If you're interesting in contributing to TinyPilot, follow these instructions to install the required developer packages in your development environment:
python3.7 -m venv venv
. venv/bin/activate
pip install --requirement requirements.txt
pip install --requirement dev_requirements.txt
hooks/enable_hooks
To run TinyPilot's build scripts, run:
./build
To enable TinyPilot's Git hooks, run:
./hooks/enable_hooks
To run TinyPilot on a non-Pi machine, run:
PORT=8000 HID_PATH=/dev/null ./app/main.py
TinyPilot accepts various options through environment variables:
Environment Variable | Default | Description |
---|---|---|
HOST |
0.0.0.0 |
Network interface to listen for incoming connections. |
PORT |
8000 |
HTTP port to listen for incoming connections. |
HID_PATH |
/dev/hidg0 |
Path to keyboard HID interface. |
CORS_ORIGIN |
http://${HOSTNAME} |
Origin from which TinyPilot should allow CORS requests. |
The installation script is idempotent, so you can upgrade to the latest stable release of TinyPilot and its dependencies by just re-running the quick install script.
TinyPilot does not support authentication. You should only use TinyPilot on networks that you trust. Anyone who accesses the TinyPilot URL can shutdown or restart your Pi and type arbitrary commands into the device to which your Pi is connected.
If you need authentication, the simplest solution would be to adjust your Nginx configuration (included by default with the installation) to require HTTP Basic Authentication.
If this project is useful to you, consider making a financial contribution to support its development:
- TinyPilot Ansible Role: Use Ansible to install TinyPilot and all dependencies as a systemd service.