# Linux server and Docker

URL: https://countvue.com/docs/getting-started/linux-server
Applies to: CountVue Live, CountVue Survey

> Run CountVue Live or Survey on a Linux server or VPS without a screen, as a systemd service or a Docker container, with or without an NVIDIA GPU.

The server package runs CountVue without a desktop, as a **systemd service** that starts with the computer and is restarted if it stops: on a VPS that pulls camera streams over the internet or a VPN, on a mini PC in a cabinet, or on a GPU server for large surveys. For a computer with a screen, use the [desktop package](https://countvue.com/docs/getting-started/install#linux-desktop) instead.

## Requirements

- Ubuntu 22.04, 24.04 or 26.04, or Debian 12 or 13, x86-64. Ubuntu 20.04 is not supported. FFmpeg is included in the package; no system FFmpeg is needed.
- The cameras must be reachable from the server: public RTSP addresses, forwarded ports, or a VPN to the site.
- For the GPU package: an NVIDIA card with the driver, CUDA 12 and cuDNN 9 (or use the Docker image, which has them).

## Install as a service

```bash
tar xzf countvue-live-server-*-linux-x64.tar.gz && cd countvue-live-server-*
sudo ./install.sh
countvue-live pair
```

`pair` prints a code and an address. Open the address, sign in to CountVue Portal and the server is added to your account as a location. Then add and set up the cameras from the Portal: open the location and choose **Manage location**. See [Remote management](https://countvue.com/docs/live/remote-access).

The Survey package works the same way (`countvue-survey-server-…`, command `countvue-survey`). The server package cannot be installed next to the desktop `.deb` of the same product: installing the `.deb` takes a server installation over.

## Useful commands

| Command | What it does |
|---|---|
| `countvue-live status` | Shows the Portal connection |
| `countvue-live unpair` | Disconnects from the Portal (the location and its data stay there) |
| `journalctl -u countvue-live -f` | Follows the service log |
| `sudo ./install.sh` | Run again from a newer package to update |
| `sudo ./install.sh --uninstall` | Removes the program; the data stays in `/var/lib/countvue-live` |

## Opening the local page

The local interface listens on `127.0.0.1:8090` (Survey: `8091`), so it is reachable only from the server itself. To open it from your computer, use an SSH tunnel:

```bash
ssh -L 8090:127.0.0.1:8090 user@your-server
```

and open `http://localhost:8090`. Or install with `--listen 0.0.0.0:8090` to open it to the network. Do this only on a trusted network or behind a VPN: the local page has no sign-in of its own.

In most cases you do not need the local page at all: everything can be done from the Portal with **Manage location**.

## Docker

The package folder contains a Dockerfile:

```bash
docker build -t countvue-live .
docker run -d --name countvue-live --restart unless-stopped \
  -p 127.0.0.1:8090:8090 -v countvue-live-data:/data countvue-live
docker exec -it countvue-live cvad pair
```

## NVIDIA GPU

The GPU package (`countvue-live-server-gpu-…`) runs the neural networks on an NVIDIA card. Its Docker image is based on CUDA 12 with cuDNN 9; run it with `--gpus all`. Without Docker, install the NVIDIA driver, CUDA 12 and cuDNN 9 first. Without a usable card the analytics fall back to the CPU by themselves.
