Manage the Default Administrator Account
When you install Hub for the first time, you set the username and password for the default administrator account. This account is assigned the System Admin role in the Global project.
If you forget the credentials for the default administrator account, or have inherited an installation that was configured by another administrator, you can reset the username and password for the account to their default values. You can also set the system properties for the default administrator when you restore the account.
You can also use this procedure when two-factor authentication is enabled and the default administrator no longer has access to the authentication app that is paired with the account. Resetting the default administrator account to its default state also disables two-factor authentication.
To restore the default administrator account in Hub, follow the specific instructions for your installation type:
To reset the default administrator account credentials:
Stop Hub with the command:
docker exec <Hub docker container ID> stopRun the
configure-next-start
command:docker run --rm -it -v <path to conf directory>:/opt/hub/conf \ jetbrains/hub:<version> \ configure-next-start \ --J-Djetbrains.hub.admin.restore=trueMake sure to enter two dashes before the
J
option. This method sets the system property for the current run only and does not update the configuration file. The administrator account credentials are not reset for subsequent restarts of the Hub service.If you want to set any of the system properties for the default administrator account, add them to the command. For a list of system properties, see System Properties for the Default Admin Account section.
Run the Docker container:
docker container start <Hub docker container ID>The Hub service starts using the specified setting.
The default administrator credentials are reset to their default values or the values that are specified in the command.
Log into Hub with the default administrator account.
If required, change the password for the account.
To reset the default administrator account credentials:
Navigate to the
%programdata%\\JetBrains\Hub\conf\
directory.If the directory already contains the
hub.jvmoptions
file, open the file.If you have not changed the system properties or JVM options for your server, the directory contains a sample configuration file. The sample configuration file uses the
.dist
extension and contains a list of default JVM options. Copy thehub.jvmoptions.dist
file and save it ashub.jvmoptions
.
Add the
-Djetbrains.hub.admin.restore=true
system property to the configuration file. The configuration file format is described in the file itself.If you want to set any of the system properties for the default administrator account, add them to the file. Add each system property to a new line. For a list of system properties, see System Properties for the Default Admin Account section.
The default administrator credentials are reset to their default values or the values that are specified in the configuration file.
Log into Hub with the default administrator account.
If needed, change the password for the account.
Delete the
-Djetbrains.hub.admin.restore=true
system property from the configuration file. Otherwise, the system administrator password is reset every time you restart the Hub service.If you specified additional system properties for the administrator account, remove them as well.
To reset the default administrator account credentials:
Stop Hub with the command:
<Hub Installation Directory>/bin/hub.sh stopStart Hub with the command:
<Hub Installation Directory>/bin/hub.sh start --J-Djetbrains.hub.admin.restore=trueMake sure to enter two dashes before the
J
option. This method sets the system property for the current run only and does not update the configuration file. Thus, the administrator account credentials are not reset for subsequent restarts of the Hub service.If you want to set any of the system properties for the default administrator account, add them to the command. For a list of system properties, see System Properties for the Default Admin Account section.
The Hub service starts using the specified setting.
The default administrator credentials are reset to their default values or the values that are specified in the command.
Log into Hub with the default administrator account.
If needed, change the password for the account.
System Parameters for the Default Admin Account
Parameter | Description |
---|---|
jetbrains.hub.admin.restore | Resets the default administrator account and its permissions to the default scheme. If built-in authorization is disabled, starting Hub service with this parameter enables it.
|
jetbrains.hub.admin.uuid | Sets the UUID of the default administrator account. This parameter is only applied when used in combination with the
|
jetbrains.hub.admin.name | Sets the full name of the default administrator account. This parameter is only applied when used in combination with the
|
jetbrains.hub.admin.login | Sets the username of the default administrator account. This parameter is only applied when used in combination with the
|
jetbrains.hub.admin.email | Sets the email address of the default administrator account. This parameter is only applied when used in combination with the
|
jetbrains.hub.admin.password | Sets the password of the default administrator account. This parameter is only applied when used in combination with the
|