Deploy to a Server

For running Rasa X on a server, we support Docker. We provide template docker-compose files which you can use directly. We also provide Helm Charts for running Rasa X on Kubernetes or OpenShift.

The Docker images for Rasa X Community Edition are freely available via Docker Hub. The images for Rasa X Enterprise Edition are hosted on a private registry and are accessible with an enterprise license.

Note

This is the documentation for version 0.23.3 of Rasa X. Make sure you select the appropriate version of the documentation for the version you want to install.

Installation

Hardware & OS Requirements

We recommend 8 GB RAM and 2-6 vCPUs for optimal performance. 4 GB RAM is the bare minimum. Your server should also have at least 100 GB disk space available. You will need a server running a modern Linux distribution that can run Docker. The following OS’s work with the quick installation script below:

  • Debian 9
  • Ubuntu 16.04 / 18.04

When creating the server, make sure the following ports of are open:

Port Service Description
22 SSH SSH access.
80 HTTP Web application access.
443 HTTPS Web application over HTTPS access (optional)

For any other operating systems, please follow the Manual Installation instructions. As long as Docker is available for your operating system, Rasa X should run fine.

The web interface aims to support browsers that meet the following criteria:

  • > 0.2% market share
  • not Internet Explorer
  • not Opera Mini

Quick Installation

We provide a script for a fully-automated install which works on Ubuntu 16+:

  1. If you have an enterprise license, copy it to your server. Skip this step if you are using Rasa X Community Edition.

    $ scp rasa-x-ee-license.yml example.com:~/rasa-x-ee-license.yml
    

    Make sure the license is in your working directory on the server before proceeding to the next step.

  2. Download and run the install script on the server:

    To install all of the files into the default folder, /etc/rasa, run the following command, replacing <rasa_x_version> with the version of Rasa X you would like to install. This is the documentation for version 0.23.3.

    $ curl -sSL -o install.sh https://storage.googleapis.com/rasa-x-releases/<rasa_x_version>/install.sh
    $ sudo bash ./install.sh
    

    To choose your own installation folder instead, set the RASA_HOME environment variable:

    $ curl -sSL -o install.sh https://storage.googleapis.com/rasa-x-releases/<rasa_x_version>/install.sh
    $ export RASA_HOME=~/rasa/dir
    $ sudo bash -E ./install.sh  # -E will preserve the environment variable you set
    

    You will be prompted to accept the terms and conditions. Read the terms, then hit return to continue. If installing CE, you will be asked whether you agree to metrics tracking; hit return to opt in, or type NO to disagree.

  3. Replace the default app image with the image of your custom action server. See this guide for more information on how to do so.

    To avoid your changes in the docker-compose file being overwritten when you update versions, you should not apply your changes to docker-compose.yml. Instead, create a new file called docker-compose.override.yml inside your ${RASA_HOME} and apply your changes there. Docker will automatically take that file into account and override any attributes in docker-compose.yml with changes from the override file.

    The contents of docker-compose.override.yml might look like this:

    version: '3.4'
    services:
      app:
        image: <your image>
    
  4. Start Rasa X:

    $ cd ${RASA_HOME}
    $ sudo docker-compose up -d
    
  5. Set your password:

    If you are using Rasa X CE, please set your admin password:

    $ cd ${RASA_HOME}
    $ sudo python rasa_x_commands.py create --update admin me <PASSWORD>
    

    Rasa X EE users should instead create an admin user with a username and a password:

    $ cd ${RASA_HOME}
    $ sudo python rasa_x_commands.py create admin <USER> <PASSWORD>
    
  6. Navigate to the hostname or IP where your server is reachable and log in using your newly created password.

    If you have an existing Rasa assistant running, you can import those user-assistant conversations into your local instance of Rasa X. See Import Existing Conversations. If this is a new Rasa project, you can get your first conversations by inviting some test users to try your assistant.

Manual Installation

  1. Make sure python3, docker, and docker-compose are installed on your server. Detailed instructions can be found in the Docker documentation. You should be able to run

    $ python3 --version && docker -v && docker-compose -v
    

    Note that your python version should be above 3.6 to use Rasa and Rasa X.

  2. Create the project directory and switch to it, for example, /etc/rasa:

    $ mkdir /etc/rasa
    $ cd /etc/rasa
    
  3. Download the Rasa X docker-compose and commands files (docker-compose.ce.yml and rasa_x_commands.py), which contain the containers and their setup. Replace <rasa_x_version> with the version of Rasa X you would like to install. This is the documentation for version 0.23.3.

    To get Rasa X CE:

    $ wget -qO docker-compose.yml https://storage.googleapis.com/rasa-x-releases/<rasa_x_version>/docker-compose.ce.yml
    $ wget -qO rasa_x_commands.py https://storage.googleapis.com/rasa-x-releases/<rasa_x_version>/rasa_x_commands.py
    

    To get Rasa X EE:

    $ wget -qO docker-compose.yml https://storage.googleapis.com/rasa-x-releases/<rasa_x_version>/docker-compose.ee.yml
    $ wget -qO rasa_x_commands.py https://storage.googleapis.com/rasa-x-releases/<rasa_x_version>/rasa_x_commands.py
    
  4. Skip this step if you are using Rasa X CE. Create the authentication file to download containers from the private Docker registry.

    To authenticate against the registry that contains the Rasa X containers, you need to create a file in /etc/rasa/gcr-auth.json that contains the JSON of the field docker_registry_license from your rasa-x-ee-license.yml file.

    Make sure to copy the entire contents of the docker_registry_license key to that file. The contents of /etc/rasa/gcr-auth.json should look like this:

    {
      "type": "service_account",
      "project_id": "rasa-platform",
      "private_key_id": "sdferw234qadst423qafdgxhw",
      "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvfwrt423qwadsfghtzw0BAQEFAASCBKgwggSkAgEAAoIBAQCgt338FkWbW13dghtzew4easdf5wAi15jrA9t4uOk8dghrtze4weasfgdhtAFZNfrLgvr2\nPBTu1lAJDLo136ZGTdMKi+/TuRqrIMg/sr8q0Ungish8v6t5Jb4gsjBi9StytCT4\nhWXDL3qeadfsgeDOudl6c3iMzylBws+VffrFfaZWjDpGtxmlYwIUa2e\noNSe7BYLnY9tDrX3zrP/wu/6FPbbGkBjguDG1l3Kx7l1wmiPtK5lIhjt+k7Oyx/u\nd6+gvfs+7RX9wUxnZT/tLggybYdsr8BA1Pqr0hDmhdDl7tjXVTmGLG+1/+lXVGFc\nqKEg+uLXAgMBAAECggEAESzwRK0Cp62LgBjInk+jvTmMI4lYP/XTnfk0TNwyiLxd\nT7mkw/TzkSVRifZ37lBQ6BS6BiqBJherh1N4xI+DF9HUN/wHR93QTyu7p8umlcxC\nlPV0KE4b5ZMfWvRG4y236cRGly9urcBNGoFzFHl8pd2iS5DMqZOYpSXY+qvkXTKE\nUOm5mVSs4S4Qa9cHL+jWXCvY0789fG1GrT+L3Fn+StKacgQuBnN1krYFYBSjCAh8\nsnSdjkvGguw/6OApPHd8HqkHtjU0PD67uU5QIm5N1bmz9KT4s9Pm+WbCinEstIiN\nIfln5ikmHcMAiIS0gzSnZavsY21PsDHBkD8SUO7CTQKBgQDgMPhx0TsB/oVH/SnU\nt3oTME+tfAKI69tozX02jHj6DY/vDpI1hXNmb4oMOos5+3ulborHqnso9za1RgV7\nm2N04QQVfzYEuZzJzXL11SHvBYVjHkXYy6HR5GhnPmwA+CzrDNy2/oYxlaqH7TBA\nR+f7IHToIPKGCVrhCJztlAgzIwKBgQC3hQNclIQ5Iw0gm9Rr8zAP/YoRJdiUSYtv\nNBmav+dTTSkPh51Bomj/J4Rrg8OLvHG5U79pmzbQdIFGYGKlR0l4/QepKpbaGm7x\nM/gRp/GXu9sN8LgI+h+FskCYi4cuqDjQ9L2S0gwMre4witmeVSIiBxLWxS7mvkZX\nWRW58ml2vQKBgBozPuW2SQobn6HhIUFdy+NwMu+YXYd44ORnl2mHkx/N8/NBJa8h\nkHH5OQ3izaCSFkooGAnrj4cjFP6sVzmx2DaxkVOd0UdOFdezreqy5MtVPthtkkYa\nzieEZPsj3WVjm4RAtY6hQjeLQSmve4MXpDHCAkeaih1F/Jvt8MEHGso3AoGBAJez\nTioTYpFQliNkbN2nMw2kyaKPJE6/1JDiAmBXTcMgP1blBWsh86UnZ2DwlI5IAcHu\npoWHlnIOPGaOejyhhuyKTPDbkcNMonSkPuVpbF2/Hb6SQ664A6KizJ7Mh7xbtkuU\nY7igBPHePMzHmkg1m3eBXWNHsBNxKfg+XaVN6zwJAoGBAN6VhGMmyDcn0GqkkP6d\nrSsQ0Ig7L4PnU633oYWoGWa8q/XYiFbcACMFynMbrmHG+/0c3Iwt32bi3th60Cwb\nT66yqmv4MaT72+EfQHxiLxnUxhqSpBXM0eoXbyvDg97Zp/slsYvGGLjONmmretlE\nsjAsuAH4Iz1XdfdenzGnyBZH\n-----END PRIVATE KEY-----\n",
      "client_email": "company@rasa-platform.iam.gserviceaccount.com",
      "client_id": "114123456713428149",
      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
      "token_uri": "https://accounts.google.com/o/oauth2/token",
      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/company%40rasa-platform.iam.gserviceaccount.com"
    }
    

    Then log in to the docker registry:

    $ sudo docker login  -u _json_key -p "$(cat /etc/rasa/gcr-auth.json)" https://gcr.io
    

    which should return Login Succeeded.

  5. Create the docker environment file in /etc/rasa/.env with the following content (choosing a RASA_VERSION compatible with your RASA_X_VERSION):

    RASA_X_VERSION=<rasa_x_version>
    RASA_VERSION=<rasa_version>
    RASA_TOKEN=<random_string>
    RASA_X_TOKEN=<random_string>
    PASSWORD_SALT=<random_string>
    JWT_SECRET=<random_string>
    RABBITMQ_PASSWORD=<random_string>
    DB_PASSWORD=<random_string>
    REDIS_PASSWORD=<random_string>
    METRICS_CONSENT=true # CE only
    

    Note

    If you are running the community edition and consent to metrics tracking, Rasa will track a minimal amount of anonymized usage information (like how often the ‘train’ button is used) to help us improve Rasa X. None of your training data or conversations will ever be sent to Rasa. To opt out of this metrics tracking, set METRICS_CONSENT=false.

    For <random_string> please use a distinct, randomly generated, secure character sequence for each variable. A convenient way of generating random strings is using openssl:

    $ openssl rand -base64 16
    

    For more information about these environment variables and others used by Rasa X, see Environment Variables.

    Note

    The PASSWORD_SALT is used to hash passwords. If you change this variable after setting it, you will have to create new logins for everyone.

  6. Create a credentials file at /etc/rasa/credentials.yml containing:

    rasa:
      url: ${RASA_X_HOST}/api
    

    These are the credentials used for messaging with the bot via the Rasa X UI. You can also add credentials for other messaging and voice channels such as your custom connector or the REST input channel.

  7. Add an endpoints file at /etc/rasa/endpoints.yml containing:

    models:
       url: ${RASA_MODEL_SERVER}
       token: ${RASA_X_TOKEN}
       wait_time_between_pulls: ${RASA_MODEL_PULL_INTERVAL}
    tracker_store:
       type: sql
       dialect: "postgresql"
       url: ${DB_HOST}
       port: ${DB_PORT}
       username: ${DB_USER}
       password: ${DB_PASSWORD}
       db: ${DB_DATABASE}
       login_db: ${DB_LOGIN_DB}
    lock_store:
       type: "redis"
       url: ${REDIS_HOST}
       port: ${REDIS_PORT}
       password: ${REDIS_PASSWORD}
       db: ${REDIS_DB}
    event_broker:
       type: "pika"
       url: ${RABBITMQ_HOST}
       username: ${RABBITMQ_USERNAME}
       password: ${RABBITMQ_PASSWORD}
       queue: ${RABBITMQ_QUEUE}
    action_endpoint:
       url: ${RASA_USER_APP}/webhook
       token: ""
    

    If you want to know more about the environment variables used here, see Environment Variables.

  8. Create an environments file at /etc/rasa/environments.yml containing:

    rasa:
      production:
        url: http://rasa-production:5005
        token: ${RASA_TOKEN}
      worker:
        url: http://rasa-worker:5005
        token: ${RASA_TOKEN}
    

    If you are using Rasa X EE, you can also add further environments as described in Deployment Environments.

  9. Create a few empty folders that we will mount into the containers:

    $ mkdir /etc/rasa/auth
    $ mkdir /etc/rasa/certs
    $ mkdir /etc/rasa/credentials
    $ mkdir /etc/rasa/models
    $ mkdir /etc/rasa/logs
    $ mkdir /etc/rasa/terms
    $ mkdir /etc/rasa/db
    
  10. Optional: We recommend that you enable HTTPS on your server by adding SSL certificates (for example using Let’s encrypt). See Securing with SSL for instructions.

  11. Read the relevant Rasa X EE terms or Rasa X CE terms. To agree to the terms, create an agreement file in the terms folder:

    $ touch /etc/rasa/terms/agree.txt
    
  12. The Rasa containers are following Docker’s best practices and are not running as root user. Hence, please make sure that the root group has read and write access to the following directories and their content:

    • /etc/rasa/credentials.yml
    • /etc/rasa/endpoints.yml
    • /etc/rasa/environments.yml
    • /etc/rasa/auth
    • /etc/rasa/certs
    • /etc/rasa/credentials
    • /etc/rasa/models
    • /etc/rasa/logs
    • /etc/rasa/terms

    To set the permissions and group for everything in /etc/rasa you can use this command:

    sudo chgrp -R root /etc/rasa/* && sudo chmod -R 770 /etc/rasa/*
    

    If you are mounting different or extra volumes, please adapt their permissions accordingly.

  13. Set the permissions and owner of the database persistence directory /etc/rasa/db using this command:

    sudo chown -R 1001 /etc/rasa/db && sudo chmod -R 750 /etc/rasa/db
    
  14. Replace the default app image with the image of your custom action server.

    See this guide for more information on how to do so. To avoid your changes in the docker-compose file being overwritten with the next update, you should not apply your changes to docker-compose.yml. Instead, create a new file called docker-compose.override.yml and apply your changes there. Docker will automatically take that file into account and override any attributes in docker-compose.yml with changes from the override file. The content of docker-compose.override.yml might look like this:

    version: '3.4'
    services:
      app:
        image: <your image>
    

    If you’d like to use the demo app image just to start out, make sure to add this variable to your .env:

    RASA_X_DEMO_VERSION=<rasa_x_version>
    
  15. Start up Rasa X (-d will run Rasa X in the background):

    $ sudo docker-compose up -d
    
  16. Set your password:

    If you are using Rasa X CE, please set your admin password:

    $ cd /etc/rasa
    $ sudo python rasa_x_commands.py create --update admin me <PASSWORD>
    

    Rasa X EE users should instead create an admin user with a username and a password:

    $ cd /etc/rasa
    $ sudo python rasa_x_commands.py create admin <USER> <PASSWORD>
    

    While using Rasa X EE, you can use this command on the server to create a new admin account at any time. See Role-Based Access Control for more information about assigning and configuring user permissions.

  17. Navigate to the hostname or IP where your server is reachable and log in using your newly created password.

    If you have an existing Rasa assistant running, you can import those user-assistant conversations into your local instance of Rasa X. See Import Existing Conversations. If this is a new Rasa project, you can get your first conversations by inviting some test users to try your assistant.

Installing Updates

To see which version you are currently running, hit the /version endpoint:

$ curl https://example.com/api/version

Warning

Be aware that while updating, the following files will be overwritten:

  • /etc/rasa/docker-compose.yml
  • /etc/rasa/.env

Make sure there are no changes in these files that you still need. This means that instead of directly modifying docker-compose.yml to e.g. add a custom channel volume or custom action server image, you should rather create a new file called docker-compose.override.yml. Docker will automatically take that file into account and override any attributes in docker-compose.yml with changes from the override file.

Updating with the Quick Install Script

  1. To install an update, fetch the install.sh for the new version you want to install, and run it (if you are using Rasa X EE, make sure that your license is in your working directory for this step):

    $ curl -sSL -o install.sh https://storage.googleapis.com/rasa-x-releases/<rasa_x_version>/install.sh
    $ sudo bash ./install.sh
    

    replacing <rasa_x_version> with the version you want to install.

  2. Make sure that the Docker environment file is updated by running:

    $ cat .env
    
  3. After the installation is complete, login to the Docker registry and pull the images:

    $ cd /etc/rasa
    $ # If you are using Rasa X EE, log in to the private Docker registry
    $ sudo docker login  -u _json_key -p "$(cat /etc/rasa/gcr-auth.json)" https://gcr.io
    $ # Pull the new images
    $ sudo docker-compose pull
    
  4. Bring down your running Rasa X instance and start the updated version:

    $ sudo docker-compose down
    $ sudo docker-compose up -d
    
  5. Once Rasa X is up and running, you can log in using your user credentials and test it.

Updating Manually

  1. Download the Rasa X files (docker-compose.ce.yml and rasa_x_commands.py) for the new version (replace <rasa_x_version> with the version you want to install):

    Rasa X CE:

    $ cd /etc/rasa
    $ wget -qO docker-compose.yml https://storage.googleapis.com/rasa-x-releases/<rasa_x_version>/docker-compose.ce.yml
    $ wget -qO rasa_x_commands.py https://storage.googleapis.com/rasa-x-releases/<rasa_x_version>/rasa_x_commands.py
    

    Rasa X EE:

    $ cd /etc/rasa
    $ wget -qO docker-compose.yml https://storage.googleapis.com/rasa-x-releases/VERSION/docker-compose.ee.yml
    $ wget -qO rasa_x_commands.py https://storage.googleapis.com/rasa-x-releases/VERSION/rasa_x_commands.py
    
  2. Update your .env with the relevant RASA_X_VERSION, a compatible RASA_VERSION and a compatible RASA_X_DEMO_VERSION (if using).

  3. Pull the new images:

    $ # If you are using Rasa X EE, log in to the private Docker registry
    $ sudo docker login  -u _json_key -p "$(cat /etc/rasa/gcr-auth.json)" https://gcr.io
    $ # Pull the new images
    $ sudo docker-compose pull
    
  4. Start the updated version of Rasa X:

    $ sudo docker-compose up -d
    
  5. Once Rasa X is up and running, you can log in using your user credentials and test it.

Securing with SSL

You can secure your server with SSL certificates of your choice.

As an example, we will use certbot to generate SSL certificates.

Requirements:

  • A notification email address (used by Let’s Encrypt to notify about urgent renewal and security notices)
  • A domain name for the installation (in this example we use rasa.example.com) – you will not be able to set up SSL with a bare IP address without DNS

All of these instructions should be followed on the server.

First, install certbot.

Certbot offers multiple ways to obtain a certificate. Let’s pick the temporary webserver option since it doesn’t require any additional configuration. Run the following to start the interactive process to obtain the SSL certificate:

$ sudo certbot certonly

It’ll first ask you to pick the authentication method:

How would you like to authenticate with the ACME CA?
-------------------------------------------------------------------------------
1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1

Here, pick 1 and press return.

Then, fill in the aforementioned email address:

Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): ops@example.com

Then, accept the Terms of Services and decide if you’d like to share your email address with the EFF:

-------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf. You must agree
in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: A

-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: N

In the last step you’re providing your domain name:

Please enter in your domain name(s) (comma and/or space separated)  (Enter 'c'
to cancel): rasa.example.com

After that finished successfully, you’ll see a message similar to the one below:

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/rasa.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/rasa.example.com/privkey.pem
   Your cert will expire on 2018-02-07. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"

Your certificate has been generated and is now saved on the machine at /etc/letsencrypt/live/rasa.example.com/. Please run the following to copy them over to the appropriate directory so that the docker container can access them:

$ sudo cp /etc/letsencrypt/live/rasa.example.com/privkey.pem /etc/rasa/certs/
$ sudo cp /etc/letsencrypt/live/rasa.example.com/fullchain.pem /etc/rasa/certs/

Let’s Encrypt certificates are short-lived, this means they expire after 90 days. This means that you’ll have to renew them on a regular basis. Thankfully this can be done with certbot as well. Run the following commands in order to renew your certificate (you should automate this renewal process with a cron job).

$ sudo docker-compose down
$ sudo certbot renew
$ sudo docker-compose up -d

Note

Be aware that the update process will introduce downtime.

The Docker-Compose Setup

Services

Running Rasa X using Docker launches several services:

Service Name Description
rasa-x Rasa X UI and HTTP API
rasa-production Rasa service running a trained model, used for parsing intent messages and predicting actions in conversations with users over the input channel or Rasa X UI
rasa-worker Rasa service used for background tasks such as training models
db PostgreSQL database service
duckling Duckling service used for entity extraction when DucklingHTTPExtractor is included in the model pipeline
rabbit Message broker used to transmit conversation events between rasa-production and rasa-x as well as the db
redis Service acting as a persistence layer for conversation locks
nginx Reverse proxy used to reroute requests to the different services
app Custom action server; this service should be overwritten with your custom action server in the docker-compose.override.yml
logger Logging service that collects logs from the other services and writes them to the /logs folder of your RASA_HOME directory

Environment Variables

Global Environment Variables

This group of variables is mainly used by docker-compose. All the variables get interpolated when starting the services with docker-compose up and then are passed to services. It is possible to see the docker-compose.yml file with the substituted variables by using docker-compose config. These variables have no default value and must be defined in the .env file.

Variable Description
RASA_X_VERSION The version of Rasa X used by the Rasa X docker container.
RASA_VERSION The version of Rasa used by the Rasa docker containers.
RASA_TOKEN Authentication token for the Rasa service. This is used by other services to communicate with Rasa.
RASA_X_TOKEN Authentication token for the Rasa X service. This is used by other services to communicate with Rasa X.
PASSWORD_SALT Salt used to securely store the users passwords.
JWT_SECRET Symmetric JWT token for authentication protection of the Rasa API server.
RABBITMQ_PASSWORD Used by other services to access RabbitMQ.
DB_PASSWORD Used by other services to access the PostgreSQL database.
REDIS_PASSWORD Used by other services to access Redis.
RASA_X_DEMO_VERSION Custom action server version. Only required if using the demo app image.

Rasa Variables

These variables define the behaviour of the Rasa containers and how the other services connect to them.

Variable Default Value Description
RASA_TOKEN No default, must be defined in .env Authentication token for the Rasa service. This is used by other services to communicate with Rasa.
RASA_MODEL_PULL_INTERVAL 10 How often to check for new models, in seconds
RABBITMQ_QUEUE (rasa-production) rasa_production_events Which Rabbit event queue to publish events to.
DB_DATABASE (rasa-production) tracker Which database table to use to access and store trackers.
DB_DATABASE (rasa-worker) worker_tracker Which database table to use to access and store trackers.
RASA_MODEL_SERVER http://rasa-x:5002 /api/projects/default /models/tags/production URL where to access stored models and store new ones.

Rasa X API Variables

These variables define the behaviour of the Rasa X API and how the other services connect to it.

Variable Default Value Description
RASA_X_HOST "http://rasa-x:5002" The URL of the Rasa X services. This is used by other services to connect to the Rasa X API.
RASA_X_TOKEN No default, must be defined in .env The token used for authentication between other services and the Rasa X API.
JWT_SECRET No default, must be defined in .env Symmetric JWT token for authentication protection of the Rasa API server.
RASA_USER_APP ""http://app:5055"" URL of the custom action server.
RASA_PRODUCTION_HOST http://rasa-production:5005 Host and port at which to find the rasa-production server.
RASA_WORKER_HOST "http://rasa-worker:5005" Host and port at which to find the rasa-worker server.
RASA_WORKER_TOKEN Interpolated from RASA_TOKEN Authentication token used to connect to the Rasa services.
RASA_MODEL_DIR /app/models The directory in which models are stored on the Rasa X container.
RABBITMQ_QUEUE rasa_production_events Which queue to read conversation events from.
PASSWORD_SALT No default, must be defined in .env Salt used to securely store the users passwords.
RASA_X_USER_ANALYTICS 0 Binary value specifying whether Rasa X UI users’ conversations should be included in conversation analytics in the analytics tab. (Rasa X EE only)
SANIC_RESPONSE_TIMEOUT 3600 Number of seconds a request can run before Sanic generates a 503 response.
SANIC_ACCESS_CONTROL_MAX_AGE 1800 Value (in seconds) to use for the Access-Control-Max-Age header in responses to preflight requests.
METRICS_CONSENT "false" Defines whether the user consents to anonymous usage tracking. (Rasa X CE only)
UUID No default, if undefined, a random value will be assigned Random anonymous ID used for usage tracking if consent is given. (Rasa X CE only)
RUN_EVENT_CONSUMER_AS_SEPARATE_SERVICE "false" Whether the event service is run as a separate service. If "false", Rasa X will launch the event service automatically as a subprocess.
LOCAL_MODE "false" Defines whether Rasa X is being run in local mode (without docker compose) or server mode
JWT_PUBLIC_KEY_PATH "/app/public_key" Path where to store JWT authentication.
JWT_PRIVATE_KEY_PATH "/app/private_key" Path where to store JWT authentication.
JWT_EXPIRATION_TIME 28800 Expiration time in seconds for JWT tokens.
DEBUG_MODE "false" Whether or not to turn on debug logs.
LOG_LEVEL "INFO" Log level to use, overwritten by DEBUG_MODE if DEBUG_MODE variable is set.
SAML_PATH "/app/auth/saml" Path at which to store SAML authentication (Rasa X EE).
SAML_DEFAULT_ROLE "tester" Role to assign to SSO users upon first sign on (Rasa X EE).
RASA_MODEL_DIR "/app/models" Directory where models are stored on the Rasa X container.
CREDENTIALS_PATH "/app/credentials.yml" Path to credentials.yml in the Rasa X container.
ENDPOINTS_PATH "/app/endpoints.yml" Path to endpoints.yml in the Rasa X container.
RASA_X_SSL_CERTIFICATE None Path to SSL certificate if running the rasa-x container on HTTPS.
RASA_X_SSL_KEYFILE None Path to SSL keyfile if running the rasa-x container on HTTPS.
RASA_X_SSL_PASSWORD None Path to SSL password if running the rasa-x container on HTTPS with a password-protected keyfile.

Note

Changing some of these variables requires changes in other containers; for example, if updating your endpoints path, you should also add the new path (relative from the app directory) to the start up command of your Rasa containers with the --endpoints flag.

RabbitMQ Variables

These variables define the behaviour of RabbitMQ and how the other services connect to it. More information about RabbitMQ can be found here.

Variable Default Value Description
RABBITMQ_HOST "rabbit" Hostname of the container hosting RabbitMQ.
RABBITMQ_USERNAME "user" Username used by other services to access RabbitMQ.
RABBITMQ_PASSWORD No default, must be defined in .env Password used by other services to access RabbitMQ.
RABBITMQ_DISK_FREE_LIMIT "{mem_relative, 0.1}" Disk free space limit of the partition on which RabbitMQ is storing data

DB Variables

These variables define the credentials for the PostgreSQL database and configure how other services connect to it.

Variable Default Value Description
DB_HOST "db" Hostname of the container hosting the PostgreSQL database.
DB_PORT "5432" Port used by other services to access the database.
POSTGRESQL_USERNAME (DB_USER) "admin" Username used by other services to access the database.
POSTGRESQL_PASSWORD (DB_PASSWORD) No default, must be defined in .env Password used by other services to access the database.
DB_LOGIN_DB "rasa" Database connection used to create tracker database.
POSTGRESQL_DATABASE (DB_DATABASE) "rasa" Database used by other services to access the database.

Redis Variables

These variables define the behaviour of the Redis lock store and how other services connect to it.

Variable Default Value Description
REDIS_HOST "redis" Hostname of the container hosting Redis.
REDIS_PORT "6379" Port used by other services to access Redis.
REDIS_PASSWORD No default, must be defined in .env Password used by other services to access Redis.
REDIS_DB "1" Database name used by other services to access Redis.

Duckling Variables

These variables define the behaviour of the Duckling service.

Variable Default Value Description
RASA_DUCKLING_HTTP_URL "http://duckling:8000" Used by other services to access Duckling.