RASA_HOME env variable

I’ve installed version 0.19.5 on a couple of systems using the server deploy instructions and the installation is not picking up my RASA_HOME setting as the install dir. The release notes for 0.19.3 state that this should work.

Has anyone else found RASA_HOME to work with the server deployment method?

Hi @stephens, how are you setting the RASA_HOME variable before installing? Would you mind trying this again with 0.20 which was released a few days ago?

I’m running under the bash shell on Ubuntu 16.04.

export RASA_HOME=/home/rasa
curl -sSL -o install.sh https://storage.googleapis.com/rasa-x-releases/stable/install.sh
sudo bash ./install.sh

I’ll give the new release a try.

@stephens since you’re running as sudo the existing env var won’t be propagated into the command. You need to run sudo with the -E flag, i.e.

export RASA_HOME=/home/rasa
curl -sSL -o install.sh https://storage.googleapis.com/rasa-x-releases/stable/install.sh
sudo -E bash ./install.sh

@ricwo thanks for the solution.

Just a quick note that in the current tutorial Docker-Compose Quick Install there is a small confusion in the command (it’s sudo bash -E ./install.sh instead of sudo -E bash ./install.sh). It might seem quite trivial but someone could spend a lot of time figuring out why the first command does not work and where that rasa x installation folder actually is.

Thanks for reporting this. A PR has been submitted.

I am already running a bot ,but i want to deploy another bot using same instance is it possible? First bot was in root, now i want to change the folder and tried this and nothing happened.

azureuser@instance-3:~$ export RASA_HOME=/home/rasa/dir
azureuser@instance-3:~$ sudo -E bash ./install.sh  # -E will preserve the environment variable you set
Installing pip and ansible
Hit:1 https://download.docker.com/linux/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://us-west4.gce.archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://us-west4.gce.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://us-west4.gce.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version (3.8.2-0ubuntu2).
The following package was automatically installed and is no longer required:
  libnuma1
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-distutils is already the newest version (3.8.10-0ubuntu1~20.04).
The following package was automatically installed and is no longer required:
  libnuma1
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
wget is already the newest version (1.20.3-1ubuntu1).
The following package was automatically installed and is no longer required:
  libnuma1
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1892k  100 1892k    0     0  6525k      0 --:--:-- --:--:-- --:--:-- 6525k
Collecting pip
  Using cached pip-21.2.1-py3-none-any.whl (1.6 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.1
    Uninstalling pip-21.2.1:
      Successfully uninstalled pip-21.2.1
Successfully installed pip-21.2.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/lib/python3.8/dist-packages
sysconfig: /usr/lib/python3.8/site-packages
WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/lib/python3.8/dist-packages
sysconfig: /usr/lib/python3.8/site-packages
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/include/python3.8/UNKNOWN
sysconfig: /usr/include/python3.8/UNKNOWN
WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/bin
sysconfig: /usr/bin
WARNING: Value for scheme.data does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local
sysconfig: /usr
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Requirement already satisfied: ansible<2.10,>-2.9 in /usr/local/lib/python3.8/dist-packages (2.8.20)
Requirement already satisfied: jinja2 in /usr/lib/python3/dist-packages (from ansible<2.10,>-2.9) (2.10.1)
Requirement already satisfied: cryptography in /usr/lib/python3/dist-packages (from ansible<2.10,>-2.9) (2.8)
Requirement already satisfied: PyYAML in /usr/lib/python3/dist-packages (from ansible<2.10,>-2.9) (5.3.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Installing docker role
[WARNING]: - geerlingguy.docker (4.0.0) is already installed - use --force to change version to unspecified

Docker role for ansible has been installed
Downloading Rasa X playbook
Running playbook

PLAY [Install Rasa X] **************************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.docker : include_tasks] ******************************************************************************************************************************
skipping: [localhost]

TASK [geerlingguy.docker : include_tasks] ******************************************************************************************************************************
included: /root/.ansible/roles/geerlingguy.docker/tasks/setup-Debian.yml for localhost

TASK [geerlingguy.docker : Ensure old versions of Docker are not installed.] *******************************************************************************************
ok: [localhost]

TASK [geerlingguy.docker : Ensure dependencies are installed.] *********************************************************************************************************
ok: [localhost]

TASK [geerlingguy.docker : Ensure additional dependencies are installed (on Ubuntu < 20.04 and any other systems).] ****************************************************
skipping: [localhost]

TASK [geerlingguy.docker : Ensure additional dependencies are installed (on Ubuntu >= 20.04).] *************************************************************************
ok: [localhost]

TASK [geerlingguy.docker : Add Docker apt key.] ************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.docker : Ensure curl is present (on older systems without SNI).] *************************************************************************************
skipping: [localhost]

TASK [geerlingguy.docker : Add Docker apt key (alternative for older systems without SNI).] ****************************************************************************
skipping: [localhost]

TASK [geerlingguy.docker : Add Docker repository.] *********************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.docker : Install Docker.] ****************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.docker : Ensure /etc/docker/ directory exists.] ******************************************************************************************************
skipping: [localhost]

TASK [geerlingguy.docker : Configure Docker daemon options.] ***********************************************************************************************************
skipping: [localhost]

TASK [geerlingguy.docker : Ensure Docker is started and enabled at boot.] **********************************************************************************************
ok: [localhost]
[WARNING]: flush_handlers task does not support when conditional


TASK [geerlingguy.docker : include_tasks] ******************************************************************************************************************************
included: /root/.ansible/roles/geerlingguy.docker/tasks/docker-compose.yml for localhost

TASK [geerlingguy.docker : Check current docker-compose version.] ******************************************************************************************************
ok: [localhost]

TASK [geerlingguy.docker : Delete existing docker-compose version if it's different.] **********************************************************************************
skipping: [localhost]

TASK [geerlingguy.docker : Install Docker Compose (if configured).] ****************************************************************************************************
skipping: [localhost]

TASK [geerlingguy.docker : include_tasks] ******************************************************************************************************************************
skipping: [localhost]

TASK [Status of Rasa Enterprise license file] **************************************************************************************************************************
ok: [localhost]

TASK [Check if a license exists] ***************************************************************************************************************************************
ok: [localhost] => {
    "msg": "There is no Rasa Enterprise license file. We will install Rasa X (Community Edition)."
}

TASK [Load configuration file of the customer (includes e.g. the license)] *********************************************************************************************
skipping: [localhost]

TASK [Telemetry status] ************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "Telemetry, RASA_TELEMETRY_ENABLED=true"
}

TASK [Create Rasa X root directory] ************************************************************************************************************************************
ok: [localhost]

TASK [Create Rasa X log directory] *************************************************************************************************************************************
ok: [localhost]

TASK [Create Rasa X scripts directory] *********************************************************************************************************************************
ok: [localhost]

TASK [Create the directory for the database persistence] ***************************************************************************************************************
ok: [localhost]

TASK [Create the directory to store the models] ************************************************************************************************************************
ok: [localhost]

TASK [Create the directory to store the rasa global configuration] *****************************************************************************************************
ok: [localhost]

TASK [Create the directory for the authentication] *********************************************************************************************************************
ok: [localhost]

TASK [Create the directory for the credentials] ************************************************************************************************************************
ok: [localhost]

TASK [Create the directory to store the certificate files] *************************************************************************************************************
ok: [localhost]

TASK [Create the directory for the nginx config files] *****************************************************************************************************************
ok: [localhost]

TASK [Download rasax.nginx.template] ***********************************************************************************************************************************
ok: [localhost]

TASK [Download nginx.conf] *********************************************************************************************************************************************
ok: [localhost]

TASK [Download nginx ssl.conf] *****************************************************************************************************************************************
ok: [localhost]

TASK [stat user credentials] *******************************************************************************************************************************************
ok: [localhost]

TASK [backwards compatible credentials] ********************************************************************************************************************************
skipping: [localhost]

TASK [Status of Rasa X credentials folder] *****************************************************************************************************************************
ok: [localhost]

TASK [Status of Rasa X env file] ***************************************************************************************************************************************
ok: [localhost]

TASK [Ensure we do not overwrite the env if we do not have the credentials] ********************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create the environment for the docker compose runner] ************************************************************************************************************
skipping: [localhost]

TASK [Update Rasa X version in `.env` file if `.env` file already existed] *********************************************************************************************
ok: [localhost]

TASK [Check if Rasa Open Source telemetry has been configured via `.env`] **********************************************************************************************
changed: [localhost]

TASK [Create Rasa Open Source telemetry config if it wasn't present (Enterprise only)] *********************************************************************************
skipping: [localhost]

TASK [Update Rasa version in `.env` file if `.env` file already existed] ***********************************************************************************************
ok: [localhost]

TASK [Update RASA X demo version in `.env` file if `.env` file already existed] ****************************************************************************************
ok: [localhost]

TASK [Read the the content of the .env file] ***************************************************************************************************************************
changed: [localhost]

TASK [Status of deployment environments file] **************************************************************************************************************************
ok: [localhost]

TASK [Create deployment environments file if not present] **************************************************************************************************************
skipping: [localhost]

TASK [Status of Redis credentials file] ********************************************************************************************************************************
ok: [localhost]

TASK [Create Redis credentials if not present] *************************************************************************************************************************
skipping: [localhost]

TASK [Status of RabbitMQ credentials file] *****************************************************************************************************************************
ok: [localhost]

TASK [Create RabbitMQ credentials if not present] **********************************************************************************************************************
skipping: [localhost]

TASK [Status of RASA_X_TOKEN credentials file] *************************************************************************************************************************
ok: [localhost]

TASK [Create RASA_X_TOKEN credentials if not present] ******************************************************************************************************************
skipping: [localhost]

TASK [Status of JWT_SECRET credentials file] ***************************************************************************************************************************
ok: [localhost]

TASK [Create JWT_SECRET credentials if not present] ********************************************************************************************************************
skipping: [localhost]

TASK [Status of RASA_TOKEN credentials file] ***************************************************************************************************************************
ok: [localhost]

TASK [Create RASA_TOKEN if not present] ********************************************************************************************************************************
skipping: [localhost]

TASK [Status of db password credentials file] **************************************************************************************************************************
ok: [localhost]

TASK [Create DB_PASSWORD if not present] *******************************************************************************************************************************
skipping: [localhost]

TASK [Status of channel credentials file] ******************************************************************************************************************************
ok: [localhost]

TASK [Create the environment for the docker compose runner] ************************************************************************************************************
skipping: [localhost]

TASK [Status of the Rasa endpoint configuration file] ******************************************************************************************************************
ok: [localhost]

TASK [Create the endpoints configuration file for Rasa] ****************************************************************************************************************
skipping: [localhost]

TASK [Retrieve docker compose to run Rasa Enterprise] ******************************************************************************************************************
skipping: [localhost]

TASK [Retrieve docker compose to run Rasa X (Community Edition)] *******************************************************************************************************
ok: [localhost]

TASK [Retrieve the Rasa X commands file] *******************************************************************************************************************************
ok: [localhost]

TASK [Dump gcr license to separate file] *******************************************************************************************************************************
skipping: [localhost]

TASK [Log in to google cloud registry (gcr)] ***************************************************************************************************************************
skipping: [localhost]

PLAY RECAP *************************************************************************************************************************************************************
localhost                  : ok=47   changed=2    unreachable=0    failed=0    skipped=25   rescued=0    ignored=0

azureuser@instance-3:~$ cd /home/rasa
-bash: cd: /home/rasa: No such file or directory
azureuser@instance-3:~$ cd ${RASA_HOME}
-bash: cd: /home/rasa/dir: No such file or directory
azureuser@instance-3:~$ cd RASA_HOME
-bash: cd: RASA_HOME: No such file or directory
azureuser@instance-3:~$ cd /home/rasa/dir
-bash: cd: /home/rasa/dir: No such file or directory
azureuser@instance-3:~$