🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
MDriven Server & MDriven Turnkey On Native MacOs
This page was created by Lydia on 2025-10-21. Last edited by Wikiadmin on 2026-07-29.

You can run MDriven Server and MDriven Turnkey directly on macOS for local testing when you have the native macOS packages and a compatible .NET runtime.

This page covers a temporary, native Terminal-based run: both processes remain running only while their Terminal sessions remain open. For a persistent macOS deployment with launchd, use HowTos:Deploying on MacOs. For a container-based local environment, use Documentation:Running MDriven Locally with Docker.

Choose the deployment approach

Approach Use it when Guide
Native macOS processes You want to run the downloaded MDriven Server and Turnkey packages directly with .NET during local testing. This page
Native macOS services You want MDriven Server and Turnkey to start and run as macOS services. HowTos:Deploying on MacOs
Docker containers You want an isolated, reproducible local environment on Intel/AMD or Apple Silicon hardware. Documentation:Running MDriven Locally with Docker

What runs where

MDriven Server hosts the server-side model and is the endpoint that MDriven Turnkey connects to. Turnkey provides the web application interface. In this local example, both applications run on the same Mac.

Component Local address in this guide Purpose
MDriven Server http://localhost:5010 Runs the MDriven Server process.
MDriven Turnkey http://localhost:5011 Runs the Turnkey web application and connects to the local MDriven Server.

If you change either port, update the matching startup argument and configuration so that Turnkey still points to the MDriven Server endpoint.

Prerequisites

Before installing the MDriven packages, prepare the Mac:

  • macOS Ventura or later is recommended.
  • You need access to the Terminal application.
  • Download packages that match your Mac processor architecture: x64 for Intel Macs and ARM64 for Apple Silicon Macs.
  • Install .NET SDK 8.0. The installed runtime must be compatible with the MDriven package you download.
  • Obtain the current native MDriven Server package and MDriven Turnkey package from the MDriven download location available to you.

Check the processor architecture

Open Terminal and run:

uname -m

Use the result to select the appropriate package architecture. For example, an Apple Silicon Mac requires an ARM64 package; using an AMD64/x64 package can prevent the application from starting.

Install Homebrew

Homebrew is a macOS package manager. Skip this section if brew is already installed.

  1. Open Terminal.
  2. Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Verify that Terminal can find Homebrew:
brew --version

The command should return a Homebrew version number.

Install and verify .NET 8

  1. Install the .NET 8 SDK:
brew install --cask dotnet-sdk@8
  1. Verify the installation:
dotnet --list-runtimes

Confirm that the output includes a .NET 8 runtime. If dotnet is not found after installation, resolve the .NET command-path issue before continuing. Documentation:Deployment: Two Ways To Install Docker Desktop on MacOS Intel includes an example of linking the .NET command on Intel macOS.

Download and prepare MDriven Server

  1. Download the current native MDriven Server package for your processor architecture.
  2. Create a working directory. For example:
mkdir -p ~/MDrivenServer
  1. Extract the downloaded package into ~/MDrivenServer.
  2. In Terminal, move to the extracted directory:
cd ~/MDrivenServer

Remove the macOS quarantine attribute

macOS Gatekeeper can apply a quarantine attribute to files extracted from downloaded archives. If Gatekeeper prevents the MDriven binaries from running, remove the attribute from the extracted MDriven Server directory:

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

Run this command only for a package you obtained from a trusted MDriven download source.

Start MDriven Server

Start the server using the executable entry point supplied in the downloaded package. Configure it to listen on port 5010 and disable HTTPS for this local HTTP example.

Keep this Terminal window open. A successful startup reports that the server is listening on port 5010.

If the package does not start, first confirm that:

  • You downloaded the package for the correct processor architecture.
  • .NET 8 is installed and available as dotnet.
  • The quarantine attribute was removed when Gatekeeper blocked execution.
  • Port 5010 is not already in use.

Download and prepare MDriven Turnkey

  1. Download the current native MDriven Turnkey package for the same processor architecture.
  2. Create a separate working directory. For example:
mkdir -p ~/MDrivenTurnkey
  1. Extract the Turnkey package into ~/MDrivenTurnkey.
  2. Remove the macOS quarantine attribute if required:
xattr -r -d com.apple.quarantine ~/MDrivenTurnkey
  1. Open a second Terminal window and move to the extracted Turnkey directory:
cd ~/MDrivenTurnkey

Configure the Turnkey-to-server connection

Turnkey must know where to find MDriven Server. When both applications run on the same Mac using this guide's ports, the target is localhost on port 5010.

Review these locations under the Turnkey installation directory before starting Turnkey:

Location Role
App_Data/MDrivenServerOverride.xml Contains the MDriven Server host or domain and port that Turnkey uses. For this local setup, use localhost and the MDriven Server port.
App_Data/TurnkeySettings.xml Holds Turnkey settings.
App_Data/turnkey-settings/ May contain HardServerUrl.xml, which can affect the server URL used by Turnkey.

Do not assume that changing only the startup port changes the Turnkey connection target. If you move MDriven Server from port 5010, update the applicable Turnkey configuration file as well.

For the settings and credentials required when configuring Turnkey for an on-premise installation, see Documentation:Set up MDriven Turnkey on premise.

Start MDriven Turnkey

Start Turnkey using the executable entry point supplied in the downloaded package. Configure its local HTTP endpoint on port 5011.

Keep the second Terminal window open. The startup output should confirm that Turnkey started and identified the MDriven Server URL. If it cannot connect, verify that MDriven Server is still running on localhost:5010 and review the Turnkey configuration files described above.

Verify the installation

  1. In a browser, open http://localhost:5010 to verify that MDriven Server responds.
  2. In a browser, open http://localhost:5011 to verify that Turnkey responds.
  3. You can also test the endpoints from Terminal:
curl http://localhost:5010
curl http://localhost:5011

A responding Turnkey process does not by itself prove that an application model is available. Upload a model before using the Turnkey application as an end-to-end test. Without a model, the Turnkey page can continue loading even though the Turnkey process started successfully.

Troubleshooting

A port is already in use

MDriven Server or Turnkey cannot start if another process already uses its assigned port. Use a different port in the application's startup configuration, then update the corresponding connection configuration. For example, changing the MDriven Server port requires a matching update to the Turnkey server URL override.

Turnkey starts but cannot reach MDriven Server

Check these items in order:

  1. Confirm that the MDriven Server Terminal window is still running.
  2. Open http://localhost:5010 in a browser or use curl.
  3. Check App_Data/MDrivenServerOverride.xml for the expected host and port.
  4. Check whether HardServerUrl.xml under App_Data/turnkey-settings/ specifies a different server URL.

The application stops when Terminal closes

This is expected for the temporary process-based setup. Keep both Terminal windows open while testing. To run the applications after logout or restart, create macOS services as described in HowTos:Deploying on MacOs.

Gatekeeper blocks an application

Remove the quarantine attribute from the relevant extracted package directory with xattr -r -d com.apple.quarantine, then start the application again. Do not remove quarantine attributes from files whose origin you cannot verify.

Next steps

See also