Skip to content

Instantly share code, notes, and snippets.

@shivampip
Last active March 3, 2020 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shivampip/199ffa92f8f8f62533281bb3387306d8 to your computer and use it in GitHub Desktop.
Save shivampip/199ffa92f8f8f62533281bb3387306d8 to your computer and use it in GitHub Desktop.
RASA Bot Deployment on Ubuntu VPS with Telegram (where ssl required)

Configuring Nginx

  • Open /etc/nginx/nginx.conf
  • Add this code block
server{
        listen 80;
        listen [::]:80;

        server_name  www.shivampip.com shivampip.com;
        location / {
            proxy_pass http://127.0.0.1:5005;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
      }
}
  • server_name must be domain name. Not subdomain (it will not get ssl certificate)

Getting SSL certificate

RASA Setup

  • in credentials.yml setup telegram webhook url:
webhook_url: "https://www.shivampip.com/webhooks/telegram/webhook"

Deploy

  • Install dependencies.
  • Run it with cmd
nohup rasa run
  • nohup is for keep it running even after terminal is closed

Stop RASA

  • Kill all rasa process
pkill rasa

Rasa run with apis

rasa run --enable-api

Rasa run with cors (for ajax)

rasa run --cors "*" 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment