> For the complete documentation index, see [llms.txt](https://docs.smartmerge.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smartmerge.de/using-smart-merge-v/server-watcher.md).

# Server Watcher

Configure Smart Merge V Server Watcher in the desktop app or CLI.

Server Watcher keeps an eye on a selected server resources folder, creates merge tasks when supported conflicts appear, and follows each task through to its result. When a result is ready, it points you to the guided installation steps while leaving your server files unchanged.

<figure><img src="https://2042107425-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv5yFX8VgKWYqKdeNo2ku%2Fuploads%2Fgit-blob-a728cf4f43b194b16936d64725a0286396cc5851%2Fsmv-server-watcher-setup.svg?alt=media" alt=""><figcaption><p>Server Watcher setup screen</p></figcaption></figure>

{% hint style="info" %}
Server Watcher runs from the Windows desktop app, Linux desktop app, or CLI. Browser sessions can run Quick Merge, but they do not keep scheduled local checks running.
{% endhint %}

## What Server Watcher does

Server Watcher can:

* check a configured resources folder every day
* notice folder changes and run a new check after they settle
* create and track merge tasks when supported conflicts are found
* hand finished results back with guided installation steps
* leave local server files unchanged until you review and install the result
* show recent watcher tasks, notifications, and desktop diagnostics

Desktop Server Watcher can also show OS notifications. CLI Server Watcher writes the same kind of progress to stdout and stderr instead.

## Desktop setup

1. Open the Smart Merge V desktop app.
2. Sign in with Discord.
3. Open **Server Watcher**.
4. Select the server resources folder Smart Merge V should scan.
5. Choose the daily check time.
6. Choose dependency settings.
7. Click **Start Watch**.

The default daily check time is `03:00` local time unless changed.

## Desktop startup and notifications

For production use, open **Profile** and review the desktop settings:

* **Desktop notifications**: show OS notifications for completed merges and Server Watcher events.
* **Launch on system startup**: starts Smart Merge V after sign-in so Server Watcher can keep its schedule.
* **Automatic startup behavior**: controls whether startup opens a window, starts minimized, or starts in the tray.

These settings are useful when the machine should keep watching a local server folder after reboot.

## CLI setup

Download the CLI from [Downloads](/getting-started/downloads.md), extract it, then sign in:

```bash
node smartmerge-cli.mjs login
```

After login succeeds, configure the watcher:

```bash
node smartmerge-cli.mjs watch setup ./resources --daily-run 03:00
```

If Smart Merge V cannot detect `server.cfg`, pass it explicitly:

```bash
node smartmerge-cli.mjs watch setup ./resources --server-cfg ../server.cfg
```

Run the watcher:

```bash
node smartmerge-cli.mjs watch run
```

For a single automation run:

```bash
node smartmerge-cli.mjs watch run --once
```

See [Command Line Interface](/using-smart-merge-v/command-line-interface.md) for all CLI watcher options.

## Dependency settings

Server Watcher has settings for:

* **Set game build dependency**: applies detected or selected game build information to created tasks.
* **Set resource dependencies**: applies detected resource dependencies to watcher-created tasks.

Resource dependencies are enabled by default. Game build dependency is disabled by default.

Server Watcher can also read `sv_enforceGameBuild` from `server.cfg` and map common FiveM build values to Smart Merge V targets. If that build is not a merge target, it moves forward to the next available target rather than creating a task that cannot be processed. See [Supported Gamebuilds](/core-concepts/core-concepts/supported-gamebuilds.md) for the supported build list and the values recognized from `server.cfg`.

## What happens during a run

During a watcher run, Smart Merge V:

1. scans the watched folder and reads the server build when available
2. checks for supported conflict groups
3. creates a merge task when there is work to do
4. follows the task until it finishes
5. leaves the server unchanged and shows the guided installation steps

Folder-change checks are debounced. After a file change, Smart Merge V waits about 30 seconds before running the next check so a copied resource folder can settle first.

## Guided installation

Current Smart Merge V results include file-cleanup or manifest steps that need to be reviewed before deployment. Server Watcher therefore stops after the task finishes and hands the result back to you for guided installation.

| Result                                    | What happens                                                                                       |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------- |
| Merge is ready                            | Open the task, follow its cleanup checklist, install the generated group, and update `server.cfg`. |
| A file or manifest needs attention        | The watched folder stays unchanged and the task shows the exact steps to complete.                 |
| The result cannot be prepared confidently | Nothing is replaced. Review the task details, update Smart Merge V if needed, or contact support.  |

{% hint style="info" %}
A guided installation is still a completed merge result. Server Watcher simply hands control back to you before any server files are changed.
{% endhint %}

Downloaded results use a generated group similar to:

```
<watched-folder>/[smartmerge_<task-id>]
```

## server.cfg updates

Server Watcher does not change `server.cfg` for a current guided result. After completing the task's file and manifest steps, add the downloaded generated group after the resources it depends on.

```cfg
ensure map_pack_a
ensure map_pack_b
ensure [smartmerge_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee]
set onesync on
```

{% hint style="warning" %}
Complete every task-listed file or manifest action before adding the generated group. Then verify `server.cfg`, restart the server, and test the affected area in game.
{% endhint %}

## Watcher history

The Server Watcher page shows watcher-created merge tasks separately from manual Quick Merge tasks. Completed records are kept for a limited time, currently about 30 days, so the page stays focused on recent automation.

CLI users can inspect saved watcher state with:

```bash
node smartmerge-cli.mjs watch status
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.smartmerge.de/using-smart-merge-v/server-watcher.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
