🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
MDriven Server & MDriven Turnkey On Native MacOs
Created by Lydia on 2025-10-21 · Last edited by Edgar on 2025-11-02.
This guide outlines the process of installing MDriven Server and MDriven Turnkey on macOS using .NET Core, without needing a separate web server. It includes steps for installing prerequisites like Homebrew and .NET SDK, downloading and setting up MDriven Server and Turnkey, addressing macOS Gatekeeper restrictions, and running both applications. The guide also covers verification of installation and provides important notes on configuration files, keeping terminal windows open, and changing port numbers if needed.

Installing MDriven Server and MDriven Turnkey on MacOS (Native)

This guide provides a detailed, step-by-step process for installing and running MDriven Server and MDriven Turnkey directly on macOS. This native setup relies on the .NET Core runtime and avoids the need for a separate web server like Apache.

Prerequisites

Before you begin, ensure you have the following installed:

  • macOS (Ventura or later recommended)
  • Terminal access
  • The correct .NET SDK installed for your processor (x64 for Intel, ARM64 for Apple Silicon).

Step 1: Install Homebrew

Homebrew is a package manager that simplifies installing necessary tools on macOS.

  1. Open Terminal and run the following command to install Homebrew
    $ /bin/bash -c"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    Verify the installation:
    $ brew --version

Step 2: Install .NET SDK 8.0

Use Homebrew to install the .NET SDK:

brew install --cask dotnet-sdk@8

Verify installation:

dotnet --list-runtimes

Step 3: Download and Set Up MDriven Server

Check for the latest MDriven Server Upload, Download the MDriven Server package, extract the files, and prepare them to run.

  1. Download and Unzip the latest MDriven Server package into your ~/Downloads directory:
$ curl -s "https://mdriven.net/Rest/ProductRelease/Get?vProduct=ServerCore&platform=linux"  | jq -r '.Releases[0]'
https://downloads.mdriven.net/releases/MDrivenServerCoreLinux_20251030.zip

$ wget https://downloads.mdriven.net/releases/MDrivenServerCoreLinux_20251030.zip
$ unzip MDrivenServerCoreLinux.zip -d ~/MDrivenServer

Fix macOS Quarantine Restriction (Gatekeeper)

MacOS Gatekeeper may prevent the extracted binaries from running. You must remove the quarantine attribute before launching the server:

$ sudo xattr -r -d com.apple.quarantine  ~/MDrivenServer

Run MDriven Server

Launch the Server directly using the dotnet runtime, specifying the port and disabling HTTPS (which can be configured later).

$ dotnet ~/Downloads/MDrivenServer/AppCompleteGenericCore.dll -port=5010 --nohttps

Expected Output: You should see confirmation that the server has started and is listening on port 5010:

This is MDriven Server

Leave this window open to keep the server running

http://localhost:5010

useIIS: False

Step 4: Download and Set Up MDriven Turnkey

Check for latest Turnkey core version, Download. After this step we will ensure The Turnkey application connects to the running MDriven Server to provide the web UI.

Fix macOS Quarantine Restriction (Gatekeeper)

Remove the quarantine flag from the Turnkey binaries

$ sudo xattr -r -d com.apple.quarantine ~/MDrivenTurnkey
  • Download and Unzip the latest MDriven Turnkey package into your ~/MDrivenTurnkey directory:
  • Note: The name of the resulting directory in the example output suggests a version specific folder, so you may need to adjust the path below if your unzipped folder name is different.
$ curl -s "https://mdriven.net/Rest/ProductRelease/Get?vProduct=TurnkeyCore&platform=linux"  | jq -r '.Releases[0]'
https://downloads.mdriven.net/releases/MDrivenTurnkeyCoreLinux_20251030.zip

$ wget https://downloads.mdriven.net/releases/MDrivenTurnkeyCoreLinux_20251030.zip
$ unzip MDrivenTurnkeyCoreLinux_20251030.zip -d ~/MDrivenTurnkey

Expected Result if server started successfully.

Expected OutCome: 
$ dotnet StreaminAppCoreWebApp.dll --nohttps                
This is MDriven Turnkey, 2025-10-28 05:13
Leave this window open to keep the server running
http://localhost:5011
useIIS: False
autoblazer is always on - use SysMDrivenMiscSettingsSingleton.GlobalBlazorClient
Started with MDrivenServerUrl: http://localhost:5010/
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[62]
      User profile is available. Using '/Users/saged-lyd-govnet-services/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://localhost:5011
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /Users/saged-lyd-govnet-services/Desktop/ScreenShots/MDrivenTurnkeyCoreOsxX64_20251028
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://localhost:5011/ - - -
CHANGEDOWNLOADLOC looking for dir emoticon-thinkingUsers/saged-lyd-govnet-services/Desktop/ScreenShots/MDrivenTurnkeyCoreOsxX64_20251028/wwwroot/_framework
CHANGEDOWNLOADLOC Dir found - we are published
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
      Executing endpoint 'TurnkeyWebAppGeneric.Controllers.TurnkeyController.Index (StreaminAppCoreWebApp)'
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[102]
      Route matched with {action = "Index", controller = "Turnkey", page = "", area = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult Index() on controller TurnkeyWebAppGeneric.Controllers.TurnkeyController (StreaminAppCoreWebApp).
info: Microsoft.AspNetCore.Mvc.RedirectToActionResult[1]
      Executing RedirectResult, redirecting to /App/StartUpView?redirectUrl=%252f.

Run MDriven Turnkey

Launch the Turnkey application. It will automatically attempt to connect to the Server running on port 5010.

Bash

$ dotnet ~/MDrivenTurnkey/StreaminAppCoreWebApp.dll

Expected Output: The output will confirm the application started and successfully recognized the Server URL:

This is MDriven Turnkey, 2025-10-20 17:52

Leave this window open to keep the server running

http://localhost:5011...

Started with MDrivenServerUrl: http://localhost:5010/...Now listening on: http://localhost:5020

Step 5: Verify Installation and Access

With both servers running (in separate Terminal windows), you can verify access via your web browser or using curl. Please note that you would need to upload a model to test the turnkey server functionality - without a model it will just keep loading page running even when turnkey server has started successfully .

Application URL Verification Command
MDriven Server http://localhost:5010 curl -vk http://localhost:5010
MDriven Turnkey http://localhost:5011 curl -vk http://localhost:5011

Screenshot 2025-10-30 at 10.26.51.png

Screenshot 2025-10-30.png

Important Notes

Under the MDriven Turnkey directory navigate to App_Data folder

$ App_Data %

$ cat CommandLineOverride.xml

<root>

  <arg>port=5011</arg>  // only when you run locally (You can change ports from here)

  <arg>nohttps</arg>    // remove to have https

  <arg>host=localhost</arg>   // only when you run locally

<!-- <arg>iis=https://localhost/TKDebug</arg> // probably the only param you send for IIS hosting  -->

</root>

MDrivenServerOverride.xml (Contains details for the MDriven server that the Turnkey will be connecting to such as IP/Domain name if any and port). In this example we are running both MDriven Server and Turnkey locally thus "localhost".

$ cat MDrivenServerOverride.xml

<?xml version="1.0" encoding="utf-8"?>

<root>

  <MDrivenServerOverride MDrivenServerUser="a" MDrivenServerPWD="123456">http://localhost:5010/</MDrivenServerOverride>

</root>


TurnkeySettings.xml

turnkey-settings - (this is a folder and may contain the HardServerUrl.xml file)

HardServerUrl.xml

<?xml version="1.0" encoding="utf-8"?>
<root HardServerUrl="http://localhost:5010">
</root>

Under the MDriven Server Folder. If the server isnt starting check the following file and ensure the correct port is what is configured;

cat CommandLineOverride.xml
<root>
  <arg>port=5010</arg>  // only when you run locally
  <arg>nohttps</arg>    // remove to have https
  <arg>host=localhost</arg>   // only when you run locally
 <!-- <arg>iis=https://localhost/TKDebug</arg> // probably the only param you send for IIS hosting  -->
</root>%

Additional Notes

  • Keep Windows Open: Both Terminal windows must remain open for the Server and Turnkey processes to stay running. Closing a window will shut down the corresponding application.
  • Backgrounding: For persistent use without leaving windows open, you must create a launch daemon or use a process manager like Supervisor or PM2 (not covered in this guide).
  • Port Numbers: If ports 5010 or 5011 are already in use, the Server or Turnkey may fail to start. You can change the ports using the -port=XXXX argument in the dotnet command or hard code them in the following files.