ServiceNow
MID Server Architecture and Tuning
Guide
Author:
Eric Metten together with Copilot
1. Choice of operating system: Linux vs. Windows
Differences between Linux and Windows
Linux Windows
License Cost Open Source, free Licence required
Resource
Consumption
Lower Higher
Good, but often the target of
Security Very high, granularly configurable
malware
Automation Shell-Skripting, Cronjobs PowerShell, Task Scheduler
Installation Manually via command line GUI-Installer Available
ServiceNow
Support
Fully supported Fully supported
PowerShell
Discovery
Not Available Available
WMI Access Not Available Available
Active Directory
Discovery
Restricted or not possible Fully supported
SNMP, SSH, REST,
SOAP
Fully supported Fully supported
Generic integrations, network Windows-specific discovery, AD
Recommended
Usage
discovery, REST/SOAP, integration, PowerShell-based
monitoring scripts
Conclusion: If no Windows-specific features are required, Linux is the preferred
platform for the MID Server – especially due to its stability, security, and low resource
consumption.
Source: ServiceNow Knowledge Base KB0755179 – MID Server OS Support Matrix
2. Minimum system requirements for the MID Server
Recommendation for
Component Minimum Requirement
Production Environments
CPU 2 Cores 4+ Cores
RAM 1024 MB 2048–4096 MB
5 GB or more (for logs,
Hard disc storage 1 GB free storage space
updates, etc.)
Oracle JDK or OpenJDK (compatible
Always use the latest,
Java version according to the ServiceNow
supported version
compatibility matrix)
Outbound access to ServiceNow Stable connection, if
Network access
instance and target systems necessary via proxy
Current LTS versions
Operating system Windows Server or Linux (64-bit)
recommended
System requirements for the MID server
Additional Requirements Depending on Function
Function Additional Requirements
Windows Discovery Windows OS, PowerShell, WMI-Access
SNMP Discovery Access to SNMP ports (UDP 161/162)
REST/SOAP Integrationen Internet access or access to internal APIs
Credential Management Access to credential store in ServiceNow
Proxy usage Configuration of config.xml or environment variables
3. RAM extension via wrapper-override.conf
By default, the MID Server is limited to 1024 MB RAM. To increase this value, the
wrapper-override.conf file must be modified.
File Paths
• Linux:
/opt/servicenow/mid/agent/conf/wrapper-override.conf
• Windows:
C:\ServiceNow\<MID-Name>\agent\conf\wrapper-override.conf
Example Configuration
wrapper.java.initmemory=2048
wrapper.java.maxmemory=2048
A restart of the MID Server is required after making changes.
Documentation: Set the MID Server JVM memory size
4. Trigger REKEY and validation manually
Background
Normally, REKEY (re-encryption) and Validation (connectivity test) are triggered via
the 'Related Links' in the MID Server configuration in ServiceNow. If these are not
available, they can be initiated manually.
Procedure
• Open file:
• Path: agent/config.xml
• Clear the following values:
<parameter name="mid_sys_id" value=""/>
<parameter name="keypairs.mid_id" value=""/>
• Restart the MID Server
Upon the next startup, a new validation and possible a REKEY will be performed
automatically.
5. Communication channel and security
One-Way Communication
The MID Server communicates exclusively outbound to the ServiceNow cloud. The
cloud never initiates a connection to the MID Server.
Why is this important?
1. Firewall-friendly: No inbound ports required
2. Security advantage: No external attack vector
3. Central control: Only authorized connections from the internal network
Encryption
1. Communication is via HTTPS (TLS 1.2 or higher)
2. Certificate validation and authentication via key pairs
3. Optional: Proxy server or additional certificate validation
6. New with Yokohama: OAuth2 for local endpoints
Since the Yokohama release, the MID Server supports OAuth2 authentication for local
endpoints within the internal network.
Benefits
1. Secure authentication with REST or SOAP APIs
2. Central management of OAuth credentials in ServiceNow
3. No storage of credentials in plain text on the MID Server
Nice to Know
1. OAuth Grant Types: Explained
2. How to generate bearer token for oAuth 2.0 - Authorization Grant type