# Configuration

## Blurit CLI

The Blurit CLI is installed during the [Linux](linux-dependencies) or [Windows](windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation. If Blurit team send you a compose file, it's possible to pass it as argument.

```bash
blurit configure
```

For custom installations, if a `blurit_stack.yml` file is provided, include it as an argument when executing the relevant commands :\


```bash
blurit configure blurit_stack.yml
```



## Configuration explanation

The following section provides an explanation of the various questions asked during the configuration process.

### Model

During the configuration process, you'll be prompted to select the AI model version that best fits your performance and precision needs. BlurIt offers two options:

* **tiny**: This model is optimized for speed, processing images and videos faster. It is ideal for scenarios where performance is critical, although it comes with a very slight reduction in precision. This is the default option.
* **standard**: This version provides a balance between speed and precision. While still optimized for fast processing, it offers slightly higher accuracy compared to the tiny model, making it suitable for tasks where precision is more important.

### Web App Authentication

To secure access to the BlurIt web app, you’ll need to set up a username and password during the configuration process. This protects the web interface and ensures that only authorized users can manage files and access data.

1. **Username**: Create a unique username for accessing the web app.
2. **Password**: Set a strong password for added security. Store it securely for future access.

Alternatively, you may choose not to set a username and password for quicker access. However, please note that **disabling authentication** means the web app will be openly accessible, which may expose your data to unauthorized access. This choice comes with the user’s full responsibility for securing access to the application.

### **SSL Configuration**&#x20;

For enhanced security, you can enable SSL to encrypt communication between clients and the server. During the configuration process, you will be prompted to provide the following:

1. **Server Name**: Specify the domain name or IP address used to access your BlurIt web app.
2. **Path to SSL Certificate File (.pem)**: Provide the full path to your SSL certificate file. This file contains the public key and is required for establishing secure HTTPS connections.
3. **Path to SSL Private Key File (.pem)**: Provide the full path to your private key file. This file must correspond to the SSL certificate provided.

If you do not have an SSL certificate, you can use services like [Let's Encrypt](https://letsencrypt.org/) to generate one for free or use self-signed certificates for internal testing.

By enabling SSL and authentication, you ensure that your data and web app are protected against unauthorized access and interception.

### Local storage

These settings define the base directories where BlurIt OP will locate input files (to be processed) and where it will store the output files (blurred videos/images and detection JSONs) on the local server storage, i.e., on the server where BlurIt OP is running.

#### Accessing Windows Drives on WSL

If you are using Windows Subsystem for Linux (WSL), your Windows drives are accessible under the `/mnt/` directory. Each drive is mapped to its respective folder:

* **Drive C:** Located at `/mnt/c/`
* **Drive D:** Located at `/mnt/d/`, and so on.

For example, if you need to access a file located at `C:\Users\YourName\Documents`, you can find it in WSL at:

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

This mapping makes it easy to navigate between your Windows environment and the Linux subsystem.



The input and output directories will be assigned to the user with ID 1200.

**Why UID/GID 1200?**&#x20;

This choice ensures compatibility across different systems and avoids conflicts with system-reserved or commonly used IDs. It provides a dedicated user/group for these services, improving security and isolation.

### S3 storage

These settings allow the use of S3 storage for the input and output directories for media.

### GPU settings

Select the GPU you wish to use with Blurit.

### Max Threads number

This variable represents the maximum number of threads that the reencoding step will utilize on your CPU. Increasing this value can result in faster reencoding.&#x20;

However, it's important to note that you should reserve some threads for other processes.

Avoid using the maximum number of available threads on your server, as it may impact the performance of other applications.

#### Webhook (optional)

This setting is a configuration that defines a route or URL where a POST request can be sent. This endpoint is typically used to send JSON data to another system or service.

In this specific example, when the POST request is made to the "CUSTOM\_WEBHOOK\_ENDPOINT" route, the JSON payload being sent is as follows:

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

The JSON payload contains two key-value pairs:

* "status" with a value of "Succeeded"
* "task\_id" with a value of "abc-123-456-789"

The purpose of this webhook is to notify or provide information to the system or service listening at the specified endpoint about the status of a task or operation. The receiving system can then process this data according to its requirements.

### Jobs timeouts

This parameter represents the amount of time the application waits before changing the status of a task to "failed." By default, it is set to 43200000 milliseconds (equivalent to 12 hours).

