Forum Discussion
XDeveloper29
Mar 27, 2024Copper Contributor
How to deploy a Bot/Message extn app developed with Teams Toolkit (5.6) to a self-managed server?
I'm developing a Bot/Message Extension App for use in our organization. Using Teams Toolkit, I have created a project and using Typescript for it. Local testing is automatically supported from app re...
Dinesh-MSFT
Jun 05, 2024Iron Contributor
Hi XDeveloper29 - Sorry for the delay in the response. To deploy a Bot/Message Extension app developed with Teams Toolkit to a self-managed server, follow these steps:
Prerequisites:
- Install ngrok to create an externally addressable URL for your bot.
- Update your bot's messaging endpoint to use the ngrok URL.
Steps to Deploy:
- Update Bot Messaging Endpoint:
- Change the bot's messaging endpoint to the ngrok URL in the Bot Framework portal, e.g.,
https://2d1224fb.ngrok.io/api/messages
.
- Update Code References:
- Replace all URL references in your code, configuration, and
manifest.json
with the ngrok URL.
- Configure ngrok:
- Run
ngrok http 3978 --host-header=localhost:3978
in the terminal to get an externally addressable URL.
- Deploy to Self-Managed Server:
- Host your bot on a server that supports Node.js applications.
- Update Bot Registration:
- Update the bot registration in Azure or the Teams development portal to the new endpoint on your server.
- Test the Bot:
- Ensure the bot functions correctly on your self-managed server.
Additional Information:
- Use the Bot Framework SDK for messaging schema and secure communication.
- Ensure your app manifest defines the message extension with necessary commands and locations.
By following these steps, you can deploy your bot to a self-managed server, hosting it independently of Azure Bot Service. Please refer to the Bot Framework SDK. If you need further assistance, feel free to ask.