[id='jgroups_external-{context}']
= Using External JGroups Stacks
Reference external files that define custom JGroups stacks in `infinispan.xml` files.

.Procedure

ifdef::server_mode[]
. Add custom JGroups stack files to the `{server_home}/server/conf` directory.
endif::server_mode[]
ifdef::embedded_mode[]
. Put custom JGroups stack files on the application classpath.
endif::embedded_mode[]
+
Alternatively you can specify an absolute path when you declare the external stack file.
+
. Reference the external stack file with the `stack-file` element.
+
[source,xml,options="nowrap",subs=attributes+]
----
include::config_examples/config_external_jgroups.xml[]
----
+
<1> Creates a stack named "prod-tcp" that uses the "prod-jgroups-tcp.xml" definition.
<2> Configures {brandname} to use "prod-tcp" for cluster transport.
