Put a Rasa Pro (CALM) assistant, tested with rasa inspect, behind HTTPS on an Azure VM
Prof. Fred Agbo
2026-11-01
🧭 From rasa inspect to a live URL
AI 380: Human-AI Interaction · Willamette University
Project:AppCoach_demo, the App Coach assistant from Lab 3, finished and tested with rasa inspect.
Outcome: The assistant runs in Docker on an Azure VM and is reachable at https://<your-name>.<region>.cloudapp.azure.com, behind a password.
🛠️ How to use this workshop
Read the concept.
Run the command or create the named file.
Pass the checkpoint.
Continue only when it passes.
Starting point:AppCoach_demo works in rasa inspect on your laptop. Nothing else is assumed: no web page, no Dockerfile, no extra code.
🗺️ What you will build
flowchart LR
A["💻 Your laptop<br/>AppCoach_demo"] -->|"GitHub Desktop push"| B["🐙 GitHub repo"]
B -->|"git pull"| VM
subgraph VM ["☁️ Azure Ubuntu VM"]
D["🔒 Caddy<br/>HTTPS + password"] --> E["🤖 Rasa Pro container<br/>rasa run --inspect :5005"]
E --> L["📝 lesson_log.jsonl"]
end
F["🧑 Browser"] -->|"https"| D
E -->|"API calls"| G["🧠 LLM provider"]
✅ Seven things you will do
📋 Check the project is ready to ship.
🧱 Add the deploy files (Compose, Caddy, .env.example).
🧪 Run the official Rasa image locally against your project.
For the site name in DOMAIN: get a certificate, ask for a login, then forward to Rasa on port 5005.
The password is stored only as a hash in .env, never as plain text.
📝 2.3 · deploy/.env.example
# Copy to .env and fill in. Never commit .env.
RASA_LICENSE=your-rasa-pro-license
OPENAI_API_KEY=your-llm-key
DOMAIN=localhost
AUTH_USER=coach
AUTH_HASH='paste-the-caddy-hash-here'
Use the LLM variable your config.yml expects (OPENAI_API_KEY for the default OpenAI setup).
Keep the single quotes around AUTH_HASH; the hash contains $ characters.
Add DEEPGRAM_API_KEY=... only if you test voice (Part 9).
Portal: Cost Management + Billing → Budgets. Create a 5 USD budget with an email alert.
A VM shut down from the operating system still bills. Use deallocate (Part 10).
Size note: the free VM allowance covers a 1 GB machine. Rasa Pro needs more, so this workshop uses a 4 GB VM that is paid from credit. Rasa’s own quick-deploy guide says 1 vCPU and 2 GB RAM can be enough for a CALM assistant; 4 GB gives margin for training and the image.
az group create --name$RG--location$LOCaz vm create \--resource-group$RG\--name$VM\--image Ubuntu2404 \--size Standard_B2s \--admin-username azureuser \--generate-ssh-keys\--public-ip-sku Standard \--public-ip-address-dns-name$DNS
If the size is unavailable, list sizes and pick one with at least 2 GB RAM:
az vm list-skus --location$LOC--size Standard_B2 --output table
🔓 6.3 · Open ports and get the address
az vm open-port --resource-group$RG--name$VM--port 80 --priority 900az vm open-port --resource-group$RG--name$VM--port 443 --priority 901az vm show -d--resource-group$RG--name$VM--query fqdns -o tsv
Port 80 is needed for the certificate check. The address looks like appcoach-yourname.westus2.cloudapp.azure.com. Write it down.
If empty, build it: $DNS.$LOC.cloudapp.azure.com.
Checkpoint 6: You have a *.cloudapp.azure.com name.
Enter AUTH_USER and your password when the browser asks.
Run the Lab 3 test script: choose a lesson, walk through, stuck, where am I, done, practice mode.
projectUrl must be the public https address. The localhost URL in the log only works on the VM.
🩺 9.3 · Test from the command line
curl-u coach -s-X POST https://DOMAIN/webhooks/rest/webhook \-H'Content-Type: application/json'\-d'{"sender":"t1","message":"I want to learn an app"}'
-u coach asks for the password; use your own AUTH_USER.
Expect JSON that includes the question “Which app would you like to learn?” and its buttons.
Without -u, Caddy answers 401. That is the password gate working.
📝 9.4 · Read the log
After finishing one lesson in the Inspector:
cat ~/appcoach-demo/lesson_log.jsonl
You should see lesson_started, step_shown, reply_..., and lesson_completed events.
Checkpoint 9: You completed a guided lesson, a stuck-and-recover turn, and a “where am I” digression at the https address, and the log shows the events.
🎙️ Optional · Voice
Voice is not required for this workshop. If you want to try it:
Add DEEPGRAM_API_KEY=... to deploy/.env.
Recreate the assistant: docker compose up -d --force-recreate assistant.
In the Inspector, switch to voice and allow the microphone.
HTTPS is already in place, which browsers require. Voice over this proxy is not verified in this deck: record what works and what fails, including misheard words.
④ Operate and wrap up
Part 10 · Update, stop, clean up, review
Update → deallocate → delete → reflect
🔄 Part 10 · Deploy an update
On your laptop: edit, commit, Push origin. Then on the VM:
cd ~/appcoach-demo &&git pullcd deploydocker compose run --rm assistant traindocker compose restart assistant
Changed only lessons.py or actions.py? Restart is enough; retrain only when domain.yml, flows.yml, or config.yml change.
The bind mount means no image rebuild is needed.
🛑 Stop, restart, delete
Azure bills for compute while a VM is allocated, even if the OS is shut down:
az vm deallocate --resource-group appcoach-rg --name appcoach-vmaz vm start --resource-group appcoach-rg --name appcoach-vm
When the course ends, delete everything:
az group delete --name appcoach-rg --yes
Containers with restart: unless-stopped come back after a start.
🧯 Troubleshooting · Rasa
Symptom
Likely cause → Fix
License error at startup
RASA_LICENSE missing or misspelled in deploy/.env
“No model found”
Training not done → docker compose run --rm assistant train
Model/version warning
Image tag differs from the version you tested → align the tag, retrain
Replies fail or LLM errors
LLM key missing or wrong name → check config.yml, update .env, recreate
Unknown or failing action
docker compose logs assistant; check actions/__init__.py and endpoints.yml
Inspector loads but cannot connect
projectUrl is localhost → use the public https address
🧯 Troubleshooting · Network and login
Symptom
Likely cause → Fix
Browser cannot connect
Ports 80/443 not open → rerun both az vm open-port commands
Certificate error or timeout
Not issued yet, or wrong DOMAIN → docker compose logs caddy, cat .env
Login rejected
Wrong user or hash → regenerate hash; keep single quotes in .env
Caddy fails to start
Hash pasted wrongly → check AUTH_USER and AUTH_HASH lines
permission denied on docker
No re-login after usermod → exit, log in again
variable DOMAIN is not set
No deploy/.env → create it (Part 8)
port is already allocated
Another service uses 80/443 → sudo ss -tlnp
🛡️ Security and privacy checklist
💭 Reflection · Agency and care
The log holds a sender ID and every reply. What would informed consent look like for an older adult?
The Inspector is a developer tool. What would a real user interface need that it lacks?
The password gate protects your LLM bill. What else could go wrong if the URL is shared?
A completed step means the user said “done”. Is that evidence they learned the task?
📇 Command cheat sheet
Task
Command
Train
cd ~/appcoach-demo/deploy && docker compose run --rm assistant train