anchor.diff:  title="Configuring Keycloak"
   summary="An overview of the server configuration">
   
  -In this guide, you will learn the core concepts around the server configuration and how to configure the server using the different
  -server options available. You will also learn how to properly configure the server to achieve an optimal runtime for faster
  -startup and low memory footprint.
  +This guide describes underlying core concepts of Keycloak configuration. It includes configuration guidelines for optimizing Keycloak for faster startup and low memory footprint.
   
  -== Understanding Server Options
  +== Server options
   
  -All the server options can be found by using the `help` option for individual commands:
  +You can view the server options by adding the `help` option for individual commands:
   
  -.Listing all build options
  +.Listing build options
   <@kc.build parameters="--help"/>
   
  -.Listing all configuration options
  +.Listing configuration options
   <@kc.start parameters="--help"/>
   
  -You can instead look at all the server options at <@links.server id="all-config"/>.
  +Alternatively, you can see the server options at <@links.server id="all-config"/>.
   
  -Server options are loaded from different sources in a specific order and they use different formats. If an option is defined in different sources the order of resolution is first in the list of:
  +Server options are loaded from different sources in a specific order and they use different formats. If an option is defined in different sources, the order of resolution is the order in the following table:
   
   |===
   |*Source* | *Format*
  
positive.code: <@kc.start rootParameters="-cf myconfig.conf"/>
  
  Changes to any *build option* defined in the `keycloak.conf` file that is targeted for the `build` command are ignored
  if the value differs from the value used to previously run the `build` command. In this case, make sure you run the `build` command again so that
  any build option is updated accordingly.
  
  === Understanding the development and production modes
  
  By default, the server defines two main operating modes:
  
  * Development
  * Production
  
  The development mode is activated every time you run the `start-dev` command. In this mode, some key configuration options are set to make it possible to start the
  server for development purposes without the burden of having to define additional settings that are mandatory for production.
  
  The production mode is activated by default when you run the `build` or the `start` command. Use this mode to set any configuration option that
  is needed for deploying Keycloak in production.
  
  By default, the configurations options for the production mode are commented out in the `conf/keycloak.conf`. These examples
   are meant to give you an idea about the main settings that needs to be considered when running in production.
  
  == Using unsupported server options
  
  Most of the time the available options from the server configuration should be enough to configure the server.
  However, you might need to use properties directly from Quarkus in order to enable a specific behavior or capability that is missing from the server configuration.
  
  You should avoid as much as possible using properties directly from Quarkus. If you really need to, consider opening an https://github.com/keycloak/keycloak/issues/new?assignees=&labels=kind%2Fenhancement%2Cstatus%2Ftriage&template=enhancement.yml[issue] first and help us
  to improve the server configuration.
  
  To configure the server using Quarkus properties you should follow these steps:
  
  * Create a `conf/quarkus.properties` file and define any property you need
  * Run the `build` command to apply the settings to the server
  
  For a complete list of Quarkus properties, consider looking at this https://quarkus.io/guides/all-config[documentation] .
  
  </@tmpl.guide>
negative.code: .Start the server
  <@kc.start/>
  
  By using the `keycloak.conf` file, the server can omit some steps at startup. As a result, the server starts faster.
  
  == The auto-build option: automatic detection when the server needs a build
  
  Under certain circumstances, you might prefer to allow a longer startup time in favor of updating the values of build options when starting the server. Using the `auto-build` option, you can perform the two configuration stages by using a single command. Note that using `auto-build` is very likely to double the startup time for Keycloak. For most environments, this approach is not optimal.
  
  You start the server by entering the following command:
  
  .Using the `auto-build` option
  <@kc.start parameters="--auto-build --db postgres --db-url-host keycloak-postgres --db-username keycloak --db-password change_me --hostname mykeycloak.acme.com"/>
  
  By including the `auto-build` option, the server calculates the build options that have changed and runs the `build` command, if necessary, before starting the server.
  
  == Configuring the server by using configuration files
  
  By default, the server always fetches configuration options from the `conf/keycloak.conf` file. For a new installation,
  this file holds only the recommended settings for running in production and those settings are commented out.
  
  You can also specify a different configuration file by using the `[-cf|--config-file] option by entering the following command:
  
  .Running the `build` command using a custom configuration file
  <@kc.build rootParameters="-cf myconfig.conf"/>
  