This guide installs MDriven Server and MDriven Turnkey on a Linux server as systemd services, on local ports 5010 and 5011. The examples use Ubuntu 24.04; other distributions work the same way. To make them available on the standard web ports with https, put Nginx or Apache in front of them afterwards. Background: How MDriven Core runs.
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 release ZIP files for MDriven Server and MDriven Turnkey from MDriven Downloads, for your kind of Linux – see below.
You do not need to install .NET: the Linux downloads are self-contained programs with the .NET runtime included.
Which download
| Server | Download | File names |
|---|---|---|
| x64, glibc-based distribution (Ubuntu, Debian, Red Hat, …) | Linux | MDrivenServerCoreLinux_<date>.zip, MDrivenTurnkeyCoreLinux_<date>.zip
|
| ARM 64-bit (ARM servers, Raspberry Pi 4/5 with a 64-bit OS) | Linux Arm64 | MDrivenServerCoreLinuxArm64_<date>.zip, MDrivenTurnkeyCoreLinuxArm64_<date>.zip
|
| x64, musl-based distribution such as Alpine (common in containers) | Linux MUSL | MDrivenServerCoreLinuxMUSL_<date>.zip, MDrivenTurnkeyCoreLinuxMUSL_<date>.zip
|
The steps are the same for all three; use the file names of your download. You can also find the newest file with the download API (platform linux, linux%20arm64 or linux%20musl).
For a container-based installation instead, use Documentation:Running MDriven Locally with Docker. For macOS, see native 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 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
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
Make the program executable:
sudo chmod +x /var/www/html/mdrivenserver/AppCompleteGenericCore
The service configured below starts /var/www/html/mdrivenserver/AppCompleteGenericCore.
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
Make the program executable:
sudo chmod +x /var/www/html/mdriventurnkey/StreaminAppCoreWebApp
The service configured below starts /var/www/html/mdriventurnkey/StreaminAppCoreWebApp.
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=/var/www/html/mdrivenserver/AppCompleteGenericCore -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=/var/www/html/mdriventurnkey/StreaminAppCoreWebApp -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 App_Data/MDrivenServerOverride.xml to find MDriven Server – see MDrivenServerOverride. The zip contains an example, MDrivenServerOverride - NotInEffect.xml; create the real file next to it:
- Create the file:
sudo nano /var/www/html/mdriventurnkey/App_Data/MDrivenServerOverride.xml
- Add this content, with the password of the MDriven Server user a (the account Turnkey uses):
<?xml version="1.0" encoding="utf-8"?>
<root>
<MDrivenServerOverride MDrivenServerPWD="the password of user a">http://localhost:5010/</MDrivenServerOverride>
</root>
- When both services run on this server, the MDriven Server address is:
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
For MDriven Server administration and maintenance topics, see MDriven Server documentation.
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
sudo tail -f /var/www/html/mdriventurnkey/logs/TurnkeyServerLogRollingERRORS.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 password in the override file matches the password of user a in MDriven Server.
- The service's own output:
journalctl -u mdriventurnkey.service -f - You restarted Turnkey after changing its override file:
sudo systemctl restart mdriventurnkey.service
sudo systemctl status mdriventurnkey.service
