# Web UI

The K2K Tool provides a web interface that can be accessed when running the `server` command.&#x20;

{% hint style="danger" %}
Warning: Setting offsets should only be used when the K2K application has been stopped.&#x20;

If the K2K application is running, the offset reset might not be applied as the application will continue to commit offsets, potentially overwriting the reset operation.
{% endhint %}

#### WEB UI

<figure><img src="https://3258629187-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJvXj1p9jcjKQIHSnNbCR%2Fuploads%2FpwNnkCEimW3HxrBahQIR%2Fimage.png?alt=media&#x26;token=aee5b5e7-615d-4a41-b26f-22a02f9b885a" alt=""><figcaption></figcaption></figure>

The web interface consists of:

* **Left Sidebar**: Displays the list of available pipelines.
* **Right Content Panel**: Shows detailed information about the selected pipeline

#### Actions

**Offset Management Actions**

* **Reset Individual Partition**: Click the "Reset" button in the ACTIONS column for a specific partition to reset that partition's offset to your desired offset.
* **Reset All Partitions**: Click the "Reset All" button above the committed offsets table to reset all partitions for all topics in the pipeline to offset 0 (earliest available offset).

#### Run

| flag/short                     | description                                                                                    | default   | required                              |
| ------------------------------ | ---------------------------------------------------------------------------------------------- | --------- | ------------------------------------- |
| `--file` / `-f`                | Comma-separated list of file(s) that define one k2k pipeline. Can be specified multiple times. | -         | Yes, if `--dir` is not specified.     |
| `--dir`                        | List of directories to watch for pipeline files. Can be specified multiple times.              | -         | Yes, unless `--file` is not specified |
| `--defaults` / `-d`            | File containing defaults for the k2k app. Can be specified multiple times.                     | -         | No                                    |
| `--host` / `-h`                | Host the server will accept requests from.                                                     | `0.0.0.0` | No                                    |
| `--port` / `-p`                | Port the server will accept requests from.                                                     | `8080`    | No                                    |
| `--template-engine` / `-g`     | Enable or disable the template engine.                                                         | `enabled` | No                                    |
| `--healthcheck-timeout` / `-e` | Duration to wait for a health check to complete.                                               | `5s`      | No                                    |
| `--watcher-interval` / `-w`    | Duration between checks for new files in the managed directories.                              | `10s`     | No                                    |
| `--verbosity`                  | Sets the log verbosity (e.g., `debug`, `info`, `warn`, `error`).                               | -         | No                                    |

```bash
# Start server with a single pipeline file
k2k-tool server -f /path/to/pipeline.k2k.yml

# Start server watching a directory
k2k-tool server -d /pipelines

# Start server with a pipeline defined over multiple files and custom port
k2k-tool server -f /path/to/pipeline1.k2k.yml,/path/to/pipeline2.k2k.yml -p 9090
```
