# Changing the port of GitProtect Management Service

## Windows

### <mark style="background-color:blue;">JSON file</mark>

#### Changing the port number on Windows via JSON file:

1. Navigate to the **Management Service** installation folder. By default it's:\
   `C:\Program Files\Xopero ONE Backup&Recovery`
2. Open the **appsettings.json** file in a text editor.
3. Make the following changes:
   * Rename the section `"commented_out_Kestrel"` to `"Kestrel"`.
   * Change the port number by modifying the `"Url"` parameter. For example, replace: `"http://*:5000"` with your desired port number (replace only the numeric value).
4. Save the changes.
5. Restart **GitProtect** to apply the new port settings.

### <mark style="background-color:blue;">Registry Editor (regedit)</mark>

#### Changing the port number via Windows Registry Editor:

1. Open **regedit.msc**.
2. Navigate to the following key:

   <pre data-overflow="wrap"><code>Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XoperoONEManagementService
   </code></pre>
3. In the `ImagePath` value, modify the numerical value of the `--urls` parameter to your desired port.
4. Save the changes and restart **GitProtect** to apply the new port settings.

***

## Linux

#### Changing the port number on Linux via systemd:

1. Open the file:

   ```
   /etc/systemd/system/XoperoONEManagementService.service
   ```
2. In the `[Service]` section, edit the **ExecStart** line and replace `28555` with your desired port number.

   <pre data-overflow="wrap"><code>ExecStart=/opt/XoperoONEManagementService/ManagementService --urls "http://*:28555"
   </code></pre>
3. Reload the **systemd** configuration:

   ```bash
   systemctl daemon-reload
   ```
4. Restart the **Management Service** to apply the change:

   ```bash
   systemctl restart XoperoONEManagementService.service
   ```


---

# Agent Instructions: 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:

```
GET https://helpcenter.gitprotect.io/troubleshooting/changing-the-port-of-gitprotect-management-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
