--- title: "Deploy Rocket.Chat AI Pipeline" slug: "deploy-rocket-chat-ai-pipeline" updated: 2026-09-30T21:29:20Z published: 2026-10-01T14:33:29Z canonical: "docs.rocket.chat/deploy-rocket-chat-ai-pipeline" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Deploy Rocket.Chat AI Pipeline ![](https://cdn.us.document360.io/6ae79a05-7252-45d0-96e8-8f375e07b1b2/Images/Documentation/Premium(1).svg) The Rocket.Chat AI (RAI) pipeline is the self-hosted Retrieval-Augmented Generation (RAG) backend for [AI Search](/v1/docs/ai-search) and the [Rocket.Chat AI app.](/v1/docs/rocketchat-ai-app) It indexes your workspace messages and retrieves the most relevant matches when someone searches or asks a question. A connected LLM can use those retrieved messages to generate grounded, context-aware answers without compromising data privacy or Rocket.Chat's role-based access controls (RBAC). This guide explains how the pipeline works and how to deploy it in your Kubernetes cluster. ## RAI pipeline components RAI features don't read your workspace database directly. Workspace data passes through the RAI pipeline, which processes, indexes, and stores it for the AI features to retrieve. The pipeline has two components: the **RAI pipeline server** and the **Mongo connector.** ### **Rocket.Chat AI pipeline server** The RAI pipeline server is the RAG engine that runs in your environment. The server exposes internal APIs for: - **Chunking and normalization**: Splits long messages, threads, and document context into chunks for indexing. - **Embeddings and vector storage**: Generates vector embeddings of message data and stores them with the message metadata. - **Hybrid retrieval**: Combines vector similarity with keyword scoring to find the message chunks that match a query. It is deployed using two Helm charts: - `foundation4ai-core`: Deploys foundational services, including Redis, NATS JetStream, Prometheus, and the stateful database backend. - `foundation4ai` : Deploys the API server, background workers, administrative dashboard, and database migrations. ### **Mongo connector** The Mongo connector connects your workspace's MongoDB database to the RAI pipeline server and controls what gets indexed. It handles: - **Historical backfill**: Reads existing message history from permitted rooms and sends it to the pipeline server for the first indexing run. - **Live sync**: Uses MongoDB change streams to pick up new messages and keep the index current. - **Room-level control**: Lets admins choose which rooms can be indexed. Messages from other rooms will not enter the pipeline. ## Prerequisites Before deploying the Rocket.Chat AI pipeline server and Mongo connector, ensure your environment meets the following requirements: 1. [**kubectl**](https://kubernetes.io/docs/tasks/tools/)**,** [**helm**](https://helm.sh/docs/intro/install/)**,** [**kustomize**](https://kustomize.io/)**,** [**yq**](https://github.com/mikefarah/yq)**,** [**just**](https://github.com/casey/just) You can install these tools on Linux with these commands: ```bash sudo snap install --edge --classic just sudo snap install helm --classic sudo snap install yq curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash sudo mv kustomize /usr/local/bin/kustomize ``` 2. **A working Kubernetes cluster with a default StorageClass** Verify your existing cluster and storage class: ```bash kubectl get nodes kubectl get storageclass ``` 3. **An image source with the deployment assets:** 1. Signed S3 bundle: A time-limited download link provided by Rocket.Chat containing the deployment images. 2. Amazon ECR: Access to the Amazon Elastic Container Registry provisioned by Rocket.Chat. 3. Custom registry: Images hosted in your own OCI-compatible container registry. 4. **A supported method for exposing traffic:** 1. An Ingress controller (NGINX or Traefik) 2. Gateway API ## Choose a deployment method After completing the prerequisites, choose one of the tabs below to continue. - **Interactive deployment**: Use the guided `setup.sh` script to automate image ingestion, secret generation, licensing, and deployment of the RAI pipeline server and Mongo connector. It's recommended for POC deployments, small-scale test environments, and requires minimal technical knowledge. - **Manual deployment**: Deploy Rocket.Chat AI Pipeline and the Mongo connector manually using the provided Helm charts. This approach provides full control over the deployment configuration and infrastructure, making it suitable for production environments, air-gapped systems, and customized Kubernetes deployments. It’s intended for administrators with strong technical experience. **Interactive deployment** The interactive deployment uses the `setup.sh` script to guide you through deploying pipeline server and the Mongo connector. The script validates your environment at each step. If an error occurs, it displays diagnostic information in the terminal and writes a timestamped log (`foundation4ai-setup-<timestamp>.log`) to the current directory. ### Step 1: Clone the setup repository Clone the Rocket.Chat AI pipeline setup repository and change to the project directory. ```bash git clone https://github.com/RocketChat/Docs.F4.RAG.git cd Docs.F4.RAG ``` ### Step 2: Run the setup script 1. Start the interactive deployment by running: ```bash ./setup.sh ``` 2. If the deployment directory with the required Helm charts is not already present, the script attempts to clone it before proceeding. You’ll be required to provide your [GitHub credentials](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#using-a-personal-access-token-on-the-command-line). 3. The script then validates your environment by checking that all required tools are installed and your Kubernetes cluster is accessible. If any tool is missing, the script exits and displays the appropriate installation command for your operating system. 4. If no reachable Kubernetes cluster is found, the script prompts you to install k3s. If you accept, it installs k3s, configures your Kubernetes context, and verifies cluster connectivity before continuing. ### Step 3: Choose an image source Choose how the Rocket.Chat AI pipeline server and Mongo connector images will be made available to your Kubernetes cluster. Select one of the following image sources: 1. **Amazon ECR**: Pull images directly from Amazon Elastic Container Registry (ECR). Choose this option if Rocket.Chat has provisioned ECR access for your deployment. 2. **Signed S3 bundle**: Download and import the signed image bundle provided by Rocket.Chat. Choose this option if Rocket.Chat has provided the URL to a signed S3 bundle. 3. **Custom registry**: Pull images from your own OCI-compatible container registry, such as Harbor, GitHub Container Registry (GHCR), or Docker Hub. ****Using a signed S3 bundle**** If you choose the signed S3 bundle, the script asks whether the deployment bundle is already available on your machine. - Enter *Yes* if the bundle is already on your machine, then provide its path. - Enter *No* if you need to download it, then paste the signed S3 URL provided by Rocket.Chat. The script downloads and verifies the archive, extracts its contents, and locates the required images and connector assets automatically. > [!NOTE] > If unzip is not installed on your machine, the script prompts you to install it automatically. ### Step 4: Load container images into your cluster After fetching the images, select how they should be loaded into your Kubernetes cluster. Choose one of the following options: - **Docker daemon**: Loads the images into your local Docker daemon so they can be tagged and pushed to a private container registry. - **kind**: Loads the images directly into a local kind cluster. - **Minikube**: Loads the images into a local Minikube cluster. - **k3s/containerd**: Imports the images directly into the native containerd image store. > [!NOTE] > If you're deploying from a signed S3 bundle, the images are configured with `imagePullPolicy: Never`. Ensure the required images are loaded onto every Kubernetes node that will run Foundation4AI or Mongo connector, as Kubernetes will not attempt to pull them from a remote registry. Once the images are loaded, the script updates `foundation4ai.values.yaml` with the correct image references. ### Step 5: Configure the database 1. Choose the PostgreSQL database that Foundation4AI will use. Select one of the following options: 1. **External PostgreSQL**: Connects Foundation4AI to an existing PostgreSQL database with the `pgvector` extension installed. This is the recommended option for production deployments. 2. **Internal PostgreSQL**: Deploys a PostgreSQL instance in your Kubernetes cluster using the bundled Helm chart. This option is intended for evaluation and non-production environments. 2. If you choose the internal PostgreSQL deployment, the script prompts you to configure credentials for the database super user and application user. It generates secure passwords by default, which you can accept or replace with your own values. > [!TIP] > Save these credentials securely, as they are required to manage the database after deployment. ### Step 6: Generate application secrets The setup script generates the application secrets required by Foundation4AI and writes them to `foundation4ai.secrets.env`. During this step, the script displays the following credentials: - Master API Key - Master Secret Save them immediately because they are displayed only once and are required to authenticate API requests to Foundation4AI. ### Step 7: Deploy Foundation4AI After generating the secrets and applying them to the cluster, the setup script deploys Foundation4AI in two stages: - It deploys the `foundation4ai-core` Helm chart, which installs the shared infrastructure required by the platform, including NATS, Redis, and Prometheus. - Once those services are ready, it deploys the `foundation4ai` Helm chart, which installs the Foundation4AI platform services. While deploying `foundation4ai`, the script displays your System ID and prompts you for a license key: 1. Send the System ID to Rocket.Chat to obtain your RAI pipeline license. 2. Paste the license key you received where prompted. The script validates the license, updates the deployment, and completes the installation. If you don't have a license yet, you can skip this step and activate it later by updating `foundation4ai.secrets.env` and running: ```bash just create-secrets just deploy-core just deploy ``` After the license is applied, the script waits for all Foundation4AI services to become ready before displaying the deployment status. ### Step 8: Deploy the Mongo connector After deploying Foundation4AI, choose whether to deploy the Mongo connector: 1. If you choose to continue, enter a domain name to access the connector from. Otherwise, leave the field blank to access the connector using port forwarding, which is suitable for local development and testing. > [!NOTE] > The domain name must resolve to your server IP address. 2. After the deployment completes, save the following credentials: 1. **API Key**: Used to authenticate requests to the Mongo connector API. 2. **Encryption Key**: Used to encrypt data managed by the connector. You'll need these credentials later when configuring the Mongo connector to connect to your Rocket.Chat workspace. ### Step 9. Access Rocket.Chat AI pipeline After the deployment completes, access the Foundation4AI API and dashboard using one of the following methods: ****Option 1: Ingress**** > [!NOTE] > A domain name is required and must resolve to your server's IP address. If your cluster uses an ingress controller, 1. Go to `foundation4ai-deployment` directory, open the `foundation4ai.values.yaml` and update the ingress configuration: ```yaml ingress:  enabled: true  className: "traefik"           # or "nginx", depending on your controller  annotations: {}  hosts:    - host:      paths:        - path: /          pathType: Prefix  tls:    - secretName: foundation4ai-tls      hosts:        - ``` Update the `className`, `annotations`, `hostnames`, and `TLS settings` to match your environment. Replace ** with your configured domain. 2. Redeploy Foundation4AI: ```bash just deploy ``` After the deployment completes, access Foundation4AI using the domain configured in the ingress section: - **API**: *http://* - **Dashboard**: *https:///dashboard* Replace ** with your configured domain. ****Option 2: Port forwarding**** To expose Foundation4AI internally for quick tests, run these commands on separate terminals: ```bash kubectl -n foundation4ai port-forward svc/foundation4ai-api-server 8000:80 kubectl -n foundation4ai port-forward svc/foundation4ai-dashboard 3000:80 ``` Once both commands are running, access Foundation4AI : - **API**: `http://localhost:8000` - **Dashboard**: `http://localhost:3000` ****Option 3: Gateway API HTTPRoute**** > [!NOTE] > A domain name is required and must resolve to your server's IP address. If your cluster uses the Kubernetes Gateway API, 1. Go to `foundation4ai-deployment` directory, open the `foundation4ai.values.yaml` and update the ingress configuration: ```yaml ingress:  enabled: false httpRoute:  enabled: true  annotations: {}  parentRefs:    - name: foundation4ai      sectionName: https  hostnames:    - ``` The referenced Gateway must already exist, `parentRefs.name` must match its name, and `sectionName` must match its HTTPS listener name. Replace ** with your configured domain. 2. After updating the values file, redeploy Foundation4AI. ```bash just deploy ``` After the deployment completes, access Foundation4AI using the hostname configured in the httpRoute section: - **API**: http://** - **Dashboard**: *https:///dashboard* Replace ** with your configured domain. #### Log in to the Rocket.Chat AI pipeline server dashboard Open the Rocket.Chat AI pipeline server dashboard in your browser: - If you're using port forwarding, navigate to `http://localhost:3000`. - If you configured ingress or Gateway API, go to `https://<your-domain>/dashboard`. Sign in using the `Master API Key` and `Master Secret` generated during Step 6. After signing in, the Rocket.Chat AI pipeline server dashboard opens.![](https://cdn.us.document360.io/6ae79a05-7252-45d0-96e8-8f375e07b1b2/Images/Documentation/Screenshot 2026-07-08 at 22.27.34.png) #### Access the Mongo connector dashboard Go to the domain you configured for the Mongo connector in your browser. The Mongo connector dashboard opens. ![](https://cdn.us.document360.io/6ae79a05-7252-45d0-96e8-8f375e07b1b2/Images/Documentation/Screenshot 2026-07-15 at 14.35.02.png) **Manual deployment** This guide walks you through deploying Rocket.Chat AI pipeline and the Mongo connector on a k3s Kubernetes cluster using the S3 deployment bundle provided by Rocket.Chat. The deployment bundle contains everything required to install Rocket.Chat AI, including the deployment repository, Helm charts, container images, configuration templates, and the Mongo connector deployment assets. > [!TIP] > Rocket.Chat AI supports multiple deployment options, including Docker, other Kubernetes distributions (such as kind and Minikube), and private container registries like Amazon ECR and GitHub Container Registry (GHCR). This guide focuses on deploying Rocket.Chat AI on a k3s cluster using the S3 deployment bundle. ### Part 1 : Deploy Foundation4AI The first step in setting up your Rocket.Chat AI pipeline is deploying the Foundation4AI server. #### Step 1: Prepare a namespace 1. Create the target namespace: ```plaintext kubectl create namespace foundation4ai ``` 2. Create a `.env` file in the deployment directory for `just`: ```bash cat > .env <<'EOF' CLUSTER= NAMESPACE=foundation4ai EOF ``` Leave `CLUSTER` empty if your current kube context already targets the right cluster. #### Step 2: Get your deployment assets 1. Download and verify the bundle: ```bash curl -L "" -o foundation4ai-customer-bundle.zip shasum -a 256 foundation4ai-customer-bundle.zip ``` Verify that the printed checksum matches the value provided by Rocket.Chat support before proceeding. 2. Extract the bundle and verify the included deployment assets. ```bash unzip foundation4ai-customer-bundle.zip cd foundation4ai-customer-bundle-* shasum -a 256 -c checksums.txt # or, if shasum isn't available: # sha256sum -c checksums.txt ``` 3. Prepare the deployment files: ```bash unzip deployment/foundation4ai-deployment.zip \    -d foundation4ai-deployment cd foundation4ai-deployment cp ../examples/foundation4ai.values.example.yaml \   foundation4ai.values.yaml ``` Do not start from an older values file. The image names and tags in `foundation4ai.values.yaml` must match the images you loaded or pushed. > [!NOTE] > The above steps may differ if your image source is different. #### Step 3: Load the container images The deployment bundle includes all required container images as compressed image archives (`.tar` files). Before deploying, import these images into the container runtime used by your k3s cluster. > [!NOTE] > This guide assumes your k3s cluster uses the default containerd runtime. If you're using a different container runtime, refer to its documentation for importing container images. 1. From the root directory of the extracted deployment bundle, import each image into k3s: ```bash # Load the platform and core model images for image in ../images/*.tar; do  sudo k3s ctr -n k8s.io images import "$image" done # Load the Mongo connector images for image in ../connector/images/*.tar; do  sudo k3s ctr -n k8s.io images import "$image" done ``` 2. After the import completes, verify that the images are available in the k3s container runtime. ```bash sudo k3s ctr images ls ``` #### Step 4: Configure Foundation4AI Because images are loaded directly onto the k3s host container runtime, you must configure the charts to look for local images rather than attempting to pull them from the public internet. Navigate to `foundation4ai-deployment`directory and open the `foundation4ai.values.yaml` : 1. Set the `pullPolicy:Never` for every image reference. 2. Update the repository for all images to match the imported image names from the bundle. 3. Enable PostgreSQL: ```yaml postgres:  enabled: true ``` 4. Set the storageClass: ```yaml nats:  config:    jetstream:      fileStore:        pvc:          storageClassName: ``` A missing or unbound StorageClass is the most common reason NATS pods stay pending. #### Step 5: Configure the secrets file 1. Copy the secrets template included in the `foundation4ai-deployment`directory: ```bash cp foundation4ai.secrets.env.template foundation4ai.secrets.env ``` 2. For the first deployment, set `FOUNDATION4AI_APP_LICENSE` to a temporary placeholder such as `placeholder-license`. You'll replace this value with your production license after retrieving your system ID later in this guide. 3. Generate the following application secrets required for the deployment with the commands below: 1. `FOUNDATION4AI_APP_MASTER_KEY`: This is the master key UUID, used as the API login username. ```bash python3 -c "import uuid; print(uuid.uuid4())" ``` 2. `FOUNDATION4AI_APP_SECRET`: The Fernet key used for internal encryption. ```bash python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())" ``` 3. `FOUNDATION4AI_APP_MASTER_SECRET`: A strong master secret, used as the API login password. ```bash python3 -c "import secrets; print(secrets.token_urlsafe(48))" ``` #### Step 6: Configure PostgreSQL and Redis 1. Foundation4AI requires a PostgreSQL database. 1. If you're using the bundled PostgreSQL deployment, configure the database credentials in foundation4ai.secrets.env: ```bash POSTGRES_DATABASE=foundation4ai POSTGRES_USER=foundation4ai POSTGRES_PASSWORD= POSTGRES_SUPERUSER_PASSWORD= ``` 2. If you're using an external PostgreSQL instance, update the PostgreSQL connection string instead: ```bash POSTGRES_URL=postgresql://:@:5432/ ``` 2. Set a password for the bundled Redis: ```bash REDIS_PASSWORD= ``` #### Step 7: Create the Kubernetes secret After updating `foundation4ai.secrets.env`, create the Kubernetes secret: ```bash just create-secrets ``` #### Step 9: Deploy Foundation4AI 1. From the `foundation4ai-deployment`directory, run: ```plaintext just deploy-core ``` The deployment may take several minutes to complete depending on your cluster and network. 2. Confirm that all Foundation4AI Core resources have been deployed successfully: ```plaintext kubectl get pods -n foundation4ai kubectl get pvc -n foundation4ai ``` 3. After Foundation4AI Core is running, retrieve the unique System ID for your deployment. ```plaintext just system-id ``` If you loaded images from an S3 bundle , use this instead: ```bash kubectl -n foundation4ai delete job get-system-id --ignore-not-found kubectl -n foundation4ai apply -f - <<'EOF' apiVersion: batch/v1 kind: Job metadata:  name: get-system-id spec:  template:    spec:      restartPolicy: Never      containers:        - name: get-system-id          image: :          imagePullPolicy: Never          env:            - name: FOUNDATION4AI_DATABASE_URL              valueFrom:                secretKeyRef:                  name: foundation4ai-secrets                  key: FOUNDATION4AI_DATABASE_URL          command: [sh, -c]          args:            - |              for bin in ./foundation4ai /app/foundation4ai_v1 /app/foundation4ai; do                [ -x "$bin" ] && { "$bin" database migrate && "$bin" license system-id; exit $?; }              done              echo "Binary not found" && exit 1 EOF kubectl -n foundation4ai wait --for=condition=complete job/get-system-id --timeout=120s kubectl -n foundation4ai logs job/get-system-id | grep -v '^Migrated' kubectl -n foundation4ai delete job get-system-id ``` 4. Send your System ID to your Rocket.Chat representative or support team to obtain a Rocket.Chat AI license. You'll receive a license string that is tied to your deployment. 5. Once you have the license, open `foundation4ai.secrets.env` and update the license: ```bash FOUNDATION4AI_APP_LICENSE= ``` 6. Once you've updated `foundation4ai.secrets.env`, create the Kubernetes secret: ```plaintext just create-secrets ``` Verify that the secret was created successfully: ```bash kubectl get secret foundation4ai-secrets -n foundation4ai ``` 7. Reapply the secrets and deploy: ```plaintext just create-secrets just deploy-core just deploy ``` 8. Verify the application pods: ```bash kubectl get pods -n foundation4ai kubectl get deploy -n foundation4ai kubectl get jobs -n foundation4ai ``` You should see: 1. API server pods running 2. worker pods running 3. dashboard pod running 4. migration, license, and admin-key jobs completed #### Access Foundation4AI After the deployment completes, access the Foundation4AI API and dashboard using one of the following methods: ****Option 1: Ingress**** If your cluster uses an ingress controller, 1. Open the `foundation4ai.values.yaml` and edit the ingress configuration: ```yaml ingress:  enabled: true  className: "nginx"           # or "traefik", depending on your controller  annotations: {}  hosts:    - host: foundation4ai.example.com      paths:        - path: /          pathType: Prefix  tls:    - secretName: foundation4ai-tls      hosts:        - foundation4ai.example.com httpRoute:  enabled: false ``` Update the `className`, `annotations`, `hostnames`, and `TLS settings` to match your environment. 2. Redeploy Foundation4AI: ```bash just deploy ``` After the deployment completes, access Foundation4AI using the hostname configured in the ingress section: - **API**: http://** - **Dashboard**: https://**/dashboard Replace ** with your configured hostname. ****Option 2: Port forwarding**** To expose Foundation4AI internally for quick tests, run these commands on seperate terminals: ```bash kubectl -n foundation4ai port-forward svc/foundation4ai-api-server 8000:80 kubectl -n foundation4ai port-forward svc/foundation4ai-dashboard 3000:80 ``` Once both commands are running, access: - **API**: `http://localhost:8000` - **Dashboard**: `http://localhost:3000` ****Option 3: Gateway API HTTPRoute**** If your cluster uses the Kubernetes Gateway API, 1. Open the `foundation4ai.values.yaml` and enable the httpRoute configuration instead of ingress: ```yaml ingress:  enabled: false httpRoute:  enabled: true  annotations: {}  parentRefs:    - name: foundation4ai      sectionName: https  hostnames:    - foundation4ai.example.com ``` The referenced Gateway must already exist, `parentRefs.name` must match its name, and `sectionName` must match its HTTPS listener name. 2. After updating the values file, redeploy Foundation4AI. ```bash just deploy ``` After the deployment completes, access Foundation4AI using the hostname configured in the httpRoute section: - **API**: http://** - **Dashboard**: https://**/dashboard Replace ** with your configured hostname. #### Log in to the Foundation4AI dashboard Open the Foundation4AI dashboard in your browser: - If you're using port forwarding, navigate to `http://localhost:3000`. - If you configured an ingress or Gateway API, use the hostname you configured for the dashboard. Log in using the `Master API Key` and `Master Secret` generated during Step 5. After signing in, you should see the Foundation4AI dashboard. ![](https://cdn.us.document360.io/6ae79a05-7252-45d0-96e8-8f375e07b1b2/Images/Documentation/Screenshot%202026-07-08%20at%2022.27.34.png) ### Part 2 : Deploy Rocket.Chat Mongo connector Rocket.Chat AI pipeline is now deployed and ready to process documents. The next steps configure the Rocket.Chat Mongo connector to ingest conversations into Foundation4AI. If you received the S3 customer bundle, use the bundled connector chart and images. This avoids separate GHCR chart/image access and gives you a single handoff artifact. The S3 bundle contains: - connector/charts/rocketchat-ai-mongo-connector-0.1.1-0504c58.tgz - connector/images/rocketchat-ai-mongo-connector-api_sha-0504c58.tar - connector/images/rocketchat-ai-mongo-connector-web_sha-0504c58.tar - connector/examples/rocketchat-ai-mongo-connector.values.s3-local-demo.yaml - connector/examples/rocketchat-ai-mongo-connector.values.registry-import.yaml - connector/examples/rai-mongo-connector.secret.example.yaml #### Step 1: Import the connector images ```bash for image in connector/images/*.tar; do  sudo k3s ctr -n k8s.io images import "$image" done ``` #### Step 2: Write the connector values file This path uses SQLite for the connector's control-plane database (matches the single-node setup) and one replica each for the API and web services .SQLite doesn't support multiple API pods writing to it at once. Create `connector-values.yaml`: ```bash fullnameOverride: rai-mongo-connector api:  replicaCount: 1                    # don't scale past 1 — SQLite can't take concurrent writers  image:    repository: ghcr.io/rocketchat/rocketchat-ai-mongo-connector-api    tag: sha-0504c58    pullPolicy: Never                  env:    databaseBackend: sqlite    dbPath: /data/control_plane.db    logLevel: INFO  secretEnv:    create: true    values:      RAI_MONGO_CONNECTOR_API_KEY:                  # required      RAI_MONGO_CONNECTOR_DATA_ENCRYPTION_KEY:  # protects stored Mongo/pipeline credentials  persistence:    enabled: true                    # backs the SQLite file    size: 20Gi    mountPath: /data web:  replicaCount: 1  image:    repository: ghcr.io/rocketchat/rocketchat-ai-mongo-connector-web    tag: sha-0504c58    pullPolicy: Never  api:    url: /api                        # same-origin browser path, proxied internally to the API service ingress:  enabled: false                     ``` Enter `RAI_MONGO_CONNECTOR_API_KEY` and `RAI_MONGO_CONNECTOR_DATA_ENCRYPTION_KEY` . #### Step 3: Install the chart ```bash helm install rai-mongo-connector \  connector/charts/rocketchat-ai-mongo-connector-0.1.1-0504c58.tgz \  -n foundation4ai \  --create-namespace \  -f connector-values.yaml ``` #### Step 4: Verify the connector pods ```plaintext kubectl get pods -n foundation4ai -l app.kubernetes.io/instance=rai-mongo-connector ``` You should see one API pod and one web pod running. > [!NOTE] > **Important SQLite Upgrade Note** > > When SQLite is backed by a ReadWriteOnce volume, rolling updates can fail with volume multi-attach errors if the old API pod is still attached to the PVC. > > Operationally safe approach: > > - If your chart version supports it, let the chart use its built-in Recreate strategy for SQLite-backed API deployments > - If you are still on an older release or doing a manual rollout, scale the API deployment to 0, wait for the old pod to terminate, then upgrade > > That causes brief downtime, but it avoids PVC attach conflicts. #### Step 5: Access the Mongo connector Expose the connector using port forwarding. ```bash kubectl port-forward svc/mongo-connector-web 8081:80 -n foundation4ai ``` Open your browser and navigate to: `http://localhost:8081.` The Mongo connector setup page should appear. ## Next steps You've successfully deployed the Rocket.Chat AI pipeline server and Mongo connector. The next step is to connect the Mongo connector to your Rocket.Chat workspace. Continue to [Index Workspace Data with Mongo connector](/v1/docs/index-workspace-data-with-mongo-connector) to connect your workspace and choose which rooms to index. After the initial indexing is complete, your workspace data is ready for AI search, summaries, and other AI features.