Yes, you can host your bot on your own servers. Microsoft Teams provides different ways to run or host your bot during development and production.
running the bot locally does not give you access to Teams app functionality or Teams-specific bot functions like roster calls and other channel-specific functionality. It is mainly for testing the core logic of your bot.
For production hosting, you have two options:
Locally hosted in Teams: This involves running the app locally in tunneling software and creating a package to upload into Teams. This allows you to run and debug your app within the Teams client. You can use tunneling services like ngrok to create a secure tunnel between your local server and the internet. This allows Teams to communicate with your locally hosted bot. You need to update your bot endpoint address with the ngrok URL. However, ngrok free accounts do not provide end-to-end encryption, so if you require encryption, you may need a paid ngrok account.
Cloud-hosted in Teams: This option simulates the production-level support for a Teams app. You can upload your solution to your externally accessible server or cloud provider of choice and create a package to upload into Teams. This allows your app to be hosted in the cloud and accessed by Teams users.
When hosting your bot on your own servers, you need to consider scalability, performance, and security aspects. For example, application-hosted media bots require more compute and network capacity than messaging bots and may incur higher operational costs. You also need to ensure that your bot can handle the expected number of simultaneous calls and consider the hardware requirements for media processing.
To learn more about hosting and debugging your bot in Teams, you can refer to the Microsoft Teams documentation.