# Configure Connection Information

Use this procedure to point the Onsite Proxy at your Cloud Voice PBX (Private Branch Exchange, the hosted phone system). It applies whenever you need to establish a fresh link, including the first connection after you skipped the setup wizard while installing the proxy. The connection details are entered through a terminal-based wizard that runs directly on the proxy host.

## Prerequisites

Before you begin, [add an Onsite Proxy instance on your Cloud Voice PBX](/pbx/onsite-proxy-guide/add-an-onsite-proxy-instance-on-cloud-voice-pbx/) so that the PBX generates the credentials this wizard needs: the **connection address**, **UUID** (Universally Unique Identifier, the unique ID for this proxy instance), and **secret key**. You can view them in the PBX portal at **System > Onsite Proxy > Edit > Connection information**.

:::tip
Refresh the secret key and copy the new value before you continue. This keeps a previously exposed key from being reused.
:::

## Step 1. Run the configuration wizard on the Onsite Proxy

1. Open a terminal session on the Onsite Proxy host.
2. Switch to the root account:

   ```bash
   sudo -i
   ```

   :::note
   When prompted, type the password for your current user and press `Enter`.
   :::
3. Launch the wizard:

   ```bash
   onsite-proxy-configure
   ```

   The **Onsite Proxy Configuration Wizard** opens in a prompt window.
4. Press `Enter` at the opening prompt to start.

   ![Terminal prompt window that starts the Onsite Proxy configuration wizard](/images/pbx/configure-wizard-on-onsite-proxy.png)
5. Work through each connection setting in turn, using the values you copied from the PBX.

   **PBX connection address**

   1. In the **Configure PBX Connection Address** window, paste the connection address you obtained from the PBX, then select `<Ok>` and press `Enter`.

      ![Field for pasting the PBX connection address into the proxy wizard](/images/pbx/configure-pbx-connection-address-on-onsite-proxy-cloud.png)
   2. In the **Confirm Connection Address** window, select `<Yes>` and press `Enter`.

      ![Confirmation dialog for the entered PBX connection address](/images/pbx/configure-pbx-connection-address2-on-onsite-proxy-cloud.png)

   **UUID**

   1. In the **Configure UUID** window, paste the UUID from the PBX, then select `<Ok>` and press `Enter`.

      ![Field for pasting the proxy instance UUID into the wizard](/images/pbx/configure-uuid-on-onsite-proxy.png)
   2. In the **Confirm UUID** window, select `<Yes>` and press `Enter`.

      ![Confirmation dialog for the entered UUID](/images/pbx/configure-uuid2-on-onsite-proxy.png)

   **Secret key**

   1. In the **Configure Secret Key** window, paste the secret key from the PBX, then select `<Ok>` and press `Enter`.

      ![Field for pasting the secret key into the wizard](/images/pbx/configure-secret-key-on-onsite-proxy.png)
   2. In the **Confirm Secret Key** window, select `<Yes>` and press `Enter`.

      ![Confirmation dialog for the entered secret key](/images/pbx/configure-secret-key2-on-onsite-proxy.png)

   **PBX external web server port**

   :::note
   The web server port and the tunnel port arrive pre-filled from your PBX, so there is nothing to paste for these two steps. In most cases you simply confirm the values shown. Change them only if your network uses non-default ports.
   :::

   1. In the **Configure PBX External Web Server Port** window, select `<Ok>` and press `Enter`.

      ![Wizard window showing the PBX external web server port](/images/pbx/configure-https-port-on-onsite-proxy-cloud.png)
   2. In the **Confirm PBX External Web Server Port** window, select `<Yes>` and press `Enter`.

      ![Confirmation dialog for the external web server port](/images/pbx/configure-https-port2-on-onsite-proxy-cloud.png)

   **PBX external tunnel port**

   1. In the **Configure PBX External Tunnel Port** window, select `<Ok>` and press `Enter`.

      ![Wizard window showing the PBX external tunnel port](/images/pbx/configure-tunnel-port-on-onsite-proxy-cloud.png)
   2. In the **Confirm PBX External Tunnel Port** window, select `<Yes>` and press `Enter`.

      ![Confirmation dialog for the external tunnel port](/images/pbx/configure-tunnel-port2-on-onsite-proxy.png)

   **Local IP**

   1. In the **Select Local IP** window, choose the static IP (Internet Protocol) address assigned to the host.

      ![List of available network interfaces for selecting the local IP](/images/pbx/configure-local-ip-on-onsite-proxy.png)

      :::note
      If the address you want is missing from the **Available network interfaces** list, select **manual** and press `Enter`, then type the IP address by hand.

      ![Manual entry field for typing a local IP address](/images/pbx/configure-local-ip-mannually-on-onsite-proxy.png)
      :::
   2. Select `<Ok>` and press `Enter`.
   3. In the **Confirm Local IP** window, select `<Yes>` and press `Enter`.

      ![Confirmation dialog for the selected local IP address](/images/pbx/configure-local-ip2-on-onsite-proxy.png)
6. Review everything in the **Configuration Summary** window. When the details are correct, select `<Yes>` and press `Enter`.

   ![Summary window listing all entered connection settings](/images/pbx/configure-summary-on-onsite-proxy-cloud.png)
7. At the **Verification Successful** prompt, press `Enter`.

   ![Prompt confirming that the connection details verified successfully](/images/pbx/verification-successful-on-onsite-proxy.png)
8. At the **Configuration Complete** prompt, press `Enter`.

   ![Prompt confirming that configuration is complete](/images/pbx/configuration-complete-on-onsite-proxy.png)

## Step 2. Restart the proxy services

Apply the new configuration by restarting both services:

:::caution
Restarting the tunnel forwarding service briefly interrupts any traffic passing through the proxy, including calls in progress. If the proxy is already carrying live traffic (for example, when you are re-establishing an existing connection rather than setting one up for the first time), restart during a maintenance window or a quiet period.
:::

1. Restart the tunnel forwarding service:

   ```bash
   systemctl restart proxycore.service
   ```
2. Restart the tunnel status reporting service:

   ```bash
   systemctl restart proxycron.service
   ```

## Result

The Onsite Proxy is now connected to your Cloud Voice PBX. Confirm the link in either of these ways:

- On the Onsite Proxy host, run `onsiteproxy-cli status`. For details on reading the output, see [Query client status](/pbx/onsite-proxy-guide/query-connection-details/#query-connection-details__query-client-status).
- In the PBX portal, review the status under **System > Onsite Proxy**.

  ![PBX portal showing an Onsite Proxy instance in a connected state](/images/pbx/connected-onsite-proxy-instance-cloud.png)

:::note
The PBX sends an **Onsite Proxy** event notification to the relevant contacts if the connection drops or if resource usage on the proxy crosses any of these thresholds:

- CPU usage above 85%
- Memory usage above 85%
- Disk usage above 95%
:::
