> ## Documentation Index
> Fetch the complete documentation index at: https://docs.futurex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure the EJBCA server

> Procedural guide to configure EJBCA server to integrate with HSM via FXPKCS11 library.

Connecting the EJBCA environment to the HSM through the **FXPKCS11** library requires the configuration of various files by performing the following steps:

<Steps>
  <Step>
    Locate the `web.properties` file in the EJBCA path (`/opt/ejbca-install/ejbca_ce_6_15_2_ 6/conf/web.properties`) and open it in a text editor.
  </Step>

  <Step>
    Add the following new lines to the file:

    * `cryptotoken.p11.lib.115.name=Futurex`
    * `cryptotoken.p11.lib.115.file=/futurex/libfxpkcs11.so`

    <Note>
      The number depends on the previous libraries installed.
    </Note>
  </Step>

  <Step>
    Save the file.
  </Step>
</Steps>

To apply these changes, rebuild the EJBCA environment by using the following commands:

<Steps>
  <Step>
    Locate the `ejbca-install/` folder using the following **cd** command:

    ```shell expandable lines wrap title="Shell" theme={null}
    cd /opt/ejbca-install/
    ```
  </Step>

  <Step>
    Run the following commands:

    ```shell expandable lines wrap title="Shell" theme={null}
    ant -q clean deployear
    ant runinstall
    ant deploy-keystore
    ```
  </Step>

  <Step>
    Restart the Wildfly daemon.
  </Step>
</Steps>
