YouTrack Server 2023.3 Help

Change the Base URL or Listen Port

The configuration file for your YouTrack 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 YouTrack, it includes the protocol (http:// or https://) and domain name.

listen-port

This is the specific network port on the host server where YouTrack 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 YouTrack 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 YouTrack Installation

Use the following instructions to update the base URL for YouTrack. 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 YouTrack service:

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

    docker run -it --rm \ -v <path to conf directory>:/opt/youtrack/conf jetbrains/youtrack:<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 YouTrack 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 YouTrack service:

    youtrack.sh stop
  2. Change the directory to <youtrack_home>/bin.

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

  3. Run the configure command:

    youtrack.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 YouTrack service:

    youtrack.sh restart

Changing the Listen Port for your YouTrack Installation

Use the following instructions to update the listen port for YouTrack. 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 YouTrack service:

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

    docker run -it --rm \ -v <path to conf directory>:/opt/youtrack/conf jetbrains/youtrack:<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 YouTrack 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 YouTrack service:

    youtrack.sh stop
  2. Change the directory to <youtrack_home>/bin.

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

  3. Run the configure command:

    youtrack.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 YouTrack service:

    youtrack.sh restart
Last modified: 22 March 2024