Hub 2023.3 Help

Change the Base URL or Listen Port

The configuration file for your Hub installation has two properties that determine where the service is accessible over the internet or internal network.

Property

Description

base-url

This is the foundational web address that forms the starting point for accessing the various resources and pages within the application. For Hub, it includes the protocol (http:// or https://) and domain name.

listen-port

This is the specific network port on the host server where Hub is configured to listen for incoming network requests and connections.

There are various reasons for wanting to change the base URL or listen port for your Hub installation. This can include domain or hosting migrations, rebranding, renaming, or security and access control.

Changing the listen port can be required for security purposes, load balancing, resolving port conflicts, optimizing network configurations, and meeting specific operational or compliance requirements.

In many cases, changes to the listen port require updates to the base URL. For example, when proxy or port forwarding is not employed and end users access the service directly through its designated listen port. In this situation, the listen-port and base-url should be changed together.

If a proxy or port forwarding is employed, the port in the base URL may not correspond to the listen port because clients can communicate with the proxy on a different port. In this case, modifying the listen port should be accompanied by updating the proxy or port forwarding configuration.

If the proxy URL differs from the previous base URL, the base URL should also be updated. This situation can arise when a proxy was not used before or when the proxy has been reconfigured to listen on a different host or port. In such cases, the old base URL is likely to be outdated.

Changing the Base URL for your Hub Installation

Use the following instructions to update the base URL for Hub. If your base URL includes the listen port, make sure to update both properties at the same time.

To change the Base URL of your Docker installation:

  1. Use the following command to stop the Hub service:

    docker exec <containerId> stop
  2. Run the configure command:

    docker run -it --rm \ -v <path to conf directory>:/opt/hub/conf jetbrains/hub:<version> \ configure --base-url <new target web address>

    If you want to update the base URL and listen port simultaneously, add the new listen port to the configure command as well. For example:

    configure --base-url <new target web address> --listen port <new listen port>
  3. Restart the Hub service:

    docker start <containerId>

To change the Base URL of your ZIP installation:

  1. Open a command-line interface and enter the following command to stop the Hub service:

    hub.sh stop
  2. Change the directory to <hub_home>/bin.

    For a ZIP installation, the <hub_home> directory is the location where the ZIP distribution was unpacked during installation.

  3. Run the configure command:

    hub.sh configure --base-url <new target web address>

    If you want to update the base URL and listen port simultaneously, add the new listen port to the configure command as well. For example:

    configure --base-url <new target web address> --listen port <new listen port>
  4. Use the following command to restart the Hub service:

    hub.sh restart

Changing the Listen Port for your Hub Installation

Use the following instructions to update the listen port for Hub. For this to be successful, the listen port must be accessible to end users or to the reverse proxy server, if one is in use. This may require explicitly opening access to this port through the firewall.

To change the Listen Port of your Docker installation:

  1. Use the following command to stop the Hub service:

    docker exec <containerId> stop
  2. Run the configure command:

    docker run -it --rm \ -v <path to conf directory>:/opt/hub/conf jetbrains/hub:<version> \ configure --listen port <new listen port>

    If you want to update the base URL and listen port simultaneously, add the new listen port to the configure command as well. For example:

    configure --base-url <new target web address> --listen port <new listen port>
  3. Restart the Hub service:

    docker start <containerId>

To change the Listen Port of your ZIP installation:

  1. Open a command-line interface and enter the following command to stop the Hub service:

    hub.sh stop
  2. Change the directory to <hub_home>/bin.

    For a ZIP installation, the <hub_home> directory is the location where the ZIP distribution was unpacked during installation.

  3. Run the configure command:

    hub.sh configure --listen port <new listen port>

    If you want to update the base URL and listen port simultaneously, add the new listen port to the configure command as well. For example:

    configure --base-url <new target web address> --listen port <new listen port>
  4. Use the following command to restart the Hub service:

    hub.sh restart
Last modified: 27 February 2024