You can use this page to choose a deployment path for an MDriven Turnkey application and find the installation, update, and troubleshooting guide that matches your environment.
Choose a deployment path
MDriven Turnkey deployments contain two web application parts:
- Turnkey — the user-facing web application.
- MDrivenServer — the server component used by Turnkey.
Deploy these parts in this order:
- Deploy Turnkey.
- Deploy MDrivenServer.
- Start or restart the application and verify that Turnkey can connect to MDrivenServer.
For example, when updating an existing installation, update the Turnkey package first and then the MDrivenServer package. If deployment reports an error while copying MDrivenServer files, investigate the MDrivenServer deployment package and its deployment step; see HowTos:Troubleshoot Turnkey Deployment.
| Your environment or goal | Recommended guide | Use it when |
|---|---|---|
| Azure Web App with OneDrive deployment | Documentation:Deploy Turnkey on your own Azure with OneDrive | You have created an Azure Web App and want Azure Deployment Center to deploy files synchronized from OneDrive. |
| Docker on a development machine or server | Documentation:Deploying MDriven Server and Turnkey with Docker | You want MDrivenServer and Turnkey in containers, either for local development or as the basis for a production deployment. |
| Docker production deployment behind Nginx | Documentation:Deploying MDriven to Production with Nginx | You want a public-facing Docker deployment with Nginx reverse-proxy routing. |
| Windows IIS package updates | HowTos:Automate Deployment of Turnkey and MDrivenServer on IIS | You deploy downloaded installation packages to IIS and want repeatable command-line updates. |
| Docker Desktop on an Intel Mac | Documentation:Deployment: Two Ways To Install Docker Desktop on MacOS Intel | You need to install and verify Docker Desktop before working with containers on macOS Intel. |
Prepare before you deploy
Before selecting a procedure, identify the following:
- The target environment: Azure, Windows IIS, Docker, or a Linux host behind Nginx.
- Whether this is a new installation or an update of an existing application.
- Where application data and settings will be retained during an update.
- The production database configuration. For supported production database configuration guidance, see Documentation:Configuring Production Databases PostgreSQL MySQL MSSQL.
- Whether the site will be publicly accessible and therefore requires reverse-proxy, domain, and certificate configuration appropriate to your environment.
Keep the Turnkey and MDrivenServer deployment artifacts distinct. The two components have separate deployment locations in the documented Azure and IIS approaches.
Deploy on Microsoft Azure with OneDrive
Use Documentation:Deploy Turnkey on your own Azure with OneDrive when Azure Deployment Center is configured to use OneDrive as its source.
The documented layout is:
| Component | OneDrive deployment location |
|---|---|
| Turnkey | The contents of the Application directory from the Turnkey ZIP are copied to the OneDrive folder created for the Azure Web App.
|
| MDrivenServer | The contents of the Application directory from the MDrivenServer ZIP are copied to a directory named __MDrivenServer in that same OneDrive folder.
|
Follow this workflow:
- In Azure, open Deployment Center for the Web App and choose OneDrive. Complete the wizard.
- Find the folder that Azure creates in your local OneDrive under
OneDrive\Apps\Azure Web Apps\<YourApp>. - Download the required Turnkey and MDrivenServer ZIP packages.
- Copy the contents of the Turnkey ZIP file's
Applicationdirectory to the OneDrive app folder. - Create
__MDrivenServerin the OneDrive app folder. - Copy the contents of the MDrivenServer ZIP file's
Applicationdirectory to__MDrivenServer. - Stop the Azure Web App before synchronization to avoid locked files blocking the update.
- In Deployment Center, select Sync and monitor the deployment log.
- After the update completes, start the Web App.
This procedure also applies when refreshing an installation or changing the deployed Turnkey and MDrivenServer versions. Read the full Azure procedure before deploying: Documentation:Deploy Turnkey on your own Azure with OneDrive.
Deploy with Docker
Docker packages an application and its runtime dependencies into an image. A container is a running instance of an image. Use the Docker deployment guide to select either a local-development or production configuration:
- Documentation:Deploying MDriven Server and Turnkey with Docker covers the supplied Docker deployment paths, including local development and production use.
- Documentation:Deploying MDriven to Production with Nginx covers production routing through Nginx.
In a Docker deployment, Turnkey and MDrivenServer must be able to communicate on the same network for local deployment. When using the documented compose configuration, retain settings outside the containers through the documented bindings so that configuration is available after container recreation.
Production routing with Nginx
For a production Docker deployment, use Documentation:Deploying MDriven to Production with Nginx. That guide covers Nginx reverse-proxy deployment and subdirectory routing.
When serving the applications on one domain with subdirectories, the documented route layout is:
| Application | Route |
|---|---|
| Turnkey | /
|
| MDrivenServer | /__MDrivenServer
|
| File Manager | /Scm
|
If MDrivenServer is behind the /__MDrivenServer subdirectory, set its application path in the CommandLineOverride file in the mdriven-server-settings directory. Without this setting, MDrivenServer cannot correctly resolve URLs behind that subdirectory.
Docker security and operational settings
The Docker guide documents operational settings that matter during production deployment:
- Run application processes with lowered permissions by setting
PUID=1000andPGID=1000in the compose configuration. - If you reset the password for MDrivenServer user
a, placePwdReset.txtinsettings/mdriven-server, bind it to/pwdreset/PwdReset.txt, and update the corresponding password inMDrivenServerOverride.xmlundersettings/mdriven-turnkey. If these passwords differ, Turnkey attempts to connect with the wrong password, the user can be locked, and Turnkey enters an error state. - If you create your own Docker images rather than using the documented compose files, handle Alpine Linux locales, MDrivenServer health checks, and networking yourself.
For the complete configuration and update options, use Documentation:Deploying MDriven Server and Turnkey with Docker.
Docker Desktop on macOS Intel
If you use an Intel-based Mac for container work, start with Documentation:Deployment: Two Ways To Install Docker Desktop on MacOS Intel. It documents installation through the Docker Desktop installer or Homebrew, verification with docker --version and docker info, and basic image and container commands.
For example, after Docker Desktop is running, you can verify the Docker command line:
docker --version
docker info
The macOS guide also documents installing .NET SDK 8.0 or later and starting an Ubuntu 24.04 container from Docker Desktop.
Deploy and update on Windows IIS
Use HowTos:Automate Deployment of Turnkey and MDrivenServer on IIS to automate package deployment with Microsoft Web Deploy (msdeploy) and IIS command-line tools.
For one web application package, the documented msdeploy pattern sets the target IIS application path and preserves existing settings and resources:
"%PROGRAMFILES%\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -setParam:"Application Path"="Default Web Site/%2" -source:package=%1 -dest:iisApp="Default Web Site/%2" -enableRule:DoNotDeleteRule
In this command:
| Value | Meaning |
|---|---|
%1
|
The downloaded ZIP package name. |
%2
|
The IIS web application name and usually its folder name. |
-setParam
|
Overrides the application path embedded in the package. |
-enableRule:DoNotDeleteRule
|
Retains existing setting files and other resources during deployment. |
For multiple Turnkey and MDrivenServer sites, the automation guide shows how to:
- Stop the Turnkey and MDrivenServer application pools with
appcmd. - Deploy the required Turnkey site packages.
- Deploy the MDrivenServer package.
- Start the MDrivenServer application pool, then the Turnkey application pool.
Run these commands from an elevated command prompt. Use the complete guide rather than copying only the example: HowTos:Automate Deployment of Turnkey and MDrivenServer on IIS.
Verify and troubleshoot a deployment
After deployment, verify that both application parts were deployed and started in the required order. When an update fails, identify whether the failure occurred while deploying Turnkey or MDrivenServer.
A portal message in this form indicates a failure in the MDrivenServer deployment step:
AT <XXX> Doing MDrivenServerFor <XXX> Copying file <YYYY> to obj\Debug\Package\PackageTmp\<YYYY> failed.
Review the latest MDrivenServer deployment package and the MDrivenServer deployment step. See HowTos:Troubleshoot Turnkey Deployment for the diagnostic context.
Related deployment documentation
Documentation:Turnkey provides the wider Turnkey documentation, including architecture, site setup, and deployment-related topics. Use it when you need to understand the application you are deploying rather than the hosting procedure itself.
See also
- Documentation:Turnkey
- Documentation:Configuring Production Databases PostgreSQL MySQL MSSQL
- Documentation:Deploy Turnkey on your own Azure with OneDrive
- Documentation:Deploying MDriven Server and Turnkey with Docker
- Documentation:Deploying MDriven to Production with Nginx
- HowTos:Troubleshoot Turnkey Deployment
Update planning
Update planning
MDriven Server describes model updates as being interpreted in real time and states that it can calculate and apply necessary database schema changes as UML classes and attributes are updated. However, teams should verify the operational requirements of each change before treating it as an uninterrupted production update.
In the demonstrated service-side-job workflow, adding a new service-side ViewModel requires a system restart. Plan that type of change accordingly.
A service-side ViewModel can be configured to execute periodically when its criteria are met. Its actions are executed in top-to-bottom order. For example, the demonstration configures a job to select instances for which SomeInt = 10 and execute on a periodic interval.
For production update procedures, confirm which changes can be applied live, which require a restart, and how any periodic server-side processing should be handled during the update.
