Updating production guide with information about switching from ipv4 to ipv6

Closes #11979
This commit is contained in:
Pedro Igor 2022-08-05 11:35:21 -03:00 committed by Bruno Oliveira da Silva
parent 2392af157b
commit cf249fc6ae

View file

@ -36,4 +36,19 @@ Keycloak runs on top of JGroups and Infinispan, which provide a reliable, high-a
To find out more about using multiple nodes, the different caches and an appropriate stack for your environment, see the <@links.server id="caching"/> guide. To find out more about using multiple nodes, the different caches and an appropriate stack for your environment, see the <@links.server id="caching"/> guide.
== Configure Keycloak Server with IPv6 or IPv4
The system properties `java.net.preferIPv4Stack` and `java.net.preferIPv6Addresses` are used to configure the JVM for use with IPv4 or IPv6 addresses.
By default, Keycloak is configured to prefer IPv4 addresses. In order to run with IPv6 addresses,
you need to specify `java.net.preferIPv4Stack=false` (the JVM default) and `java.net.preferIPv6Addresses=true`.
The latter ensures that any hostname to IP address conversions always return IPv6 address variants.
These system properties are conveniently set by the `JAVA_OPTS_APPEND` environment variable. For example, to change the IP stack preference from its default of IPv4 to IPv6, set an environment variable as follows:
[source, bash]
----
export JAVA_OPTS_APPEND="-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true"
----
</@tmpl.guide> </@tmpl.guide>