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 |
|---|---|
| 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. |
| This is the specific network port where YouTrack is configured to listen for incoming network requests and connections. For Docker installations, this is the port inside the container. |
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.
Run YouTrack on a Default Port Without a Reverse Proxy
You can make YouTrack available directly on the default HTTP or HTTPS port without using a reverse proxy. Make sure that the selected port is open in your firewall and is not used by another service.
For a Docker installation, you don't need to change the port on which YouTrack listens inside the container to use port 80 on the host. Publish host port 80 and map it to the default container port 8080:
Set the base-url to the address that users open, for example, http://youtrack.example.com. You don't need to include :80 because it is the default port for HTTP.
To make YouTrack available directly over HTTPS on port 443, first configure built-in TLS with port 443 as the listen port. Then publish port 443 when you start the container:
Set the base-url to the HTTPS address, for example, https://youtrack.example.com. You don't need to include :443 because it is the default port for HTTPS.
Changing the Base URL
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 YouTrack installation:
Use the following command to stop the YouTrack service:
docker exec <containerId> stopRun the
configurecommand: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
configurecommand as well. For example:configure --base-url <new target web address> --listen-port <new listen port>Restart the YouTrack service:
docker start <containerId>
Changing the Listen Port
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.
For Docker installations, the listen-port setting changes the port that YouTrack uses inside the container. If the container is started with a published port mapping, update the container port in the -p option when you start the service again.
To change the Listen Port of your YouTrack installation:
Use the following command to stop the YouTrack service:
docker exec <containerId> stopRun the
configurecommand: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
configurecommand as well. For example:configure --base-url <new target web address> --listen-port <new listen port>Start the YouTrack service again.
If you do not publish container ports explicitly, you can restart the existing container:
docker start <containerId>If the container is started with a port mapping, remove the existing container and create a new one with the updated mapping. For example:
docker run -it --name <youtrack-server-instance> \ -v <path to data directory>:/opt/youtrack/data \ -v <path to conf directory>:/opt/youtrack/conf \ -v <path to logs directory>:/opt/youtrack/logs \ -v <path to backups directory>:/opt/youtrack/backups \ -p <port on host>:<new listen port> \ jetbrains/youtrack:<version>