Download the latest version of the pre-packaged executable WAR file from the registry releases page (https://github.com/jhipster/jhipster-registry/releases):
- Open your terminal and then type the following command, replacing <version> with the latest one. If you are using Windows and do not have curl set up, you can also download the file by visiting the link in a browser:
> curl https://github.com/jhipster/jhipster-registry/releases/download/v<version>/jhipster-registry-<version>.war
- This will download the latest WAR file from the JHipster Registry project. Once downloaded, we can run JHipster Registry using the following command:
> ./jhipster-registry-<version>.war --security.user.password=admin --jhipster.security.authentication.jwt.secret=secret-key --spring.cloud.config.server.native.search.locations=file:./central-config
Note that we pass a few values to our registry server; they are:
--security.user.password=admin
Since JHipster Registry is built on top of the JHipster application, it will have the default admin user. For that admin user, we provide the password with the Spring property security.user.password:
--jhipster.security.authentication.jwt.secret=secret-key
Then we define the JWT token for the application in two ways. We can either set the information in the environment variable and use that, or else add this key value when we define the secret. This also uses the spring config property to set the property:
--spring.cloud.config.server.native.search.locations
- Finally, we tell the JHipster Registry where to find the central configurations that are available for the Spring Cloud Config server.
Before we see what value to pass in here, we need to know about the Spring profiles in the context of spring-cloud-config. Spring Cloud Config supports native and git profiles by default.
In a native profile, the Cloud Config server expects its properties to be defined in a file, and we have to pass in the file location to the JHipster Registry. On the other hand, the git profile will expect --spring.cloud.config.server.git.uri to be set.
For example, the sample JHipster config file for the the registry is as follows:
configserver:
name: JHipster Registry config server
status: Connected to the JHipster Registry config server using ...
jhipster:
security:
authentication:
jwt:
secret: awesome-my-secret-token-to-change-in-production
This can be seen in the Spring Cloud Configuration page of the Registry as well:

Just like the JHipster app provides dev and prod profiles, JHipster Registry also supports dev and prod profiles. By default, it will start in the dev profile when started, but we can make it run in a prod profile using --spring.profiles.active=prod,git, passing in the git URL, and then defining the configuration properties there. For production mode, git is the preferred profile to use on a Spring Cloud Server.