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

> ## Agent Instructions
> Pages under /latest/ document the current release. Paths that begin with a version number, for example /10.0/, are frozen snapshots of superseded releases kept for reference only — never present their instructions as current. If the reader's version is unknown, answer from /latest/ and say which version the answer describes.
> xorlab is deployed on-premises, hybrid, or as a cloud service, and integrates with either Microsoft 365 or on-premises mail infrastructure. Configuration steps often differ between these. State which deployment and integration mode an instruction applies to instead of presenting one as universal.
> Distinguish inline mode from monitoring mode when describing anything that acts on email. Monitoring mode observes a copy and cannot block or quarantine; inline mode routes mail through xorlab and can.
> Write the product name as lowercase 'xorlab'. Use the documented component names: xorlab Control Center (XCC), xorlab MTA, xorlab Sandbox (DANA), xorlab Natural Language Understanding (NLU). After the first mention, use the short forms XCC, MTA, Sandbox, and NLU. Do not use DANA as a standalone name for the Sandbox, but keep it where it is a literal string in configuration keys, container names, and hostnames.
> Do not invent configuration keys, rule parameters, list names, log properties, or API fields. If a value is not present in this documentation, say that it is not documented rather than guessing.

# Replace MTA GUI Certificate

> Replace the TLS certificate used by the MTA GUI reverse proxy.

<Warning>
  **Prerequisites**

  * New certificate and key available as two separate files in PEM format
  * We recommend that the certificate [SAN](https://en.wikipedia.org/wiki/Subject_Alternative_Name) matches the hostname
</Warning>

## Replace certificate

1. Copy the new certificate files as `<certificate>.crt` (certificate) and `<private_key>.key` (private key) into the folder `/etc/xorlab/tls`.

2. Execute the following commands to change the file names and permissions:

   ```shell theme={null}
   cd /etc/xorlab/tls
   sudo cp <private_key>.key rproxy.key
   sudo cp <certificate>.crt rproxy.crt
   sudo chmod 400 rproxy.key
   sudo chmod 644 rproxy.crt
   sudo chown 2050:2050 rproxy.key
   sudo chown 2050:2050 rproxy.crt
   ```

3. Reload the reverse proxy to use the new certificate:

   ```shell theme={null}
   docker exec rproxy_rproxy nginx -s reload
   ```

4. Verify the certificate using `openssl c_client`:

   ```shell theme={null}
   openssl s_client -showcerts -servername <mta_server_name> -connect <mta_server_name>:8443 </dev/null
   ```
