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

# Configuring OpenMetadata to Run Under a Subpath

## Subpath in OpenMetadata

To configure **OpenMetadata** to operate under a subpath (e.g., `/openmetadata`)—useful when deploying behind a reverse proxy or load balancer—you need to adjust specific settings in the `openmetadata.yaml` configuration file.

***

## Configuration Steps

### 1. Set the Base Path

Define the `basePath` parameter to configure the application's root context, and ensure that the `publicKeyUrl` is updated accordingly to reflect the new base path.

This sets the root context for the application.

```yaml theme={null}
basePath: ${BASE_PATH:-/openmetadata}
```

This configuration sets the base path to /openmetadata by default. You can override it by setting the BASE\_PATH environment variable.

### 2. Configure Web Paths

Configure the web application and API endpoint paths to align with the specified base path.

```yaml theme={null}
web:
  applicationContextPath: ${BASE_PATH:-/openmetadata}
  rootPath: ${BASE_PATH:-/openmetadata}api/*
```

* `applicationContextPath`: Defines the context path for the web application.
* `rootPath`: Specifies the root path for API endpoints. [GitHub](https://github.com/open-metadata/OpenMetadata/discussions/17954)

### 3. Set Asset Paths

Ensure that asset paths are correctly prefixed with the base path.

```yaml theme={null}
assets:
  resourcePath: /openmetadata/assets/
  uriPath: ${BASE_PATH:-/openmetadata}
```

* `resourcePath`: Path to static resources.
* `uriPath`: URI path prefix for assets.

<img src="https://mintcdn.com/openmetadata/FFPgqWxUp0cM2_kH/public/images/deployment/subpath/subpath.gif?s=33becf4a150806c41e6ac2f299106475" alt="Subpath" width="800" height="450" data-path="public/images/deployment/subpath/subpath.gif" />

## Example Configuration

Here's how the relevant section of your `openmetadata.yaml` might look:

```yaml theme={null}
basePath: ${BASE_PATH:-/openmetadata}
publicKeyUrl: ${BASE_PATH:-/}api/v1/system/config/jwks

web:
  applicationContextPath: ${BASE_PATH:-/openmetadata}
  rootPath: ${BASE_PATH:-/openmetadata}api/*

assets:
  resourcePath: /openmetadata/assets/
  uriPath: ${BASE_PATH:-/openmetadata}
```

## Deployment Considerations

* **Reverse Proxy Configuration**: Ensure that your reverse proxy (e.g., NGINX, Apache) is configured to forward requests to the OpenMetadata application with the correct subpath.

* **Environment Variables**: You can override the default base path by setting the BASE\_PATH environment variable in your deployment environment. Ensure that related parameters such as basePath, applicationContextPath, rootPath, and publicKeyUrl are updated to reflect this change.

* **Static Assets**: Verify that static assets are accessible under the new subpath to prevent broken links or missing resources.
