How to get Rasa X password

Hi! I am trying to have rasa x running on my aws instance as a service. So under /etc/systemd/system I created a service with the cmd to execute rasa x --enable-api. Everything else works well except I can not access the UI through the port 5002/login because I need the password.

Usually on local machine, I can see the password(complete url) get logged after the rasa x cmd has been executed, then I can just open it on browser. However, on aws server I tried systemctl status rasa.service --all, there is not log of url with password. Then when I used journalctl -u rasa.service, I found that the logging of that url will only be printed after the service is dead or get stopped. Do anyone know why this is the case and how can I retrieve those password?

Thanks!

Here is the pic of logging:

Hi @BrianYing, you can set an environment variable RASA_X_PASSWORD=<PASSWORD> which will be used if set instead of the randomly generated one. I’m not sure why those logs aren’t printed earlier but we’ll look into it!

It works! Thank you so much!

hey @ricwo can you please explain how to set password locally on rasa x instead of randomly generated password? if i have to set environment variable here too, then where to set it

@PureLogics which OS are you using? On Linux for example, you can either set the environment variable :

  • when calling rasa x: RASA_X_PASSWORD=<yourpassword> rasa x
  • by adding export RASA_X_PASSWORD=<yourpassword> in your ~/.bashrc file

Hope that helps

how to find the exsiting rasa x password

how to do this on a Mac OS Catalina

@Meet how did you install Rasa X? Are you running it from the command line or using Docker or the Helm chart?

Command line I entered command export RASA_X_PASSWORD= but it doesn’t change

@Meet, did you restart your terminal after apply the changes to ~/.bashrc?

Hello, I’m facing more or less the same problem.

I made a Service for Rasa X:

[Unit]
Description=Rasa Core
After=multi-user.target
Requires=rocketchat.service
[Service]
Type=simple
WorkingDirectory=/opt/rasaVicious/
ExecStart=/opt/anaconda3/envs/rasaEnv/bin/python3 -m rasa x -p 5006
User=root
Group=daemon

This will start Rasa X as root on port 5006 and works fine. Problem now is that I can’t see the password using “service rasaVicious status”.

So I tried to add the following line to root’s .bashrc:

export RASA_X_PASSWORD=test

Afterwards I reloaded the bashrc with

source .bashrc

But this won’t help. Everytime I start the rasa-Service, it’s a random password and not “test”. I also tried to close and reopen my shell, but still the same problem.

Someone a suggestion how I can set the password?

Edit: Changing the ExecStart line to:

ExecStart=/opt/anaconda3/envs/rasaEnv/bin/python3 -m RASA_X_PASSWORD=test rasa x -p 5006

won’t help either. Doing that my service won’t even start and I get the following error message:

/opt/anaconda3/envs/rasaEnv/bin/python3: No module named RASA_X_PASSWORD=test

your exec command should be

ExecStart="RASA_X_PASSWORD=test /opt/anaconda3/envs/rasaEnv/bin/python3 -m rasa x -p 5006"

(note the env var comes before the python command)

can you try again and report if it’s working or not?

With " " get the following error:

Sep 15 00:59:26 systemd[1]: rasaVicious.service: /etc/systemd/system/rasaVicious.service:9: Neither a valid executable name nor an absolute path: RASA_X_PASSWORD=test /opt/anaconda3/envs/rasaEnv/bin/python3 -m rasa x -p 5006
Sep 15 00:59:26 systemd[1]: rasaVicious.service: Unit configuration has fatal error, unit will not be started.

And withouth " " I get the following error:

Sep 15 01:01:07 systemd[1]: /etc/systemd/system/rasaVicious.service:9: Executable "RASA_X_PASSWORD=test" not found in path "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Sep 15 01:01:07 systemd[1]: rasaVicious.service: Unit configuration has fatal error, unit will not be started.

I managed to solve my problem by adding the following line to my Service:

Environment="RASA_X_PASSWORD=test"

And the entire working service looks like this:

[Unit]
Description=Rasa Core
After=multi-user.target
Requires=rocketchat.service
[Service]
Environment="RASA_X_PASSWORD=test"
Type=simple
WorkingDirectory=/opt/rasaVicious/
ExecStart= /opt/anaconda3/envs/rasaEnv/bin/python3 -m rasa x -p 5006
User=root
Group=daemon

Hope this will help some people struggling with the same problem. Would be nice to be able to define the Rasa X password in a config file somewhere in the Rasa folder…

Hey where were you able to see this generated password?