Turn your Raspberry Pi into a browser-based KVM.
- Raspberry Pi OS Stretch or later
- python3-venv
All-in-one kits are available from tinypilotkvm.com.
- 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)
- microSD card (Class 10, 8 GB or larger)
- HDMI to HDMI cable
- Or [other] to HDMI, depending on how your target machine displays output.
- (Optional) VGA to HDMI Adapter
- If your target computer has VGA output, the above adapter is confirmed to work with TinyPilot.
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 \
--silent \
--show-error \
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
:
To choose configuration options for the install, specify them in the TINYPILOT_INSTALL_VARS
environment variable.
Possible variables are available in:
Here's an example that installs TinyPilot with a desired capture resolution of 1280x720 and chooses the 1.0.2 version of TinyPilot.
export TINYPILOT_INSTALL_VARS="ustreamer_resolution=1280x720 tinypilot_repo_branch=1.0.2"
curl \
--silent \
--show-error \
https://raw.githubusercontent.com/mtlynch/tinypilot/master/quick-install | \
bash - && \
sudo reboot
To apply these installation options on every update, add them to your .bashrc
file:
echo 'export TINYPILOT_INSTALL_VARS="ustreamer_resolution=1280x720 tinypilot_repo_branch=1.0.2"' >> ~/.bashrc
. ~/.bashrc
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 interested 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
npm install [email protected]
To run TinyPilot's build scripts, run:
./dev-scripts/build
To enable TinyPilot's Git hooks, run:
./hooks/enable_hooks
To run TinyPilot on a non-Pi machine, run:
PORT=8000 KEYBOARD_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. |
KEYBOARD_PATH |
/dev/hidg0 |
Path to keyboard HID interface. |
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.
You can increase the lifetime of your microSD card and reduce the risk of filesystem corruption from unplanned shutdowns by enabling read-only mode on your Pi.
As the name implies, the read-only filesystem makes it so that no writes to the filesystem persist across reboots. To perform system updates or make permanent changes to your TinyPilot, you'll need to disable the read-only filesystem.
To enable read-only mode / overlay filesystem:
sudo raspi-config
- Choose
7 - Advanced options
- Choose
AB - Overlay FS
- When prompted, "Would you like the overlay file system to be enabled?" choose "Yes"
- When prompted "Would you like the boot partition to be write-protected?" choose "No"
- Choose "Finish"
- When prompted "Would you like to reboot now?" choose "Yes"
Read-only mode slows down the boot process, so don't worry if your reboot takes 2-3x as long as normal.
To disable read-only mode, follow the same steps as above, but when prompted, "Would you like the overlay file system to be enabled?" choose "No".
Alternatively, you can use the overlayfs script to control this behavior without leaving the command-line.
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:
If you're interested in seeing what's happening with the project at a granular level, weekly updates appear every Friday on What Got Done:
- TinyPilot Ansible Role: Use Ansible to install TinyPilot and all dependencies as a systemd service.
For news about major TinyPilot releases and other updates about the project, sign up for the TinyPilot mailing list: