Docker-Compose Manual Install

For running Rasa X on a server, we support Docker. We provide template docker-compose files which you can use directly. The Docker images for Rasa X are freely available via Docker Hub. The images for Rasa Enterprise are hosted on a private registry and are accessible with an enterprise license.

Installation

Note: Rasa X is intended to be deployed on a server and not to a personal/local machine. Deploying on a server is recommended because Rasa X is designed to stay up continuously, and not to be frequently stopped or restarted.

Hardware & OS Requirements

We recommend 2-6 vCPUs and 8 GB RAM 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 or Windows distribution that can run Docker.

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)

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

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

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 the following command(s):

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

    Make sure that you can run Linux containers:

    docker run hello-world:linux
    

    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
    

    For example, C:\etc\rasa

    New-Item C:\etc\rasa -ItemType Directory
    Set-Location -Path C:\etc\rasa
    

    Note

    File sharing for the drive, in this example the C drive, must be turned on in Docker.

  3. Download the Rasa X docker-compose and commands files.

    To get Rasa X:

    wget -qO docker-compose.yml https://storage.googleapis.com/rasa-x-releases/0.27.4/docker-compose.ce.yml
    wget -qO rasa_x_commands.py https://storage.googleapis.com/rasa-x-releases/0.27.4/rasa_x_commands.py
    
    Invoke-WebRequest -OutFile docker-compose.yml -Uri https://storage.googleapis.com/rasa-x-releases/0.27.4/docker-compose.ce.yml
    Invoke-WebRequest -OutFile rasa_x_commands.py -Uri https://storage.googleapis.com/rasa-x-releases/0.27.4/rasa_x_commands.py
    

    To get Rasa Enterprise:

    wget -qO docker-compose.yml https://storage.googleapis.com/rasa-x-releases/0.27.4/docker-compose.ee.yml
    wget -qO rasa_x_commands.py https://storage.googleapis.com/rasa-x-releases/0.27.4/rasa_x_commands.py
    
    Invoke-WebRequest -OutFile docker-compose.yml -Uri https://storage.googleapis.com/rasa-x-releases/0.27.4/docker-compose.ee.yml
    Invoke-WebRequest -OutFile rasa_x_commands.py -Uri https://storage.googleapis.com/rasa-x-releases/0.27.4/rasa_x_commands.py
    
  4. Rasa Enterprise Only: Create the authentication file to download the Rasa X containers from a private Docker registry.

    Create a file gcr-auth.json in your project directory that contains the JSON of the docker_registry_license key from your rasa-x-ee-license.yml file.

    Make sure to copy the entire contents of the docker_registry_license key.

    The contents of 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
    
    (Get-Content C:\etc\rasa\gcr-auth.json) | docker login  -u _json_key --password-stdin https://gcr.io
    

    which should return Login Succeeded.

  5. Create the docker environment file .env in your project directory 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>
    

    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 credentials.yml in your project directory 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. Create an endpoints file endpoints.yml in your project directory 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 environments.yml in your project directory 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 Enterprise, 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
    
    New-Item -ItemType Directory C:\etc\rasa\auth
    New-Item -ItemType Directory C:\etc\rasa\certs
    New-Item -ItemType Directory C:\etc\rasa\credentials
    New-Item -ItemType Directory C:\etc\rasa\models
    New-Item -ItemType Directory C:\etc\rasa\logs
    New-Item -ItemType Directory C:\etc\rasa\terms
    

    Note

    On Windows, you do not create a local directory for Postgres database persistence. Instead, you will define a docker volume in a docker-compose.override.yml.

  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 Enterprise terms or Rasa X terms. To agree to the terms, create an agreement file in the terms folder:

    touch /etc/rasa/terms/agree.txt
    
    New-Item -ItemType file C:\etc\rasa\terms\agree.txt
    
  12. Set group and permissions of the mounted directories:

    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, but make sure to correct it for the /etc/rasa/db directory as described in the next step:

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

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

    You can skip this step on Windows

  13. Configure persistent Postgres database storage

    On Linux, a local directory is used for persistent Postgres database storage.

    You must set the correct owner and permissions of the database persistence directory using this command:

    sudo chown -R 1001 /etc/rasa/db && sudo chmod -R 750 /etc/rasa/db
    

    On Windows, a docker volume is used for persistent Postgres database storage.

    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 in your project directory:

    version: "3.4"
    
    services:
      db:
        volumes:
          - db-volume:/bitnami/postgresql
    
    volumes:
      db-volume:
        name: db-volume
    
  14. If you are using custom actions, make sure to follow the instructions to Connect a Custom Action Server.

    If you don’t want to configure custom actions yet, make sure to add this variable to your .env to use the demo app image:

    RASA_X_DEMO_VERSION=<rasa_x_version>
    
  15. Start up Rasa X and wait until all containers are running (-d will run Rasa X in the background):

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

    For Rasa X, set your admin password with this command from your project directory:

    sudo python rasa_x_commands.py create --update admin me <PASSWORD>
    
    python rasa_x_commands.py create --update admin me <PASSWORD>
    

    For Rasa Enterprise, set your admin username & password with this command from your project directory:

    sudo python rasa_x_commands.py create admin <USER> <PASSWORD>
    
    python rasa_x_commands.py create admin <USER> <PASSWORD>
    

    While using Rasa Enterprise, 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.

    Once you’re logged in, you can set up Integrated Version Control to connect your Rasa X instance to a git repository for easy versioning of your assistant.

Connect a Custom Action Server

  1. If you don’t yet have an image for your custom action server, follow the instructions in Building an Action Server Image to build your image and push it to a container registry.

  2. Replace the default app image with the image of your custom action server:

    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 /etc/rasa directory 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: <image:tag>
    

Securing with SSL

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

For example, you can use Let’s Encrypt - a free, automated, and open Certificate Authority. It uses an Automatic Certificate Management Environment (ACME) protocol. You can learn more about it on the Getting Started page.

There are many ACME Clients Implementations, for different shell environments and different programming languages.

As an example, we use these ACME clients to generate the 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.

Install the ACME client:

Certbot installation instructions for Ubuntu 18.04 LTS

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@rasa.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.

Install the ACME client:

Posh-ACME installation instructions for PowerShell

For testing purposes, use LE_STAGE, for the Let's Encrypt ACME staging server.

(The other supported server is LE_PROD, for the Let's Encrypt ACME production server).

Set-PAServer LE_STAGE

The default approach is that you request your certificate with this command:

New-PACertificate rasa.example.com -AcceptTOS -Contact ops@rasa.example.com

You will be instructed to create a TXT record, to prove that you own the domain:

Please create the following TXT records:
------------------------------------------
_acme-challenge.rasa.example.com -> ---some string of characters---
------------------------------------------

Press any key to continue.:

Before pressing continue, create the TXT record for your domain, and make sure it is propagated. Then press continue.

If the ACME server is able to properly validate the TXT record, the final certificate files are generated and the command will output the details of your new certificate.

Move the certificate files into your project directory, and re-deploy with the commands:

docker-compose down
docker-compose up -d

This manual process can be automated, as described in the Posh-ACME Tutorial

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

Telemetry

Rasa X tracks 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. You can disable telemetry by sending the following API request:

curl -X DELETE https://<Rasa X server host>/api/telemetry?api_token=<your api token>

Note

Rasa Enterprise does not track any usage information.

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.
POSTGRESQL_SCHEMA No default PostgreSQL track store database schema to access. By default, Rasa accesses the public schema.
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.
RASA_X_USERNAME (only for Rasa Enterprise) admin If RASA_X_PASSWORD is specified then the user with this username will be created automatically after Rasa X is started for the first time.
RASA_X_PASSWORD No default, must be defined in .env if you want user to be created If specified, this user with username RASA_X_USERNAME will be created immediately after Rasa X is started for the first time.
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 Enterprise only)
SANIC_RESPONSE_TIMEOUT 3600 Number of seconds a request can run before Sanic generates a 503 response.
SANIC_REQUEST_MAX_SIZE_IN_BYTES 800000000 Maximum size of requests sent to server. For uploading large models.
SANIC_ACCESS_CONTROL_MAX_AGE 1800 Value (in seconds) to use for the Access-Control-Max-Age header in responses to preflight requests.
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 Enterprise).
SAML_DEFAULT_ROLE "tester" Role to assign to SSO users upon first sign on (Rasa Enterprise).
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.
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.
DEFAULT_E2E_TESTS_DIR "tests" Directory where tests are saved on the Rasa X container.
DEFAULT_E2E_TEST_FILE_PATH "conversation_tests.md" File inside DEFAULT_E2E_TESTS_DIR where end-to-end tests are saved by default on the Rasa X container.
MAX_DUMPING_DELAY_IN_SECONDS 60 Training data changes are dumped to disk in a batches. This variable describes the maximum time in seconds after which changes are dumped to disk.
POSTGRESQL_SCHEMA No default PostgreSQL database schema to access. By default, Rasa X accesses the public schema.

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.