A couple of years ago we posted a generic article about installing a MID Server on a Mac computer for testing and development purposes. Since the MID Server libraries continue to change with each new release, we thought we would build out a Zurich-specific version to speed up the installation of a Zurch MID Server for ServiceNow on the Mac. Please note that we will focus on the Apple-Silicone version of Macs.
Downloading the MID Server
In your ServiceNow instance, go to MID Server > Downloads. Click the “Download MID Server as a ZIP archive” checkbox and then choose the “Linux (ZIP)” download.

Once you have downloaded the ZIP file, go ahead and unzip it into your target MID Server directory. For me, it is going to be in a directory called “mid”.
Java Run Time Installation
First, create a subdirectory in the ./mid/agent/ directory for your mid server. I named mine: jreCorretto17. We will put the JDK files into this directory once we download them.
Next, you’ll need to download and extract the appropriate JDK. We used Amazon Corretto 17 for this.
Unzip the download and copy the contents of the ./Contents/Home/ from the Java zip file to a subdirectory into MID Server directory we created: ./mid/agent/jreCorretto17.

To prevent Apple’s security settings from blocking the JDK from running, open your terminal, cd
to mid/agent/ and run sudo xattr -dr com.apple.quarantine .
. Alternatively, when you run the mid server, you can go into the security settings of your Mac (Settings > Privacy & Security > Security) and allow the JDK to run from there.
Configuring the MID Server Files
Java Configuration Portion
In your editor of choice, open mid/agent/conf/wrapper-override.conf. In the “External JRE” section, add the following:
wrapper.java.command=jreCorretto17/bin/java
wrapper.java.additional.148=-Djdk.lang.Process.launchMechanism=posix_spawn


If using a machine with Apple Silicon, update mid/agent/wrapper-jvm.conf from set.SN_JVM_ARCH=x86-64
to set.SNC_JVM_ARCH=arm-64
.

Installing the Tanuki Java Service Wrapper
Download the Tanuki Java Service Wrapper version 3.5.57 for Apple Silicon arm-64 tar zip file here: https://download.tanukisoftware.com/wrapper/3.5.57/wrapper-macosx-arm-64-3.5.57.tar.gz.
Extract the contents of that ZIP file to a handy location. We are going to grab various files from it. For this exercise, let’s assume the folder name is “./tanuki“.
Service Wrapper Binary
Rename the wrapper file ./tanuki/bin/wrapper to ./tanuki/bin/wrapper-macosx-arm-64
Next copy the newly renamed wrapper file to MID Server’s ./mid/agent/bin/ directory

Service Wrapper Library
Rename the wrapper library file ./tanuki/lib/libwrapper.dylib to ./tanuki/lib/libwrapper-macosx-arm-64.dylib.
Then, copy that file into the MID Server’s ./mid/agent/lib/ directory.

Create a User for the MID Server
For proper visibility and security, it is best if you create a service account in the instance specifically for the MID Server. Once you do that, give it the roles that you anticipate it needing. Then edit the ./mid/agent/config.xml file to finish configure your MID Server with your instance and user information.
Please see the ServiceNow documentation for configuring Users with the MID Server.
Setting up MID Server Connection
Navigate to the ./mid/agent/config.xml file and open it in your favorite text editor. For the most basic installation, modify the following three elements in the XML file:
Instance URL
Modify element <parameter name=”url” value=”https://YOUR_INSTANCE.service-now.com” /> element and change the default URl with value of the URL to your instance.
Credentials
Enter the MID user credentials that you created for the MID Server service account in the mid.instance.username and mid.instance.password parameters.
MID Server Name
Find the element, <parameter name=”name” value=”YOUR_MIDSERVER_NAME_GOES_HERE” /> and change the value for the MID Server name with whatever you want this MID Server’s name to be displayed as in the ServiceNow instance.
Start the MID Server
To start the MID Server, open a terminal window and navigate to ./mid/agent/. Then execute ./start.sh
.
Checking on the MID Server
The MID server will first generate a file ./mid/agent/logs/wrapper.log. This will contain the logging information for launching the java wrapper for the MID Server.
Once the wrapper is done loading, a new log file ./mid/agent/logs/agent.log.0 will be generated and will contain log statements for the rest of the launching sequence, initialization, and real-time execution.