# Configuring Rasa X postgresql as external instance

**URL:** <https://forum.rasa.com/t/configuring-rasa-x-postgresql-as-external-instance/39175>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [January 18, 2021, 12:28pm UTC](https://forum.rasa.com/t/configuring-rasa-x-postgresql-as-external-instance/39175 "2021-01-18T12:28:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chidi\_251](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@Chidi\_251](https://forum.rasa.com/u/Chidi_251)\
**Post date:** [January 18, 2021, 12:28pm UTC](https://forum.rasa.com/t/configuring-rasa-x-postgresql-as-external-instance/39175/1 "2021-01-18T12:28:34Z")

</div>

I am trying to convert the default postgresql instance that comes with Rasa X to an external one I have set up, so that I can store conversations there.

I deployed my Rasa X with the Helm Chart Installation method.

I read from the docs that I have to do the following:

postgresql: install: false existingHost: “” existingSecretKey: “”

global: postgresql: existingSecret: “” servicePort: postgresqlDatabase: “” postgresqlUsername: “”

I understand what to do from the docs, except I am not sure what to put as existingSecret and existingSecretKey.

I will appreciate any help as this is very urgent!

Best regards,

Chidi Akurunwa.

---

<div class="post-metadata">

**Author:** ![teremterem](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/teremterem/32/16484_2.png) [@teremterem](https://forum.rasa.com/u/teremterem)\
**Post date:** [October 22, 2021, 8:05pm UTC](https://forum.rasa.com/t/configuring-rasa-x-postgresql-as-external-instance/39175/2 "2021-10-22T20:05:46Z")

</div>

Here is how I solved it for myself.

Firstly, I added these lines to `values.yml` (make sure to replace `my.postgres.host` with your actual host name):

```auto
...

postgresql:
    install: false
    existingHost: "my.postgres.host"
    existingSecretKey: "postgresql-password"
...

global:
    postgresql:
        existingSecret: "my-postgresql-secret"
...

```

**NOTE:** The phrase `postgresql-password` here is just an arbitrary name that I chose for my secret key (do not replace it with the actual password - you will be specifying the actual password later).

After that I created `my-postgresql-secret` secret using the following command (make sure to replace `YOUR-NAMESPACE` with the actual namespace you’re deploying in):

```bash
kubectl --namespace YOUR-NAMESPACE create secret generic my-postgresql-secret

```

Then I opened the secret in order to edit its content:

```bash
kubectl --namespace YOUR-NAMESPACE edit secret my-postgresql-secret

```

This command opened vim editor for me and presented me with content similar to the following:

```auto
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
kind: Secret
metadata:
  creationTimestamp: "2021-10-22T19:35:39Z"
  name: my-postgresql-secret
  namespace: YOUR-NAMESPACE
  resourceVersion: "1371123"
  uid: 1a342634-12ba-47eb-a4ac-dbc535e87f10
type: Opaque

```

I appended `stringData: postgresql-password: ...` to the end (and saved my changes using `:wq` in vim):

```auto
  ...
type: Opaque
stringData:
  postgresql-password: your-actual-postgresql-password

```

After that I installed Rasa X helm chart.

P. S. You can find more info on how to manage secrets in Kubernetes here: [Managing Secrets using Configuration File | Kubernetes](https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-config-file/)
