2
0
mirror of https://github.com/pikvm/pikvm synced 2024-11-16 12:12:57 +00:00
pikvm/README.md

439 lines
26 KiB
Markdown
Raw Normal View History

# Open and cheap DIY IP-KVM based on Raspberry Pi
Join the comunity chat for questions and support!
2020-07-24 21:54:08 +00:00
2020-07-24 21:52:28 +00:00
[![Discord](https://img.shields.io/discord/580094191938437144?logo=discord)](https://discord.gg/bpmXfz5)
-----
2020-05-11 03:27:27 +00:00
A very simple and fully functional Raspberry Pi-based IP-KVM that you can make with your own hands. This device helps to manage servers or workstations remotely, regardless of the health of the operating system or whether one is installed. You can fix any problem, configure the BIOS, or even reinstall the OS using the included CD-ROM or Flash Drive emulation.
2019-09-12 10:15:37 +00:00
2019-12-02 22:41:06 +00:00
![Screenshot](screen1.png)
2019-09-12 10:15:37 +00:00
2020-07-24 21:52:28 +00:00
-----
2020-07-24 20:05:19 +00:00
## Fully-featured and modern IP-KVM
2020-07-24 14:18:16 +00:00
* **Cheaper, but better than commercial solutions**
Costs between $30 and $100 depending on the features desired. Even the most expensive configuration will be cheaper than a $500 commercial IP-KVM.
2020-07-24 17:46:16 +00:00
* **Easy to build**
A ready-to-use OS that can be created just by running `make build` and installed to an SD-card using `make install`. The hardware can be made in half an hour and without soldering.
2020-07-24 14:07:39 +00:00
* **The widest hardware support**
2020-07-26 13:06:26 +00:00
There are many ways to build a Pi-KVM. Video capture devices can be attached using the CSI-2 or USB interfaces. Raspberry Pi models 2, 3, 4, or ZeroW may be used. Any combination of hardware is supported, and Pi-KVM implements the maximum possible set of features.
2020-07-24 14:18:51 +00:00
* **Very low latency**
2020-07-24 14:08:32 +00:00
~100 milliseconds of video latency. This is the smallest delay of all existing solutions.
* **Extra lightweight and fancy Web UI**
No weird proprietary clients. No ugly Java applets. Just use your favorite browser to connect to the Pi-KVM. No flash plugins either!
2020-07-24 14:07:39 +00:00
* **Keyboard and mouse**
Mouse usage works directly in the browser. The keyboard emulator supports displaying the state of the keyboard LEDs.
2020-07-24 14:07:39 +00:00
* **Mass Storage Drive**
2020-07-26 13:06:26 +00:00
On the Raspberry Pi 4 and ZeroW, Pi-KVM can emulate a virtual CD-ROM or Flash Drive. A live image can be uploaded to boot the attached server.
2020-07-24 19:18:19 +00:00
* **ATX power management**
With a very simple circuit that can be assembled on a breadboard, the power button of the attached server can be controlled using the ATX button headers on the motherboard.
2020-07-24 19:18:19 +00:00
* **Security**
Pi-KVM can be opened to the Internet and no one will get access without the password. SSL encryption is used to protect traffic from being intercepted by third parties.
2020-07-24 14:14:50 +00:00
* **Local monitoring**
Pi-KVM monitors the health of the Raspberry Pi board and will warn you if it's too hot or is not receiving enough power.
2020-07-24 14:07:39 +00:00
## Production-ready
2020-07-24 14:07:39 +00:00
* **Linux-based embedded OS**
The Pi-KVM OS is based on [Arch Linux ARM](https://archlinuxarm.org) and can be customized for any needs. Thousands of pre-built binary packages are at your service and can be updated with a single command!
2020-07-24 14:07:39 +00:00
* **Read-only filesystem**
By default the OS runs in read-only mode, as an embedded system should. This prevents damage to the memory card due to a sudden power outage.
2020-07-24 14:07:39 +00:00
* **VNC server**
2020-07-24 19:18:19 +00:00
The managed server and its BIOS can be accessed using a regular VNC client which supports JPEG compression.
2020-07-24 14:07:39 +00:00
* **IPMI BMC**
Use `ipmitool`, `ipmiutil` or any existing network infrastructure that supports IPMI to monitor and manage the server's power.
2020-07-24 22:20:27 +00:00
* **Wake-on-LAN**
2020-07-24 21:50:22 +00:00
Pi-KVM can be configured to power up a managed server using WoL. This will be available in the Web menu.
2020-07-24 14:07:39 +00:00
* **Extensible authorization methods**
Multiple Pi-KVMs can be configured to use a [common authorization service](https://github.com/pikvm/kvmd-auth-server). PAM and its rich authorization mechanisms can also be used to integrate Pi-KVM into your existing authentication infrastructure.
2020-07-24 14:07:39 +00:00
* **Macro scripts**
If repetitive actions must be perfromed on the attached server (or on several different servers), a macro can be recorded with keyboard & mouse actions and can be played back mutiple times.
2020-07-24 14:07:39 +00:00
2020-07-24 20:05:19 +00:00
2020-07-24 19:18:19 +00:00
## Open Source
* **Community & support**
Pi-KVM has a large community. Join the [discord chat](https://discord.gg/bpmXfz5) if you have any questions.
2020-07-24 14:07:39 +00:00
* **Extensible**
Pi-KVM was designed as a set of microservices with a plug-in architecture. It's very easy to modify and maintain.
* **Comprehensive API**
Everything that can be done via the user interface can also be done via a powerful HTTP API.
2020-07-24 19:18:19 +00:00
* **Know-how**
We created [our very own MJPG video server](https://github.com/pikvm/ustreamer) written in C with multi-threading support and GPU video encoding - the fastest streaming solution available to provide the best video quality for Pi-KVM. We also tested a lot of hardware configurations so that you can be sure devices you assemble will work reliably.
2020-07-24 14:07:39 +00:00
2020-07-26 15:06:37 +00:00
# Note
This project is developed on a non-commercial basis by Open Source enthusiasts. If you find Pi-KVM useful or it has saved you a long trip to check on an unresponsive server, you can support the lead developer by donating a few dollars via [Patreon](https://www.patreon.com/pikvm) or [PayPal](https://www.paypal.me/mdevaev). With this money, he will be able to buy new hardware (Raspberry Pi boards and other components) to test and maintain various configurations of Pi-KVM, and generally devote significantly more time to the project. At the bottom of this page are the names of all the people who have helped this project develop with their donations. Our gratitude knows no bounds!
2020-05-20 11:41:26 +00:00
If you wish to use Pi-KVM in production, we accept orders to modify it for your needs or implement custom features you require. Contact us via live chat or email the lead developer at: mdevaev@gmail.com
2020-05-20 11:41:26 +00:00
2020-07-26 15:06:37 +00:00
# FAQ
2020-07-24 20:05:19 +00:00
**Q**: **What is the status of this project?**
**A:** Although this page is rarely updated, the project is actively maintained and developed. You can verify this by checking the activity in our other repositories.
2020-07-23 21:37:30 +00:00
2020-07-26 15:25:09 +00:00
**Q:** **Does this support the HDMI-USB dongle from [AliExpress](https://aliexpress.ru/item/4001043540669.html)?**
**A:** Yes, and Pi-KVM works great with it. However, we recommend to use [HDMI-CSI bridge](https://aliexpress.ru/item/4000102166176.html) because the USB dongle has several major disadvantages compared to it: USB gives a lot of latency (200ms vs 100ms) and it doesn't support stream compression control (you won't be able to use Pi-KVM in a place with a poor internet connection). It also cannot automatically detect screen resolution. All this is caused by the hardware limitations of the dongle itself. **It may be used, but the loss of these features is probably not worth the ten dollars saved.**
2020-07-23 21:37:30 +00:00
2020-07-25 04:46:49 +00:00
**Q:** **Can I connect multiple servers to a single Pi-KVM?**
**A:** Yes, but it will require additional work to set up. Pi-KVM can be connected to a multi-port HDMI/USB switch and the switch's buttons can be connected via optocouplers to the Pi's GPIO pins to switch channels. If your KVM switches channels using keyboard shortcuts, there is a chance that it will not be able to work with OTG (v2 platform, see bellow), since it does not fully implement the USB stack. In this case, you will have to use an Arduino board to emulate the keyboard & mouse. (Pi-KVM supports this configuration)
2020-07-25 04:43:28 +00:00
2020-07-26 15:06:37 +00:00
**Q:** **Can I use Pi-KVM with non-Raspberry Pi boards?**
2020-07-26 15:13:31 +00:00
**A:** Yes, but you will have to prepare the board OS yourself. As for the Pi-KVM software, you will need to replace the RPi.GPIO module and some files (such as UDEV rules). If you are a developer or an experienced system administrator, you will not have any problems with this. In addition, we are open to patches. If you need help with this, please contact us via Discod: https://discord.gg/bpmXfz5
2020-07-26 15:06:37 +00:00
2020-07-24 21:52:28 +00:00
-----
2019-09-15 18:07:52 +00:00
2020-07-28 14:04:28 +00:00
# Limitations
2020-07-28 14:19:07 +00:00
* In very rare cases, old motherboards contain a buggy BIOS that not understand the keyboard of **v2** platform (bellow). The reason is that BIOS doesn't fully implement the USB HID stack for composite devices correctly. Meanwhile, Mass Storage Drive will be detected. For this case, we suggest using the Arduino HID from the **v0** platform with **v2**. Thus the Pi-KVM will be connected by two USB cables to the motherboard: one of them will be responsible for the keyboard and mouse, the other for everything else. See [Tips](#tips) for details.
2020-07-28 14:04:28 +00:00
* A similar problem can be observed on devices with UEFI: the keyboard works fine, but the mouse does not work. This problem is much less significant, since all UEFI can be configured using the keyboard and hotkeys, without the mouse. If you want to get a mouse, the solution will be the same: using an Arduino HID, as in the advice above.
2020-07-28 14:19:07 +00:00
Our future [v3 platform](#the-future-v3-platform-work-in-progress) will contain an optional HID module for such cases, so you won't have to build anything yourself.
2020-07-28 14:04:28 +00:00
-----
2020-07-24 21:50:22 +00:00
# Required hardware
Pi-KVM supports several different hardware configurations, referred to as **platforms**. At the moment, there are two main ones: **v0** and **v2**.
* **v0** was designed to work with Raspberry Pi boards that do not have OTG (**Raspberry Pi 2** and **3**) and requires a few more components for a basic implementation. It also does not support the Mass Storage Drive feature.
2020-07-26 13:06:26 +00:00
* **v2** is the most modern implementation supporting all of the features of Pi-KVM. It was designed to work with the **Raspberry Pi 4** and **ZeroW**.
2020-07-24 21:50:22 +00:00
2020-07-26 12:58:47 +00:00
**It is recomended to buid v2 since it supports all features including the Mass Storage Drive feature. It's also the easiest to make.**
2020-07-24 21:50:22 +00:00
2020-07-26 18:36:20 +00:00
## Hardware for v2
2020-07-26 15:34:18 +00:00
* Raspberry Pi 4 (2 GB model is enough) or ZeroW. The Pi 4 is recomended because the ZeroW is very slow.
* MicroSD card (min 16 GB recommended).
2020-07-26 09:41:52 +00:00
* USB-A 3A charger (female socket) or power supply.
2020-07-26 12:58:47 +00:00
* Video capture device:
2020-07-26 15:34:18 +00:00
* **Recommended**: [HDMI to CSI-2 bridge based on TC358743](https://aliexpress.com/item/4000102166176.html) - it supports the compression control, has a lowest video latency for ~100ms, and may determine the source resolution; see the FAQ above for the explanation.
2020-07-26 18:36:20 +00:00
* An alternative (not available for ZeroW): [HDMI to USB dongle](https://aliexpress.ru/item/4001043540669.html) - high video latency ~200ms, no compression control, can't detect the source resolution.
2020-07-24 21:50:22 +00:00
* Only for Raspberry Pi 4:
2020-07-24 22:10:05 +00:00
* Parts for Y-splitter cable:
2020-07-26 09:41:52 +00:00
- 1x USB-A to USB-C cable (male-male).
- 1x another cable USB-A to any (male-...).
2020-07-26 13:06:26 +00:00
* Only for Raspberry Pi ZeroW:
2020-07-26 09:41:52 +00:00
* 2x USB A-to-micro cables (male-male, for power and keyboard & mouse emulator).
2020-07-24 22:20:27 +00:00
* For ATX control (optional):
- [4x MOSFET relays OMRON G3VM-61A1](https://www.digikey.com/products/en?keywords=G3VM-61A1).
2020-07-24 21:50:22 +00:00
- 4x 390 Ohm resistors.
- 2x 4.7k Ohm resistors.
2020-07-26 09:41:52 +00:00
- A breadboard and wires.
2019-09-12 10:29:05 +00:00
2020-07-26 18:36:20 +00:00
## Hardware for v0
2020-07-24 21:50:22 +00:00
* Raspberry Pi 2 or 3.
* MicroSD card (8 GB is enough).
2020-07-26 09:41:52 +00:00
* USB-A 3A charger (female socket) or power supply.
2020-07-24 22:20:27 +00:00
* For keyboard & mouse emulator (HID):
- Arduino Pro Micro (based on an ATMega32u4).
- [Logic level shifter](https://www.sparkfun.com/products/12009).
2020-07-24 21:50:22 +00:00
- NPN transistor (almost any NPN transistor: 2n2222 or similar).
- 1x 390 Ohm resistor.
2020-07-26 09:41:52 +00:00
- A breadboard and wires.
* 2x USB A-to-micro cables (male-male, for power and HID).
2020-07-24 21:50:22 +00:00
* HDMI capture device: see v2 description.
* ATX control (optional): see v2 description.
2020-07-26 18:36:20 +00:00
## Addition
* If you want to capture VGA from your server instead of HDMI, buy the [VGA-to-HDMI converter](https://aliexpress.ru/item/4000553298530.html).
* Pi-KVM can be powered using PoE, but it is not recommend to use the official PoE HAT: it is unreliable and [not compatible with the HDMI bridge](https://github.com/pikvm/pikvm/issues/6). Use any other PoE hat without an I2C fan controller.
* **Don't use random relay modules or random optocouplers!** Some relays or optocouplers may not be sensitive enough for the Raspberry Pi, some others may be low-level controlled. Either use relays that are activated by a high logic level, or follow the design provided and buy an OMRON. See details [here](https://github.com/pikvm/pikvm/issues/13).
2020-07-25 03:56:53 +00:00
<img src="no_relays.png" alt="drawing" width="100"/>
2020-05-11 18:50:02 +00:00
2020-07-24 21:52:28 +00:00
-----
2020-07-25 01:34:02 +00:00
# The future v3 platform (work in progress)
2020-07-25 01:53:04 +00:00
<img src="v3_board.png" alt="drawing" width=300/></td>
2020-07-25 01:34:02 +00:00
We are also currently developing our own HAT for the Raspberry Pi 4. It will have all the features of the v2 platform, including:
* HDMI capture based on the TC358743 (extra low latency and many features like compression control).
* OTG Keyboard & mouse; Mass Storage Drive emulation.
* Ability to simulate "removal and insertion" for USB.
* Onboard ATX power control.
* An RTC clock.
2020-07-25 01:34:02 +00:00
* CISCO-style and USB serial console port (to manage Pi-KVM OS or to connect with the server).
* Optional AVR-based HID (for some rare and strange motherboards whose BIOS doesn't understand the OTG emulated keyboard).
* Optional OLED screen to display network status or other desired information.
* No need for soldering or other assembly. It's a ready-made, reliable board which you can use yourself or provide to your clients.
* Continued use of Pi-KVM OS - all the software will be fully open.
2020-07-25 01:34:02 +00:00
* It will cost about $100 - or less, we are working to make it as cheap as possible.
2020-07-27 05:11:36 +00:00
Sounds interesting? [Subscribe in this form](https://docs.google.com/forms/d/1LA6iEYVtbJULvMDNktyNQMI4N9SYdNG03Wh9WK-80cM) or join to https://discord.gg/bpmXfz5 and we will let you know when you can purchase the board. Prototypes will be ready in Q4 2020, and pre-orders will be available sooner. If you are considering ordering a wholesale lot, please email to mdevaev@gmail.com.
2020-07-25 01:34:02 +00:00
-----
2019-12-02 22:41:06 +00:00
# Setting up the hardware
2020-07-26 18:36:20 +00:00
## Connecting the video capture
#### For the HDMI-CSI bridge
Insert the flexible flat cable of the HDMI bridge into the narrow white connector on the Raspberry Pi (the closest one to big USB sockets). Use only the cable that was included with the device package, or make sure that the third-party cable has the correct pinout.
2019-12-14 01:11:33 +00:00
2020-07-26 18:36:20 +00:00
#### For the HDMI-USB dongle
2020-07-26 12:58:47 +00:00
Connect USB dongle to exactly this port. It is bound in the software so the OS does not confuse the video device with something else.
2020-07-26 18:36:20 +00:00
| Raspberry Pi 2 and 3 | Raspberry Pi 4 |
|----------------------|----------------|
| <img src="v2_usbcap_rpi2.png" alt="drawing" width="200"/> | <img src="v2_usbcap_rpi4.png" alt="drawing" width="200"/> |
2020-07-26 14:46:24 +00:00
2020-07-26 18:36:20 +00:00
## v2 Diagram
Here is a diagram shows that how to connect all of the pieces (click to full size).
2020-07-26 14:46:24 +00:00
2020-07-26 18:36:20 +00:00
<img src="v2.png" alt="drawing" width="400"/>
2020-07-26 12:58:47 +00:00
**Raspberry Pi 4 note**: since one USB-C female connector is used to receive power and perform keyboard/mouse/drive emulation a special Y-cable must be made that splits the DATA and POWER lines of USB-C (see [reasons](https://github.com/pikvm/docs/issues/11)). It can be made from two suitable connecting cables, or soldered together from scratch. Be sure to check the circuit diagram below, otherwise you may damage your devices. The appropriate USB pinout(s) can easily be found on Google. Please note that if you make a Y-cable from two no-name cables, the colors of the wires may not match those shown. Use a multimeter to make sure the connections are correct.
2019-12-14 01:11:33 +00:00
2019-12-14 01:02:20 +00:00
<img src="v2_splitter.png" alt="drawing" width="400"/>
2020-07-24 21:50:22 +00:00
See video howtos:
* [Making USB Y-splitter cable](https://www.youtube.com/watch?v=uLuBuQUF61o).
* [Soldering ATX controller](https://www.youtube.com/watch?v=hKnKOuH_f8M).
Also check out this small PCB for ATX (if you know how to make PCBs): https://easyeda.com/mark.gilbert/zerow-kvm-v1
2020-04-30 15:41:20 +00:00
2020-07-24 21:50:22 +00:00
## v0 Diagram
<img src="v0.png" alt="drawing" width="400"/>
2020-07-24 21:52:28 +00:00
-----
2020-05-04 02:25:31 +00:00
# Building the OS
The Pi-KVM OS is based on Arch Linux ARM and contains all the required packages and configs for it to work. To build the OS you will need any Linux machine with a recent version of Docker (>= 1:19) with privileged mode enabled. (used for fdisk and some other commands, have a look through our Makefiles if you don't trust us :) )
2019-09-14 02:22:15 +00:00
0. When starting with a clean OS (Like Ubuntu 18) you need to install and configure docker (after adding your user to the docker group you must log out and log back in), as well as git and make.
2019-09-15 16:43:09 +00:00
```shell
2019-12-02 22:51:24 +00:00
[user@localhost ~]$ sudo apt-get install git make curl binutils -y
2019-09-19 23:55:37 +00:00
[user@localhost ~]$ curl -fsSL https://get.docker.com -o get-docker.sh
[user@localhost ~]$ sudo sh get-docker.sh
2020-02-18 10:11:17 +00:00
[user@localhost ~]$ sudo usermod -aG docker $USER
2019-09-15 16:43:09 +00:00
```
Re-login to apply the changes.
2019-09-15 16:43:09 +00:00
1. Git checkout the build toolchain:
2019-09-14 02:22:15 +00:00
```shell
2019-09-19 23:55:37 +00:00
[user@localhost ~]$ git clone https://github.com/pikvm/os
[user@localhost ~]$ cd os
2019-09-14 02:22:15 +00:00
```
2020-07-26 18:36:20 +00:00
2. Determine the target hardware configuration (platform):
* Choose the board: `BOARD=rpi4` for Raspberry Pi 4 or `BOARD=zerow`, `BOARD=rpi2`, `BOARD=rpi3` for other options.
* Choose the platform:
- `PLATFORM=v2-hdmi` for RPi4 or ZeroW with HDMI-CSI bridge.
- `PLATFORM=v0-hdmi` for RPi 2 or 3 with HDMI-CSI bridge and Arduino HID.
- `PLATFORM=v2-hdmiusb` for RPi4 with HDMI-USB dongle.
- `PLATFORM=v0-hdmiusb` for RPi 2 or 3 with HDMI-USB dongle and Arduino HID.
- Other options are for legacy or specialized Pi-KVM boards (WIP).
2019-09-14 02:22:15 +00:00
2020-07-24 22:10:05 +00:00
3. Create the config file `config.mk` for the target system. You must specify the path to the SD card on your local computer (this will be used to format and install the system) and the version of your Raspberry Pi and platform. You can change other parameters as you wish. Please note: if your password contains the # character, you must escape it using a backslash like `ROOT_PASSWD = pass\#word`.
2019-09-14 02:22:15 +00:00
```Makefile
2019-12-02 22:51:24 +00:00
[user@localhost os]$ cat config.mk
# rpi3 for Raspberry Pi 3; rpi2 for the version 2, zerow for ZeroW
BOARD = rpi4
2019-09-14 19:19:50 +00:00
# Hardware configuration
2019-12-02 22:51:24 +00:00
PLATFORM = v2-hdmi
2019-09-14 19:19:50 +00:00
# Target hostname
HOSTNAME = pikvm
# ru_RU, etc. UTF-8 only
LOCALE = en_US
# See /usr/share/zoneinfo
TIMEZONE = Europe/Moscow
# For SSH root user
ROOT_PASSWD = root
# Web UI credentials: user=admin, password=<this>
WEBUI_ADMIN_PASSWD = admin
# IPMI credentials: user=admin, password=<this>
IPMI_ADMIN_PASSWD = admin
# SD card device
CARD = /dev/mmcblk0
2019-09-14 02:22:15 +00:00
```
2019-12-04 00:07:37 +00:00
If you want to configure wifi (for ZeroW board for example) you must add these lines to `config.mk`:
```Makefile
WIFI_ESSID = "my-network"
WIFI_PASSWD = "P@$$word"
```
2019-09-14 02:22:15 +00:00
4. Build the OS. It may take about one hour depending on your Internet connection:
2019-09-14 02:22:15 +00:00
```shell
2019-12-02 22:51:24 +00:00
[user@localhost os]$ make os
2019-09-14 02:22:15 +00:00
```
2020-07-26 18:36:20 +00:00
5. Put SD card into card reader and install OS (**you should disable automounting beforehand**: `systemctl stop udisk2` or something like that):
2019-09-14 02:22:15 +00:00
```shell
2019-12-02 22:51:24 +00:00
[user@localhost os]$ make install
2019-09-14 02:22:15 +00:00
```
6. After installation remove the SD card and insert it into your RPi. Turn on the power. The RPi will try to get an IP address using DHCP on your LAN. It will then be available via SSH.
2019-09-14 02:22:15 +00:00
2019-09-19 23:55:37 +00:00
7. If you can't find the device's address, try using the following command:
2019-09-14 02:22:15 +00:00
```shell
2019-12-02 22:51:24 +00:00
[user@localhost os]$ make scan
2019-09-14 02:22:15 +00:00
```
2019-09-12 10:42:36 +00:00
2020-07-26 18:36:20 +00:00
8. **Only for v0**. Now you need to flash the Arduino. This can be done using your RPi. **Before starting this operation, disconnect the RESET wire from the Arduino board, otherwise the firmware will not be uploaded.** Connect the Arduino and RPi with a suitable USB cable. Log in to the RPi and upload the firmware. Then connect the RESET wire, disconnect the USB cable, and reboot the RPi.
2019-09-19 23:55:37 +00:00
```
2019-12-02 22:51:24 +00:00
[user@localhost os]$ ssh root@<addr>
2019-09-19 23:55:37 +00:00
[root@pikvm ~]# rw
[root@pikvm ~]# systemctl stop kvmd
[root@pikvm ~]# cp -r /usr/share/kvmd/hid ~
[root@pikvm ~]# cd ~/hid
2019-12-03 01:25:36 +00:00
[root@pikvm hid]# make
[root@pikvm hid]# make install
[root@pikvm hid]# reboot
2019-09-19 23:55:37 +00:00
```
9. Congratulations! Your Pi-KVM will be available via SSH (`ssh root@<addr>`) and HTTPS (try to open it in a browser at `https://<IP addr>`). For HTTPS a self-signed certificate is used by default.
2019-09-12 10:15:37 +00:00
2020-07-24 21:52:28 +00:00
-----
2020-07-24 21:50:22 +00:00
# Tips
* The Pi-KVM file system is always mounted in read-only mode. This prevents it from being damaged by a sudden power outage. To change the configuration you must first switch the filesystem to write mode using the command `rw` from root. After the changes, be sure to run the command `ro` to switch it back to read-only.
2019-12-14 01:38:56 +00:00
2020-07-26 18:36:20 +00:00
* **NEVER** edit `/etc/kvmd/main.yaml`. Use `/etc/kvmd/override.yaml` to redefine the system parameters. All other files that are also not recommended for editing have read-only permissions. If you edit any of these files, you will need to manually make changes to them when you upgrade your system. You can view the current configuration and all available KVMD parameters using the command `kvmd -m`.
2019-12-14 01:38:56 +00:00
* Almost all KVMD (the main daemon controlling Pi-KVM) configuration files use [YAML](https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html) syntax. Information on the format's syntax can be found at the link provided.
2019-12-14 01:38:56 +00:00
* If you want to disable the web terminal use these commands:
2019-12-14 01:53:38 +00:00
```yaml
2019-12-14 01:38:56 +00:00
[root@pikvm ~]# systemctl disable kvmd-webterm
[root@pikvm ~]# systemctl stop kvmd-webterm
```
* To disable authorization completely edit the file `/etc/kvmd/override.yaml`:
2019-12-14 01:53:38 +00:00
```yaml
2019-12-14 01:38:56 +00:00
kvmd:
auth:
2020-04-29 23:41:07 +00:00
enabled: false
2019-12-14 01:38:56 +00:00
```
then restart `kvmd`:
```
[root@pikvm ~]# systemctl restart kvmd
```
* If you don't need ATX power control you can disable the relevant Web-UI menu in `/etc/kvmd/override.yaml`:
2019-12-14 01:53:38 +00:00
```yaml
2019-12-14 01:38:56 +00:00
kvmd:
atx:
type: disabled
```
then restart kvmd.
* To use Wake-on-LAN with your server you must define some options such as the server's MAC address and (optionaly) IP address. Use `/etc/kvmd/override.yaml`. The format is:
2019-12-14 01:53:38 +00:00
```yaml
2019-12-14 01:38:56 +00:00
kvmd:
wol:
mac: ff:ff:ff:ff:ff:ff
```
Replace `ff:ff:ff:ff:ff:ff` with the MAC of your server. By default, a packet is sent via a broadcast request to the entire IPv4 network (`255.255.255.255`, port `9`), but you can address it to a specific static address:
2019-12-14 01:53:38 +00:00
```yaml
2019-12-14 01:38:56 +00:00
kvmd:
wol:
mac: ff:ff:ff:ff:ff:ff
ip: 192.168.0.100
# port: 9 # By default
```
2019-12-14 01:51:48 +00:00
* To use IPMI BMC you need to set up an appropriate account and run the `kvmd-ipmi` daemon (`systemctl start kvmd-ipmi` and `systemctl enable kvmd-ipmi`). Although Pi-KVM supports the IPMI protocol, we strongly recommend that you do not use it outside of trusted networks due to the protocol's [insecurity](https://github.com/NitescuLucian/nliplace.com.blog.drafts). Refer to the file `/etc/kvmd/ipmipasswd` to configure IPMI account.
2019-09-12 10:15:37 +00:00
* To use VNC you need to change the keyboard layout for non-US client keyboards using `/etc/kvmd/override.yaml`. For example:
2020-04-21 05:12:36 +00:00
```yaml
vnc:
keymap: /usr/share/kvmd/keymaps/ru
```
By default username and password authentication is used. This is not supported by all clients (we recommend [TigerVNC](https://tigervnc.org)). To enable passphrase authentication, you need to edit the file `/etc/kvmd/vncpasswd` to set passphrases and enable this feature in `/etc/kvmd/override.yaml`:
2020-04-21 05:12:36 +00:00
```yaml
vnc:
auth:
vncauth:
enabled: true
```
After that you can enable the `kvmd-vnc` daemon (`systemctl start kvmd-vnc` and `systemctl enable kvmd-vnc`). VNC will be available on port 5900 by default.
It is reccomended to disable the automatic quality adjust setting if there is one in your client (this is called "Auto-Select"in TigerVNC).
Please note: **we strongly discourage the use of VNC on untrusted networks.** The current implementation does not use encryption, and your passwords are transmitted over the network in a plain text. The existing anonymous TLS mode is also not secure enough.
2020-07-28 14:19:07 +00:00
* To use Arduino HID with **v2** platform:
2020-07-28 14:20:04 +00:00
- Build and connect HID according to the [diagram](#v0-diagram).
- Switch to RW-mode using command `rw`.
- Add these lines to `/etc/kvmd/override.yaml` (remove `{}` in the file before):
```yaml
kvmd:
hid:
type: serial
reset_pin: 4
device: /dev/kvmd-hid
```
- Add this line to `/etc/udev/rules.d/99-kvmd.rules`:
```udev
KERNEL=="ttyAMA0", SYMLINK+="kvmd-hid"
```
- Run `systemctl disable getty@ttyGS0.service`.
- Remove `console=ttyAMA0,115200` and `kgdboc=ttyAMA0,115200` from `/boot/cmdline.txt`.
- Flash the Arduino (see [here](#building-the-os), step 8).
- Run `reboot`.
2020-04-21 05:12:36 +00:00
2020-07-24 21:52:28 +00:00
-----
2020-07-24 21:50:22 +00:00
# Troubleshooting
* On step 8 (`make install`), you may encounter the following error:
2019-09-19 23:55:37 +00:00
```
/root/.platformio/packages/tool-avrdude/avrdude: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
```
Create a symlink for this library:
```bash
[root@pikvm ~]# ln -s /usr/lib/libtinfo.so.6 /usr/lib/libtinfo.so.5
```
And run `make install` again.
2020-05-07 20:28:36 +00:00
* **Unexpected interruption while loading the image for Mass Storage Drive**
2020-05-07 20:28:36 +00:00
If problems occur when uploading even a small disk image it may be due to unstable network operation or antivirus software. It is well known that Kaspersky antivirus cuts off Pi-KVM connections during uploading, so you should add the Pi-KVM website to Kaspersky's list of exceptions or not filter web requests with the antivirus. Antivirus programs can also affect the performance of certain interface elements, for example the quality slider.
2019-09-19 23:55:37 +00:00
For Kaspersky, the steps to add the network address of Pi-KVM's website to the exclusion list is: **Protection -> Private browsing -> Categories and exclusions -> Exclusions**
2020-05-07 20:44:37 +00:00
2020-02-03 02:21:50 +00:00
* **Glitchy/Wrong BIOS resolution**
On some motherboards, the BIOS may be displayed at a lower resolution, or with some rendering issues/glitches, specially on newer ASUS ones.
e.g
<img src="bios_glitch.png" alt="ASUS BIOS glitch" width="400"/>
This can be solved by enabling the **Compatibility Support Module (CSM)** in your BIOS, usually under the **Boot** options.
2020-02-03 02:21:50 +00:00
If you can't or don't want to enable the CSM, you can try connecting a DisplayPort monitor, or a [dummy plug](http://amazon.com/s?k=displayport+dummy+plug). If you remove the DP cable/adapter the bug will reappear.
If none of this works, try connecting the DP cable first, boot into the BIOS, disable the CSM and shutdown (do not restart) your PC. Then, boot into the BIOS and enable the CSM before shutting down your PC. Then connect the HDMI and turn your PC on again.
2020-02-03 02:21:50 +00:00
2020-07-24 22:10:05 +00:00
* If you have any problems or questions, contact us using Discord: https://discord.gg/bpmXfz5
2019-09-12 10:15:37 +00:00
2020-07-24 21:52:28 +00:00
-----
2020-07-24 21:50:22 +00:00
# Special thanks
These kind people donated money to the Pi-KVM project and supported work on it. We are very grateful for their help, and commemorating their names is the least we can do in return.
2020-07-14 09:42:13 +00:00
* Aleksei Brusianskii
2020-05-21 09:58:25 +00:00
* Arthur Woimbée
2020-06-02 01:56:23 +00:00
* Ben Gordon
2020-05-25 03:09:58 +00:00
* Branden Shaulis
2020-07-20 11:18:57 +00:00
* Brian White
2020-05-26 17:36:59 +00:00
* Christof Maluck
2020-06-01 23:15:55 +00:00
* Corey Lista
2020-05-21 09:58:25 +00:00
* David Howell
* Denis Yatsenko
2020-05-31 20:42:27 +00:00
* Ge Men
2020-05-21 09:58:25 +00:00
* Grey Cynic
2020-07-23 21:08:49 +00:00
* Jacob Morgan
2020-05-21 09:58:25 +00:00
* Jason Toland
2020-06-03 03:48:44 +00:00
* Jeff Bowman
2020-05-21 09:58:25 +00:00
* John McGovern
* Jozef Riha
2020-06-09 06:12:17 +00:00
* Mark Gilbert
2020-06-06 00:40:09 +00:00
* Mark Robinson
2020-05-21 09:58:25 +00:00
* Mauricio Allende
2020-06-13 03:26:49 +00:00
* Michael Lynch
2020-05-25 16:18:43 +00:00
* Samed Ozoglu
2020-07-27 16:03:02 +00:00
* Steven Richter
2020-05-23 18:45:56 +00:00
* Truman Kilen
2020-05-21 09:58:25 +00:00
* Walter_Ego
2020-07-27 16:03:02 +00:00
* zgen