You can install MDriven Server and MDriven Turnkey as systemd services on an Ubuntu 24.04 server; this guide is for administrators who want the services to run locally on ports 5010 and 5011.
Before you begin
This procedure installs two applications:
| Component | Purpose in this installation | Local port |
|---|---|---|
| MDriven Server | The MDriven Server instance that Turnkey connects to. | 5010
|
| MDriven Turnkey | The Turnkey web application. | 5011
|
You need:
- An Ubuntu 24.04 server and an account that can run
sudo. - SSH access to the server.
- The current Linux release ZIP files for MDriven Server and MDriven Turnkey from MDriven Downloads.
- The .NET SDK 8.0 or later. The SDK includes the .NET runtime used to start the supplied DLL files.
For a container-based local development installation instead, use Documentation:Running MDriven Locally with Docker. For macOS deployment, see HowTos:Deploying on MacOs.
Connect and update the server
- Connect to the server over SSH:
ssh username@IP_Address
- Update installed package information and packages:
sudo apt-get update
sudo apt-get upgrade
- Install SSH server support and Fail2ban, as used by this setup:
sudo apt-get install openssh-server fail2ban
Install prerequisites
Install HTTPS, download, and archive tools
Install the tools used to retrieve and extract the release packages:
sudo apt-get install -y apt-transport-https wget ca-certificates unzip
Install .NET SDK 8.0
Add the Microsoft package repository, then install the .NET 8 SDK:
sudo apt-get update
wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y dotnet-sdk-8.0
Verify that .NET runtimes are available:
dotnet --list-runtimes
The repository package in the command above is named for Debian 12 although this page targets Ubuntu 24.04. Confirm the supported Microsoft package-repository setup for your operating system before running these commands.
Optional: install Nginx
Install Nginx only if you plan to place it in front of MDriven Server or Turnkey as a web server or proxy:
sudo apt install nginx
sudo systemctl status nginx
The status output should report active (running). For proxy configuration, see Documentation:Serving MDriven with Nginx Server as a Proxy.
Download and extract MDriven Server
- Open MDriven Downloads and identify the current Linux MDriven Server ZIP filename. Do not assume the example filename below is current.
- Download the file. Replace
MDrivenServerCoreLinux_20260721.zipwith the filename you selected:
wget https://downloads.mdriven.net/releases/MDrivenServerCoreLinux_20260721.zip
- Create the installation directory:
cd /var/www/html
sudo mkdir mdrivenserver
- Return to the directory containing the downloaded ZIP, then extract it:
cd
sudo unzip MDrivenServerCoreLinux_20260721.zip -d /var/www/html/mdrivenserver
The service configured below expects the extracted application DLL at /var/www/html/mdrivenserver/AppCompleteGenericCore.dll.
Download and extract MDriven Turnkey
- Open MDriven Downloads and identify the current Linux MDriven Turnkey ZIP filename.
- Download the file. Replace
MDrivenTurnkeyCoreLinux_20260721.zipwith the current filename:
wget https://downloads.mdriven.net/releases/MDrivenTurnkeyCoreLinux_20260721.zip
- Create the installation directory:
cd /var/www/html
sudo mkdir mdriventurnkey
- Return to the directory containing the downloaded ZIP, then extract it:
cd
sudo unzip MDrivenTurnkeyCoreLinux_20260721.zip -d /var/www/html/mdriventurnkey
The service configured below expects the extracted application DLL at /var/www/html/mdriventurnkey/StreaminAppCoreWebApp.dll.
Create the systemd services
systemd is the Linux service manager. Creating these unit files lets you start the applications with systemctl and configure them to start after a reboot.
MDriven Server service
- Create the unit file:
sudo nano /etc/systemd/system/mdrivenserver.service
- Add the following content:
[Unit]
Description=MDriven Server Service
After=network.target
[Service]
WorkingDirectory=/var/www/html/mdrivenserver
ExecStart=/usr/bin/dotnet /var/www/html/mdrivenserver/AppCompleteGenericCore.dll -port=5010 -nohttps
Restart=always
KillSignal=SIGINT
SyslogIdentifier=mdriven-server
User=root
Environment=DOTNET_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target
MDriven Turnkey service
- Create the unit file:
sudo nano /etc/systemd/system/mdriventurnkey.service
- Add the following content:
[Unit]
Description=MDriven Turnkey Server Service
After=network.target
[Service]
WorkingDirectory=/var/www/html/mdriventurnkey
ExecStart=/usr/bin/dotnet /var/www/html/mdriventurnkey/StreaminAppCoreWebApp.dll -port=5011 -nohttps
Restart=always
KillSignal=SIGINT
SyslogIdentifier=turnkey-server
User=root
Environment=DOTNET_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target
Set the ownership and permissions described for both unit files:
sudo chmod 775 /etc/systemd/system/mdrivenserver.service
sudo chown root: /etc/systemd/system/mdrivenserver.service
sudo chmod 775 /etc/systemd/system/mdriventurnkey.service
sudo chown root: /etc/systemd/system/mdriventurnkey.service
These unit definitions run both services as root. Review this choice against your server-administration requirements before deploying to a shared or production server.
Connect Turnkey to MDriven Server
Turnkey uses MDrivenServerOverride.xml to connect to a running MDriven Server. The file is located at /var/www/html/mdriventurnkey/App_Data/MDrivenServerOverride.xml.
- Open the existing override file:
sudo nano /var/www/html/mdriventurnkey/App_Data/MDrivenServerOverride.xml
- Edit the existing MDriven Server address, user name, and password values so that they match the running MDriven Server configuration.
- When both services run on this Ubuntu server, set the MDriven Server address to:
http://localhost:5010
- When MDriven Server runs on a different host, use that host name or IP address and port 5010. Example:
http://MDRIVEN_SERVER_IP_OR_DOMAIN:5010
Do not replace the XML file with an undocumented structure. Preserve its existing elements and update the connection values it contains.
For MDriven Server administration and maintenance topics, see HowTos:Configure and Maintain MDriven Server.
Start and verify the services
- Reload systemd so it reads the new unit files:
sudo systemctl daemon-reload
- Start MDriven Server and Turnkey:
sudo systemctl start mdrivenserver.service
sudo systemctl start mdriventurnkey.service
- Check both service states:
sudo systemctl status mdrivenserver.service
sudo systemctl status mdriventurnkey.service
A successful start reports active (running) for each service.
Access the services in a browser:
| Service | Address |
|---|---|
| MDriven Server | http://your_domain_or_IP_address:5010
|
| MDriven Turnkey | http://your_domain_or_IP_address:5011
|
If you use UFW, allow inbound TCP traffic to these ports:
sudo ufw allow 5010/tcp
sudo ufw allow 5011/tcp
Enable both services to start automatically after reboot:
sudo systemctl enable mdrivenserver.service
sudo systemctl enable mdriventurnkey.service
Check logs and troubleshoot startup
Use tail -f to follow a log file while reproducing a problem. Stop following the file with Ctrl+C.
MDriven Server logs
sudo tail -f /var/www/html/mdrivenserver/Logs/MDrivenServerRollingDEBUG.txt
sudo tail -f /var/www/html/mdrivenserver/Logs/MDrivenServerLogRollingERRORS.txt
MDriven Turnkey logs
sudo tail -f /var/www/html/mdriventurnkey/Logs/TurnkeyServerRollingDEBUG.txt
If Turnkey does not connect, confirm all of the following:
mdrivenserver.serviceis active and listening on port 5010.- The address in
MDrivenServerOverride.xmlishttp://localhost:5010when both services run on the same host. - The user name and password in the override file match the MDriven Server settings.
- You restarted Turnkey after changing its override file:
sudo systemctl restart mdriventurnkey.service
sudo systemctl status mdriventurnkey.service
