# 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
   ```
