🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Deploy Turnkey on your own Azure with OneDrive
This page was created by Hans.karlsen on 2020-09-18. Last edited by Wikiadmin on 2026-07-29.

You can use Azure Deployment Center with OneDrive to deploy and update the MDriven Turnkey and MDrivenServer application files in an Azure Web App that you already configured for a self-hosted Turnkey site.

Use this method after the Azure Web App and its MDrivenServer virtual application are configured. It is suitable for refreshing the installed MDriven Turnkey and MDrivenServer versions because Azure deploys the contents of the linked OneDrive folder to the app.

For the complete Azure Web App setup, including the MDrivenServer virtual application, required override files, password reset, WebSockets, and Turnkey-to-server connection, see HowTos:Install MDriven Server and Turnkey on Microsoft Azure. For an initial installation, MDriven recommends deploying through MDriven Portal first so that the initial files are updated and a strong password is set. You can use the OneDrive procedure on this page for later code updates.

Before you begin

Confirm the following before you connect OneDrive:

  • You have created an Azure Web App for the site. See Documentation:Hosting turnkey on my own Azure account.
  • The Web App is configured to run MDriven Turnkey from its root folder and MDrivenServer from the /__MDrivenServer virtual path. The __MDrivenServer virtual application must be of type Application.
  • You have access to the OneDrive account that Azure Deployment Center will use.
  • You have downloaded the required MDriven application packages from MDriven downloads: one MDriven Turnkey ZIP file and one MDrivenServer ZIP file.
  • If this is the first deployment, you have completed the initial deployment and configuration described in HowTos:Install MDriven Server and Turnkey on Microsoft Azure.

Connect the Web App to OneDrive

  1. In the Azure portal, open the Web App that will host Turnkey.
  2. Open Deployment Center.
  3. Choose OneDrive as the deployment source.
  4. Follow the Azure wizard and provide the folder name when prompted. Azure uses the Web App name as the default folder name.
  5. Complete the wizard.

After the connection is created, check the local OneDrive folder on the computer that synchronizes the selected OneDrive account. Azure creates a folder similar to:

C:\Users\<YourName>\OneDrive\Apps\Azure Web Apps\<YourApp>

This folder is the deployment source. Put the application files in this folder, then use Sync in Deployment Center to deploy them to Azure.

Prepare the OneDrive deployment folder

The deployed folder must contain Turnkey at its root and MDrivenServer in a folder named __MDrivenServer.

Component Source ZIP location Destination in the OneDrive deployment folder
MDriven Turnkey The Application folder in the MDriven Turnkey ZIP file The root of <YourApp>
MDrivenServer The Application folder in the MDrivenServer ZIP file <YourApp>\__MDrivenServer

Copy MDriven Turnkey files

  1. Open the downloaded MDriven Turnkey ZIP file.
  2. Open its Application folder.
  3. Copy all contents of that folder.
  4. Paste the contents into the root of the OneDrive deployment folder created for the Web App.

For example, if the Web App is named ContosoApp, copy the Turnkey application files to:

C:\Users\<YourName>\OneDrive\Apps\Azure Web Apps\ContosoApp

Copy MDrivenServer files

  1. In the root of the OneDrive deployment folder, create a directory named __MDrivenServer. The name starts with two underscore characters.
  2. Open the downloaded MDrivenServer ZIP file.
  3. Open its Application folder.
  4. Copy all contents of that folder into the __MDrivenServer directory.

The resulting layout is:

<YourApp>
├── [MDriven Turnkey Application contents]
└── __MDrivenServer
    └── [MDrivenServer Application contents]

Do not place the MDrivenServer ZIP file itself in __MDrivenServer. Copy the contents of its Application folder.

Deploy the files

  1. Return to the Azure Web App.
  2. Stop the Web App before starting the sync. Stopping it reduces the risk that deployed files are locked.
  3. Open Deployment Center.
  4. Select Sync to deploy the contents of the OneDrive folder.
  5. Monitor the deployment log in Deployment Center until it reports that the code has been updated.
  6. Start the Web App after the deployment completes.

Verify the deployment

After starting the Web App:

  1. Open the Turnkey application at the Web App URL.
  2. Open MDrivenServer at <Your Azure App Domain>/__MDrivenServer/.
  3. Confirm that Turnkey can connect to MDrivenServer.

If Turnkey does not connect, verify the Azure configuration and the override files described in HowTos:Install MDriven Server and Turnkey on Microsoft Azure. In particular, check that:

  • __MDrivenServer is configured as an Azure virtual application, not only as a folder.
  • The MDrivenServer virtual path is /__MDrivenServer and its physical path is site\wwwroot\__MDrivenServer.
  • WebSockets are enabled for the Azure App.
  • The Turnkey and MDrivenServer App_Data override files are present and point to the intended applications.

Update Turnkey and MDrivenServer later

Use the same process whenever you need to deploy a selected or newer version:

  1. Download the desired MDriven Turnkey and MDrivenServer ZIP files.
  2. Replace the Turnkey application contents in the root of the OneDrive deployment folder.
  3. Replace the MDrivenServer application contents in __MDrivenServer.
  4. Stop the Azure Web App.
  5. Run Sync from Deployment Center and review the deployment log.
  6. Start the Web App and verify both the Turnkey URL and /__MDrivenServer/.

Keep the folder structure unchanged during an update: Turnkey remains at the deployment-folder root, and MDrivenServer remains under __MDrivenServer.

See also