---
title: JBoss and WildFly
description: You can deploy AM on JBoss AS, JBoss EAP, and WildFly. The procedures listed here provide steps for configuring JBoss AS, JBoss EAP, and WildFly for AM.
component: pingam
version: 8.1
page_id: pingam:installation:prepare-jboss
canonical_url: https://docs.pingidentity.com/pingam/8.1/installation/prepare-jboss.html
keywords: ["Install", "Web Container"]
page_aliases: ["install-guide:prepare-jboss.adoc"]
section_ids:
  prep-jboss-for-openam: Prepare JBoss or WildFly
  prep-openam-for-jboss: Prepare AM for JBoss and WildFly
---

# JBoss and WildFly

You can deploy AM on JBoss AS, JBoss EAP, and WildFly. The procedures listed here provide steps for configuring JBoss AS, JBoss EAP, and WildFly for AM.

After configuring JBoss or WildFly, you then prepare AM for deployment by making changes to the contents of the AM `.war` archive.

## Prepare JBoss or WildFly

1. Stop JBoss or WildFly.

2. The default JVM settings don't allocate enough memory to AM. This step shows one method you can use to modify the JVM settings. You can find other methods in JBoss [Configuring JVM Settings](https://docs.redhat.com/en/documentation/red_hat_jboss_enterprise_application_platform/8.1/html/configuration_guide/configuring-jvm-settings_default) or WildFly [JVM Settings](https://docs.jboss.org/author/display/WFLY/JVM%20settings.html).

   * Open the `standalone.conf` file in the `/path/to/jboss/bin` directory for JBoss or WildFly in standalone mode.

   * Check the JVM settings associated with `JAVA_OPTS`.

     Change the JVM heap size to `-Xmx2g`. The default JVM heap size for some versions of JBoss might already exceed the recommended value.

     Change the metaspace size to `-XX:MaxMetaspaceSize=256m` if the default size doesn't exceed this amount.

   * Set one of the following JVM `JAVA_OPTS` settings in the same file depending on which web application container you're preparing:

     * JBoss:

       ```none
       -Dorg.apache.tomcat.util.http.ServerCookie.ALWAYS_ADD_EXPIRES=true
       ```

       Make sure the headers include the `Expires` attribute in addition to `Max-Age` because some versions of Microsoft Edge don't support `Max-Age`.

     * WildFly:

       ```none
       -Dio.undertow.legacy.cookie.ALLOW_HTTP_SEPARATORS_IN_V0=true
       ```

3. Edit the WildFly configuration to allow HTTP connections from any IP address.

   In the `/path/to/wildfly/standalone/configuration/standalone.xml` file, locate the `<interface name="public">` interface (around line 512 of the file) and change the value to `<any-address/>`:

   ```xml
   <interface name="public">
      <any-address/>
   </interface>
   ```

4. Set up WildFly for Social Authentication by performing the following steps:

   * Ensure the WildFly server is running.

   * Go to the WildFly Path.

   * In the `$JBOSS_HOME/bin` directory, run the `jboss-cli.sh` script file:

     ```bash
     $ ./bin/jboss-cli.sh
     ```

   * Type "connect" to connect to the server.

   * Enable use of the equals (`=`) symbol in cookies by running the following command:

     For example:

     ```none
     [standalone@localhost:9990 /] /subsystem=undertow/server=default-server/
     http-listener=default:write-attribute(name=allow-equals-in-cookie-value,
     value=true)
     {
        "outcome" => "success",
        "response-headers" => {
           "operation-requires-reload" => true,
           "process-state" => "reload-required"
         }
     }
     ```

   * Restart WildFly.

5. Deploy the `am.war` file into the appropriate deployment directory. The directory varies depending on whether you're running in standalone or domain mode.

## Prepare AM for JBoss and WildFly

To prepare AM to run with JBoss or WildFly, you must change the default AM `war` file. JBoss and WildFly deploy applications from different temporary directories every time you restart the container, which would require reconfiguring AM. To avoid problems, change the AM `war` file as follows:

1. If you haven't already done so, create a temporary directory and expand the `AM-8.1.0.war` file. For example:

   ```bash
   $ cd /tmp
   $ mkdir /tmp/am && cd /tmp/am
   $ jar xvf ~/Downloads/AM-8.1.0.war
   ```

2. Locate the `bootstrap.properties` file in the `WEB-INF/classes` directory of the expanded `war` archive. Update the `# configuration.dir=` line in this file to specify a path with read and write permissions, then save the change.

   ```properties
   # This property should also be used when the system user that
   # is running the web/application server process does not have
   # a home directory. i.e. System.getProperty("user.home") returns
   # null.

   configuration.dir=/my/readwrite/config/dir
   ```

3. If you are deploying AM on JBoss AS or JBoss EAP, remove the `jboss-all.xml` file from the `WEB-INF` directory of the expanded `war` archive.

   Don't remove this file if you are deploying AM on WildFly.

4. Rebuild the `am.war` file.

   ```bash
   $ jar cvf ../am.war *
   ```
