There are plenty of articles and documentation out there on installing a MID Server on Windows and Linux, but finding instructions for setting up a MID Server on a Mac is a different story! Having a few Mac users on the team, we decided it would be useful to figure out how to get a MID Server up and running on MacOS. Here are the steps we took to get there.
Installing 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 it’s installed on your machine, unzip the folder. For the sake of simplicity, we will call that downloaded MID Server folder “mid_server_folder” in this article. In reality, it will be named after the version of the MID Server you downloaded.
Next, you’ll need to install the appropriate JDK. We used Amazon Corretto 17 for this.
Make a new folder inside of mid_server_folder/agent/ called “amazon-corretto-17.jdk”. Unzip and open the JDK download and then move everything from Contents/Home/ into mid_server_folder/agent/amazon-corretto-17.jdk/.
To prevent Apple’s security settings from blocking the JDK from running, open your terminal,
cd to mid_server_folder/agent/ and run
sudo xattr -dr com.apple.quarantine .. Alternatively, when you run the 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
In your editor of choice, open mid_server_folder/agent/conf/wrapper-override.conf. In the “External JRE” section, add the following:
If using a machine with Apple Silicon arm64, update mid_server_folder/agent/wrapper-jvm.conf from
If you didn’t set up a MID Server user in your instance prior to this point, please refer to the following documentation on creating a MID Server user: https://docs.servicenow.com/bundle/vancouver-servicenow-platform/page/product/mid-server/task/t_SetupMIDServerRole.html.
After you have a MID Server user created, update mid_server_folder/agent/config.xml with your instance name, MID Server user’s username and password, and a name for your MID Server. You can set other parameters in this file as well, but we’ll just be setting the required parameters in this example.
Running the MID Server
Time to start the MID Server! Open your terminal and
cd over to your MID Server folder. From there, run
sudo agent/bin/mid.sh console.
Note: This is when you might need to go to your Mac settings to allow the JDK to run if you didn’t run the xattr command mentioned earlier.
Once the MID Server is running in your console, go back to your instance and navigate to MID Server > Servers. You should see your MID Server in the list.
Congrats! You now have a MID Server up and running on MacOS!