You are viewing documentation for a legacy Rasa product. If you want to get started building assistants with Rasa please check out our latest [documentation here](/content/docs/index.html).

Rasa Enterprise is officially compatible with the following databases:

- PostgreSQL
- Oracle ≥ 11.0

By default, Rasa Enterprise uses PostgreSQL as a database. It can be configured to use an on-premise database or your own cloud provided database. Using Oracle as your Rasa Enterprise database instead of PostgreSQL also requires some additional setup (see below).

## PostgreSQL [#](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/installation-and-setup/configure/database/#postgresql "Direct link to heading")

The default database started by the Rasa Enterprise Helm chart is PostgreSQL, which refers to the PostgreSQL subchart. See the page on [configuring the subcharts](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/installation-and-setup/configure/configure-subcharts) to configure the default instance or to use an external Postgres instance.

## Oracle [#](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/installation-and-setup/configure/database/#oracle "Direct link to heading")

Using Oracle as your Rasa Enterprise database instead of PostgreSQL requires some additional setup, which we’ll go over here.

1. **Database Setup**  
In your Oracle database, create an empty database called `rasa` and configure a user/password that has access to it. You can also use a database with a different name, as long as it is empty and you specify this in the `DB_DATABASE` environment variable (read more in [Adding Environment Variables](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/installation-and-setup/configure/add-environment-variables)).

2. **Rasa Enterprise Configuration**  
   Next you have to extend the Rasa Enterprise image to include the necessary drivers and clients. First download the [Oracle Instant Client](https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html), rename it to `oracle.rpm` and store it in the directory from where you’ll be building the Docker image.

Copy the following into a file called `Dockerfile`:

```
   FROM rasa/rasa-x:1.2.2

# Switch to root user to install packages
   USER root

RUN apt-get update -qq && apt-get install -y --no-install-recommends alien libaio1 && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Copy in oracle instaclient
   COPY oracle.rpm oracle.rpm

# Install the Python wrapper library for the Oracle drivers
   RUN pip install cx-Oracle

# Install Oracle client libraries
   RUN alien -i oracle.rpm
   USER 1001
   ```

Then build the Docker image:
   ```
   docker build . -t rasa/rasa-x:1.2.2-oracle
   ```
   Then push it to your private image registry.

You can now use this image instead of the standard one, by replacing it in your `values.yml`:
   ```
   rasax:
   name: "<your-registry/your-extended-image>"
   tag: "<tag-for-extended-image>"
   ```
   You will also have to disable installing Postgres and configure the following [environment variables](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/installation-and-setup/configure/add-environment-variables) and a secret for the `rasax`, `eventService` and `dbMigrationService` sections.

Create the secret as follows:
   ```
   # This will prompt for the oracle password and not echo the characters to your screen
   read -s ORACLE_PASSWORD
   kubectl create secret generic oracle-password --from-literal=oracle-password="${ORACLE_PASSWORD}"
   ```
   And update the `values.yaml` as follows:
   ```
   postgresql:
     install: false
   rasax:
     extraEnvs:
       - name: "DB_USER"
         value: "<user>"
       - name: "DB_PASSWORD"
         valueFrom:
           secretKeyRef:
             key: oracle-password
             name: oracle-password
       - name: "DB_DATABASE"
         value: "rasa"
       - name: "DB_DRIVER"
         value: "oracle+cx_oracle"
       - name: "DB_PORT"
         value: "<port of db>"
       - name: "DB_HOST"
         value: "<host of db>"
       - name: "DB_QUERY"
         value: "<query>"
   dbMigrationService:
     extraEnvs:
       <as above>
   eventService:
     extraEnvs:
       <as above>
   ```
   Alternatively, you can also directly pass the database connection URL to the container, by defining the `DB_URL` variable ( **_this is not advised as it leaves the database password in plaintext_**):
   ```
   rasax:
     extraEnvs:
       - name: "DB_URL"
         value: "oracle+cx_oracle://user:password@your.database.com:<port>/<database name>"
   dbMigrationService:
     extraEnvs:
       <as above>
   eventService:
     extraEnvs:
       <as above>
   ```

##### note
The settings above **do not** set up Oracle as a tracker store. To use Oracle for the tracker store, please see the Rasa Open Source [docs](/content/docs/rasa/tracker-stores/#sqltrackerstore/index.html) and configure the endpoints for your Rasa Open Source servers correctly.
