> For the complete documentation index, see [llms.txt](https://doc-op.blurit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc-op.blurit.io/2.15.0/blurit-on-premise/installation/install-blurit-op.md).

# Install Blurit OP

`blurit install` configures and prepares your BlurIt On-Premise instance: it asks you a series of configuration questions, initialises the Docker Swarm cluster and downloads the images. The stack itself is started afterwards with `blurit start`, described in [Run BlurIt OP](/2.15.0/blurit-on-premise/installation/run-blurit-op.md).

## Before you start

* The dependencies must be installed — see Linux dependencies or Windows dependencies (WSL).
* Keep the archive you received at hand: it contains your **registry credentials** (`login_registry.txt`), needed to download the images, and your **license file**, which is activated after the first start.
* If the Blurit team sent you a custom compose file (`blurit_stack.yml`), keep its path at hand too.

## Running the installer

{% code lineNumbers="true" %}

```bash
./blurit install
```

{% endcode %}

With no argument, the command downloads the official compose template for your version. Other forms:

| Command                                 | What it does                                                                                |
| --------------------------------------- | ------------------------------------------------------------------------------------------- |
| `./blurit install blurit_stack.yml`     | Uses the custom compose file provided by the Blurit team instead of downloading a template. |
| `./blurit install --requirements`       | Runs the dependency checks first, then the installation.                                    |
| `./blurit install --template-url <url>` | Downloads the template from another URL (given to you by Blurit support).                   |

The command is **safe to re-run**: every question is pre-filled with the value from your previous installation, so you can change a single setting by pressing `Enter` on all the others.

## Configuration

### AI model

```
Choose the AI model version to use:
  - tiny: A model optimized for speed at the expense of very slightly lower precision.
  - standard: A model optimized for dectection.
```

* **tiny** (default) — optimized for speed: images and videos are processed faster, at the cost of a very slight loss of precision.
* **standard** — optimized for detection quality: slightly slower, more accurate, to be preferred when precision matters more than throughput.

Your choice selects the image tag of the blurring workers (`…/worker:<version>` or `…/worker:<version>-tiny`).

### Server name

```
Enter server name (IP or domain name) [127.0.0.1]:
```

The domain name or IP address through which the Manager web app and the API will be reached. If you plan to enable HTTPS, be sure to chose an hostname that matches your SSL certificate.

### SSL configuration

```
Do you want to configure SSL certificates? [y/N]:
```

Answer `y` to serve the Manager and the API over HTTPS. You are then asked for two files, both in `.pem` format:

1. **Path to SSL certificate file (.pem)** — the public certificate used for the HTTPS connections.
2. **Path to SSL private key file (.pem)** — the private key matching that certificate.

If you do not have a certificate, you can obtain a free one from a service such as [Let's Encrypt](https://letsencrypt.org/), or use a self-signed certificate for internal testing. Without SSL, the Manager and the API are served over plain HTTP on port 80.

### Flower credentials

```
Enter username for Flower Manager [flower_user]:
Enter password for Flower Manager:
```

Flower is the monitoring interface of the processing queues, described in Monitoring With Flower. These credentials protect it.

### Local storage

```
Local input directory (where you will put the files to process) [$HOME/blurit-op/input]:
Local output directory (where BlurIt OP will store the processed files) [$HOME/blurit-op/output]:
```

These two directories are the base directories where BlurIt OP reads the media to process and writes the results (blurred images/videos and detection JSON files) on the server running BlurIt OP. They are created if they do not exist.

{% hint style="warning" %}
Both directories are **mandatory**, even if you plan to use S3 storage only.

They are given to **user and group 1200** (`chown -R 1200:1200`, plus the setgid bit so new files inherit the group). This is required for BlurIt to read and write them. The UID/GID 1200 is a dedicated, non system-reserved identity: it avoids conflicts with the accounts of your server and keeps the services isolated.
{% endhint %}

#### Accessing Windows drives on WSL

If you are using the Windows Subsystem for Linux (WSL), the Windows drives are available under `/mnt/`: drive `C:` at `/mnt/c/`, drive `D:` at `/mnt/d/`, and so on. For example `C:\Users\YourName\Documents` is reachable at:

```bash
/mnt/c/Users/YourName/Documents
```

### S3 storage

```
Do you want to be able to use S3 storage in addition to local storage? [y/N]:
```

Answering `y` lets tasks read their input from, and write their output to, an S3 bucket **in addition to** the local directories. You are then asked for:

| Question       | Example                              |
| -------------- | ------------------------------------ |
| S3 Access Key  | `AKIA…`                              |
| S3 Endpoint    | `https://s3.us-west-1.amazonaws.com` |
| S3 Secret Key  | —                                    |
| S3 Region      | `us-west-1`                          |
| S3 Bucket Name | `my-blurit-bucket`                   |

Any S3-compatible storage can be used, as long as it is reachable from the server. Answering `N` leaves the S3 settings empty and BlurIt works with local storage only.

### GPU

```
Do you want Blurit to run on your graphics card? [Y/n]:
Which GPU would you like to use? (must be a number starting from 0)
GPU ID [0]:
```

Answering `y` runs detection, landmark detection and re-encoding on the GPU (`cuda`); answering `n` runs everything on the CPU, which is dramatically slower and only advisable for small volumes or for evaluation.

When you choose the GPU, the available cards are listed with `nvidia-smi -L` and you select the one to use by its number, starting at 0. **If no GPU is detected, the installation stops with an error** — check the dependencies (driver, container toolkit and Docker NVIDIA runtime) before trying again.

### Max threads

```
Max number of threads (best practice: number of CPU cores - 2) [n]:
```

The maximum number of threads the re-encoding step may use on your CPU. The default is the number of cores of the server minus 2. Increasing this value makes re-encoding faster, but keep a few threads free for the rest of the system: using every available thread degrades the performance of the other services and of the server itself.

### Webhook (optional)

```
Do you want Blurit to run a webhook for events? [y/N]:
Enter the URL of the webhook:
```

When a webhook URL is configured, BlurIt sends a `POST` request to it every time a task reaches a final status — `Succeeded` **or** `Failed` — with a JSON payload:

```json
{
  "status": "Succeeded",
  "task_id": "abc-123-456-789"
}
```

The receiving system can then react to the event — fetch the results, retry or report a failure, update its own database, notify a user … Leave the webhook disabled if you poll the task status through the API instead.

### Jobs timeout

```
Choose the timeout for blurit jobs (default is 345600000 milliseconds = 96 hours) [345600000]:
```

How long the application waits for a task before marking it as **failed**. The default is 345 600 000 milliseconds, i.e. 96 hours. Raise it if you process very large batches of long videos; lower it if you prefer to detect stuck tasks faster.

### Docker Swarm address

```
We will initiate a Docker Swarm cluster. Do you want to bind it to a specific IP? [y/N]:
What IP would you like?
```

BlurIt OP runs as a Docker Swarm stack, so the installer initialises a Swarm cluster on the server. Answer `N` in the usual case. Answer `y` when the server has several network interfaces and you need the Swarm to advertise a specific one (`docker swarm init --advertise-addr <ip>`) — typically for a multi-servers installation. If the node is already part of a Swarm, the existing cluster is kept.

## What the installer does with your answers

1. **Writes the configuration** to the Blurit OP configuration file.
2. **Initialises the Docker Swarm** cluster and labels the node with `api=True`, so that the services that must run on this machine (nginx, front, API, Manager API, database, queues) are scheduled here.
3. **Logs in to the private registry** `rg.fr-par.scw.cloud/blurit-on-premise`. The username and password are the ones in `login_registry.txt`.
4. **Downloads the images** (`docker compose pull`). This step can take a long time, depending on your connection.
5. **Prints the next steps**:

```
Configuration is done! 😁
You can start Blurit by using this: blurit start
You can activate your license with this command after starting the solution: blurit license set /path/to/license.txt
You can access the Manager via http://127.0.0.1 or http://<public ip>
```

Continue with [Run BlurIt OP](/2.15.0/blurit-on-premise/installation/run-blurit-op.md), which starts the stack, creates the first administrator account and activates your license.

## Changing the configuration later

Run `./blurit install` again: every question is pre-filled with your current settings, passwords are kept when you leave them empty. Then apply the new configuration with:

```bash
blurit restart
```

##
