LogoLogo
  • Getting Started
  • CLI
    • Docker
    • Config.yaml
  • GUI (SOON)
  • Tunnels Types
    • HTTP/s
      • HTTP/s plugins
      • HTTP/s apps
    • TLS
    • TCP
    • UDP
  • Reservations
    • Domain
    • Endpoint
  • Troubleshoot
    • Common errors
  • Tutorials
    • Expose a local web server
    • Expose Apache/Nginx web server
    • Share files from localhost
    • Use LocalXpose with Traefik
    • Expose PocketBase backend
    • Create a custom domain name
    • Make Let's Encrypt certificate
    • Access your IP camera remotely
    • Access your Raspberry Pi remotely
    • Sync your Keepass password manager
    • Expose localhost RASA chatbot for Telegram Integration
    • Expose your local Netdata Instance
    • Testing Stripe webhook
    • Expose localhost Kubernetes
    • Expose database server (PostgreSQL)
    • Exposing local Minecraft server
    • More Tutorials
Powered by GitBook
On this page
  • 1. Initialize a RASA project
  • 2. Create a Telegram Bot
  • 3. Reserve a sub-domain specific for your project
  • 4. Expose RASA server with LocalXpose
  • 5. Edit your credentials.yml
  • Talk to your Telegram bot

Was this helpful?

  1. Tutorials

Expose localhost RASA chatbot for Telegram Integration

This tutorial will show how you can expose your RASA chat bot to integrate it with Telegram.

PreviousSync your Keepass password managerNextExpose your local Netdata Instance

Last updated 2 years ago

Was this helpful?

This tutorial assumes that you have access to your Telegram account (create ) and have RASA installed (instructions).

1. Initialize a RASA project

You can simply initialize a new project.

$ rasa init --no-prompt

2. Create a Telegram Bot

Search @BotFather on telegram. Use '/newbot' to create a Telegram bot. Follow instructions until you set your bot name & get your Token for accessing Telegram's HTTP API.

3. Reserve a sub-domain specific for your project

loclx domain reserve --subdomain mybot

4. Expose RASA server with LocalXpose

The default port for RASA server is 5005.

loclx tunnel http --reserved-domain mybot.loclx.io --to :5005

5. Edit your credentials.yml

Edit your credential.yml file and add your access_token , verify (your bot name) & webhook_url (replace with your domain).

telegram:
  access_token: "826487496:AAE1C_rllVgoQ47sOJ9faM26nL6oE1ZcQE4"
  verify: "testxyzbot"
  webhook_url: "https://mybot.loclx.io/webhooks/telegram/webhook"

Talk to your Telegram bot

Search for User 'testxyzbot' & start chatting.

This is how you can have a working Telegram bot powered by RASA NLU with LocalXpose do the connecting for you.

You can reserve loclx.io subdomain or use a custom domain (explained ).

If you want these ports to be exposed during boot, you can create a systemd unit file as explained .

We haven't added any stories or domains. This bot is simply running off the default init model. Check for more info.

here
here
official rasa docs
here
here