SOLVED

How to deploy a Bot developed with Teams Toolkit (5.x) to a self-managed server?

Copper Contributor

Greetings,

I'm developing a Workflow Bot or Command Bot as a pilot project for use in our organization.
Using Teams Toolkit, local testing is automatically supported from app registration without much consideration, so it seems very convenient.
However, when I try to deploy this, I am a bit confused. Teams Toolkit seems to support deployment according to Azure Bot Service by default.(.dev)
I can't use the Bot Service for a number of reasons and should consider running the bot on a self-managed host. First of all, is this possible?
In this case, what steps should I take in Teams Toolkit, Azure portal, Teams development portal?
If this is not possible with Teams Toolkit, how should I configure the bot's hosting?

3 Replies

@LeeJinWoo - Thanks for reporting your issue.

You can refer to the following document for guidance on deploying Teams apps using the Teams Toolkit:

Deploy Teams apps using Teams Toolkit

This document provides detailed instructions and steps for deploying Teams apps using the Teams Toolkit. It will help you understand the deployment process and make it easier for you to deploy your own Teams app.

Thanks,
Nivedipa
-------------------------------------------------------------------------
If the response is helpful, please click Mark as Best Response and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

Thank you for your answer.
I have already seen the documentation you guided me through. It seems that the explanation here is also focused on configuring the app's backend in Azure. I would like to know what to do when configuring the app's backend on a server other than Azure or on a self-managed server.
Regardless of how the backend is configured, is the use of Azure Bot Service mandatory for Teams Bot development?
best response confirmed by LeeJinWoo (Copper Contributor)
Solution
Azure Bot Service is not mandatory for Teams bot development, and you can deploy your bot to a self-managed server or any other hosting platform that meets your requirements.

Follow the below steps to configure the backend for a Teams bot on a self-managed server:

Set up your server: Prepare your self-managed server or hosting environment by ensuring it meets the necessary requirements for hosting your bot's backend. This typically includes installing the required software, dependencies, and configuring network settings.

Develop your bot's backend: Implement the backend logic for your Teams bot using the programming language and framework of your choice. This includes handling incoming messages, processing user interactions, and integrating with other services or APIs as needed.

Expose your bot's endpoint: Make your bot's backend accessible over the internet by exposing the endpoint or URL where the bot is hosted. Configure the necessary firewall rules, network settings, and routing to allow external communication to reach your bot's endpoint.

Configure the Teams app manifest: Update the Teams app manifest to specify the endpoint or URL where your bot's backend is hosted. This ensures that Teams knows where to send incoming messages and events for your bot.

Register your bot with Azure Bot Framework: While Azure Bot Service is not mandatory, you can still register your bot with Azure Bot Framework. This provides you with capabilities like using the Bot Framework Emulator for local testing, managing bot channels, and utilizing the Bot Framework SDK for advanced features.

Test and deploy: Test your bot by interacting with it in the Teams client or using tools like the Bot Framework Emulator. Once you are satisfied with its functionality, deploy your bot's backend to your self-managed server, ensuring that it is publicly accessible.
1 best response

Accepted Solutions
best response confirmed by LeeJinWoo (Copper Contributor)
Solution
Azure Bot Service is not mandatory for Teams bot development, and you can deploy your bot to a self-managed server or any other hosting platform that meets your requirements.

Follow the below steps to configure the backend for a Teams bot on a self-managed server:

Set up your server: Prepare your self-managed server or hosting environment by ensuring it meets the necessary requirements for hosting your bot's backend. This typically includes installing the required software, dependencies, and configuring network settings.

Develop your bot's backend: Implement the backend logic for your Teams bot using the programming language and framework of your choice. This includes handling incoming messages, processing user interactions, and integrating with other services or APIs as needed.

Expose your bot's endpoint: Make your bot's backend accessible over the internet by exposing the endpoint or URL where the bot is hosted. Configure the necessary firewall rules, network settings, and routing to allow external communication to reach your bot's endpoint.

Configure the Teams app manifest: Update the Teams app manifest to specify the endpoint or URL where your bot's backend is hosted. This ensures that Teams knows where to send incoming messages and events for your bot.

Register your bot with Azure Bot Framework: While Azure Bot Service is not mandatory, you can still register your bot with Azure Bot Framework. This provides you with capabilities like using the Bot Framework Emulator for local testing, managing bot channels, and utilizing the Bot Framework SDK for advanced features.

Test and deploy: Test your bot by interacting with it in the Teams client or using tools like the Bot Framework Emulator. Once you are satisfied with its functionality, deploy your bot's backend to your self-managed server, ensuring that it is publicly accessible.

View solution in original post