> ## 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.

# Import TLS certificates into TrueNAS

> Step-by-step guide to import TLS certificates, private keys, and CA certs into TrueNAS via the web UI.

This section explains how to import the TrueNAS TLS certificate, TrueNAS private key, and CA certificates into TrueNAS through the web interface.

Before importing, you must export the client private key from the PKCS #12 file by using OpenSSL. Perform the following tasks:

1. Extract the client private key from the PKCS #12 file.
2. Import the CA certificate.
3. Import the TrueNAS certificate.

## Extract the private key

Perform the following steps to extract the client private key from the PKCS #12 file:

<Steps>
  <Step>
    Open a terminal application that has OpenSSL installed.
  </Step>

  <Step>
    Go to the directory with the PKCS #12 file.
  </Step>

  <Step>
    Run the following OpenSSL command to extract the clear client private key from the PKCS #12 file and save it to a new `PEM` file:

    ```text expandable lines wrap title="Text" theme={null}
    $ openssl pkcs12 -in pki.p12 -out client-key.pem -nodes -nocerts
    ```

    The command prompts for the import password. Enter the password contained in the `pki-password.txt` file.
  </Step>
</Steps>

## Import the CA certificate

Perform the following steps to import the CA certificate:

<Steps>
  <Step>
    Log in to the TrueNAS web interface.
  </Step>

  <Step>
    Go to **System** > **CAs** and select **\[ Add ]**.
  </Step>

  <Step>
    In the **Type** drop-down menu, select **Import CA**.
  </Step>

  <Step>
    Enter a name for the CA, then paste the CA certificates from the `ca-chain.pem` file into the **Certificate** field.
  </Step>

  <Step>
    Leave the **Private Key** and **Passphrase** fields empty and select **\[ Submit ]**.
  </Step>
</Steps>

## Import the certificate

Perform the following steps to import the TrueNAS certificate:

<Steps>
  <Step>
    Log in to the TrueNAS web interface.
  </Step>

  <Step>
    Go to **System** > **Certificates** and select **\[ Add ]**.
  </Step>

  <Step>
    In the **Type** drop-down menu, select **Import Certificate**.
  </Step>

  <Step>
    Enter a name for the certificate, and paste the TrueNAS certificate (`client-cert.pem`) and private key (`client-key.pem`) into the appropriate fields.
  </Step>

  <Step>
    Leave the **Passphrase** field empty and select **\[ Submit ]**.
  </Step>
</Steps>
