Hub 2018.3 Help

Configure Hub System Properties

Configure System Properties from the Command Line

Hub stores system properties in and JVM options in an internal configuration file. Every time you start the Hub service, Hub reads this file and applies this configuration to the Hub database.

The one-way synchronization from the configuration file to the database can lead to problems if you're not careful. System properties that are set in the Hub user interface are applied directly to the Hub database. If you change a setting in the user interface that has been updated in the configuration file, the setting in the configuration file is applied to the database on restart, overwriting the setting in the UI.

To avoid conflicts, we recommend that you update and manage these settings in the user interface. This ensures that you don't have synchronization issues with the configuration file.

You can update a system parameter in a command-line interface. In this case, you pass the system property to Hub as an ad hoc parameter to apply at the next start of the Hub service. This method updates the settings in the database without applying changes to the configuration file. Your database remains in sync with the settings in the user interface.

These commands are available for all types of Hub installations.

Provide Ad Hoc Parameters for ZIP and MSI Installations

To execute these commands in an MSI distribution, open the Command Prompt window as an administrator.

To pass a system property as an ad hoc parameter:

  1. Stop the Hub service.

  2. In a command-line interface, 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.

    • For an MSI installation, the <hub_home> directory is the location where the MSI distribution was installed. The default installation directory is C:\Hub

  3. Enter the hub.sh start command, followed by all of the system properties that you want to pass to the Hub database on start.
    • Use the --J prefix to pass the settings as ad hoc parameters.

    • Set the system properties in the format -Dproperty=value. Do not add any spaces between the prefix and the system property.

    For example:
    hub.sh start --J-Djetbrains.hub.smtp.host=mail.myserver.com --J-Djetbrains.hub.smtp.port=110
    • The Hub service starts using the specified settings.

    • The system property is stored in the Hub database.

    • The hub.jvmoptions file is not modified.

Provide Ad Hoc Parameters for a Docker Installation

You can configure Hub from a command line, including the properties that are set in the Configuration Wizard on the first start. Stop the Hub service and run the configure-next-start command:

docker run -it --rm \ -v <path to conf directory>:/opt/hub/conf jetbrains/hub:<version> \ configure-next-start \ <ad hoc parameters>

Command attributes:

  • <ad hoc parameters> — a list of Hub system properties. Each ad hoc parameter should be provided in the following format:
    --J-D<property>=<value>

    Where --J is the ad hoc prefix followed by the property. For example:

    --J-Djetbrains.hub.role.permissions.reset=true

    For the list of supported properties, see the List of System Properties page.

For more details on the format of the configure-next-start command, run the command:

docker run --rm -it jetbrains/hub:<version> help

When you execute the configure-next-start command, make sure to keep the local system path to the conf directory in volume mappings the same as the mapping specified in the run command for the main server. Otherwise, updates are not applied to the Hub configuration files.

Last modified: 17 December 2018