# Install and run

The Web App runs on one computer of yours and is opened in a browser. Install it as a Python program or as a container.

## What it needs

- Python 3.11 or newer, or Docker. The image is built for amd64 and arm64.
- Linux on x86-64 or ARM64, or Windows. Video is decoded in a sandboxed worker; on macOS and other platforms qKVM refuses video rather than decode it without that sandbox.

## As a program

```
pip install qkvm
qkvm
```

Then open `http://127.0.0.1:8787/`. Where the system's Python refuses `pip install` outside an environment of its own (Debian, Ubuntu and others), `pipx install qkvm` does the same.

## As a container

```
docker run -d --name qkvm --restart unless-stopped --read-only --tmpfs /tmp --cap-drop ALL --security-opt no-new-privileges:true -p 8787:8787 -v qkvm-data:/data -v qkvm-keys:/keys qkvm/qkvm --https --setup-code
```

Open `https://<this machine>:8787/` and choose a password with the setup code that `docker logs qkvm` shows. Check the generated certificate on the host before you trust it, or install a certificate your clients trust.

- The same image is at `ghcr.io/qkvm/qkvm`. It runs as an unprivileged user, uid 10001.
- The `docker-compose.yml` in the source runs it the same way: put it in a folder and run `docker compose up -d`. To update: `docker compose pull && docker compose up -d`.
- A folder of your own mounted at `/data` must be writable by uid 10001.

## Where it keeps its data

| What | Where | Back it up |
|---|---|---|
| Data folder: settings, activity log, history | `~/.qkvm` (Windows: `%USERPROFILE%\.qkvm`), or `--data-dir` | yes |
| Server storage key | `<data folder>.keys/vault.key`; in a container, the `qkvm-keys` volume | yes, separately |

qKVM says where the data folder is every time it starts. The two belong together: a copied data folder plus an account password is not enough without the storage key. Keep the `qkvm-keys` volume through every container replacement.

## Behind a reverse proxy

Publish the backend only on loopback (`-p 127.0.0.1:8787:8787`) or on a private container network. Only then leave out `--https`, and keep `--setup-code`. Never expose the plain HTTP backend to untrusted clients.

## The first visit

1. **Password**: choose the password of the first account, `admin`.
2. **Recovery key**: shown once. Keep it: it is the way back in if a password is forgotten.
3. **Network**: where the wall is reachable: this computer only, Tailscale, or the local network. In a container the port mapping (`-p`) decides.
4. **KVMs**: let qKVM find the KVMs on your network, or paste their addresses and logins. Each one is checked and added.

## From the source

```
git clone https://github.com/qkvm/qkvm
cd qkvm
pip install .
```

For the image instead: `docker build -t qkvm/qkvm .`

## Related

- [Use the wall](https://qkvm.com/docs/web/using-it)
- [Keeping it running](https://qkvm.com/docs/web/keeping-it-running)
- [Over Tailscale or NetBird](https://qkvm.com/docs/web/over-tailscale-or-netbird)
- [How it is protected](https://qkvm.com/docs/web/how-it-is-protected)

[Full reference](https://github.com/qkvm/qkvm/blob/main/GUIDE.md#run-it)
