The problem MID Server solves
ServiceNow is cloud-hosted. Your on-premises systems — internal databases, file servers, SNMP-managed network devices, internal REST APIs behind a firewall — are not reachable from the internet. Without a bridge, ServiceNow cannot discover, monitor, or integrate with them. MID Server is that bridge.
How MID Server works
MID Server is a Java application you install on a server inside your network. On startup, it initiates an outbound HTTPS connection to ServiceNow. ServiceNow sends work items down that connection — scan this IP range, call this internal API, run this script. MID Server executes the work and sends results back up through the same connection.
The key architectural point: no inbound firewall ports needed on your corporate network. MID Server only makes outbound connections on port 443 (HTTPS). Your firewall needs to allow outbound traffic to ServiceNow's cloud IP ranges — that is all.
When you need a MID Server
- Discovery — scanning your network to populate the CMDB. MID Server needs line-of-sight to the devices being scanned. See the Discovery guide.
- Integrations with internal APIs — calling a REST API that lives behind your corporate firewall from a Flow Designer flow or RESTMessageV2 script
- JDBC integrations — connecting to on-premises databases (SQL Server, Oracle, MySQL, PostgreSQL)
- Orchestration against internal systems — running scripts or PowerShell against internal servers
- SNMP polling — monitoring network devices that only respond to internal network traffic
When you do NOT need a MID Server
- Calling public REST APIs accessible from the internet
- ServiceNow-to-ServiceNow integrations
- Webhook receivers (inbound to ServiceNow)
- Any system accessible directly from ServiceNow's cloud IP ranges
MID Server installation
- Navigate to MID Server > Download in your ServiceNow instance
- Download the installer for your operating system (Windows or Linux)
- Install on a server inside your network with outbound HTTPS access to ServiceNow
- Configure the MID Server config.xml with your instance URL and credentials
- Start the MID Server service — it connects and appears in ServiceNow within minutes
Capacity planning
One MID Server can typically handle moderate Discovery and integration load. For large enterprises, use MID Server clusters — multiple MID Servers in a pool — for redundancy and load distribution. If one MID Server goes down, the cluster continues processing. Configure affinity rules if specific integrations should always use specific MID Servers.
Using MID Server in Flow Designer
When adding a REST step in Flow Designer, the Connection configuration includes a MID Server field. Select the MID Server to route the call through — Flow Designer then proxies the REST call through the MID Server to the internal endpoint. No scripting required.
Related: Discovery guide · RESTMessageV2 · IntegrationHub spokes · Credential Aliases
MID Server architecture — how it actually works
The MID Server is a Java application that runs inside your network, establishes an outbound HTTPS connection to your ServiceNow instance, and waits for work. ServiceNow never initiates a connection into your network — the MID Server calls out. This means no inbound firewall holes are needed, which is why MID Servers can reach internal systems (databases, APIs, file shares) that are not accessible from the public internet.
Work is delivered to the MID Server as ECC Queue records. ServiceNow writes a message to the ECC Queue, the MID Server picks it up, executes the work (a Discovery probe, a REST call to an internal API, a file retrieval), and writes the result back to the ECC Queue. ServiceNow reads the result record. The entire communication path is outbound from the MID Server's perspective.
MID Server installation checklist
- Java 11 or later installed on the host (Windows Server or Linux)
- Outbound HTTPS access to your ServiceNow instance URL on port 443
- A dedicated MID Server service account in ServiceNow with the mid_server role
- Network access from the MID Server host to the internal systems it will probe (port 22 for Linux SSH, port 135/445 for Windows WMI, SNMP ports for network devices)
- Sufficient RAM — minimum 2GB dedicated to the MID Server JVM, 4GB+ recommended for production Discovery
MID Server for outbound REST integrations
Any RESTMessageV2 call can be routed through a MID Server by setting the ECC Target field on the REST Message record to the MID Server name. This is the correct pattern for calling internal APIs — an HR system, a billing platform, an internal database API — that are not accessible from ServiceNow's cloud infrastructure. The flow: ServiceNow creates an ECC Queue record with the REST call details, the MID Server picks it up, executes the HTTP call to the internal system, and returns the response via the ECC Queue.
Related: RESTMessageV2 · Discovery · CMDB · Credential Aliases · HTTP status codes
MID Server high availability
For production Discovery and integrations that cannot afford MID Server downtime, deploy at least two MID Servers in a cluster. ServiceNow distributes work across available MID Servers in the same cluster automatically. If one goes down, the other picks up the work. Cluster configuration is done by assigning both MID Servers to the same MID Server Cluster record in ServiceNow. For Discovery specifically, you can also designate MID Servers for specific IP ranges or network segments — useful when your network has multiple segments that are only accessible from specific vantage points.
MID Server upgrades and maintenance
ServiceNow upgrades MID Servers automatically to stay within one or two major versions of the instance release. The MID Server auto-upgrade runs during the ServiceNow instance upgrade window. To prevent automatic upgrades (for testing or controlled rollout), set the mid.auto_upgrade_all property to false on the instance. After any ServiceNow instance upgrade, verify MID Server status in Discovery > MID Servers — look for the "Up" status and confirm the version is current. A MID Server that fell behind on upgrades may be unable to communicate with a newly upgraded instance.
Troubleshooting MID Server connectivity
The most common MID Server issues: the MID Server process is stopped (check the Windows Service or Linux daemon status), the ServiceNow credentials are expired or locked (the MID Server service account password changed), or a firewall rule was updated and blocked outbound HTTPS. Navigate to Discovery > MID Servers on your instance to see the last contact time — if it is more than a few minutes old, the MID Server is not checking in. Review the MID Server's wrapper.log file (in the agent/logs directory) for connection errors. Firewall issues show as connection refused or timeout errors in the log.
MID Server capacity planning
The right number of MID Servers depends on your Discovery scope and integration volume. For Discovery: each MID Server can typically probe 500–2,000 devices per hour depending on probe type and network latency. For integration: each concurrent integration job consuming the MID Server counts against its thread pool. Start with the minimum (two for HA), monitor the ECC Queue depth and MID Server CPU/memory during peak Discovery windows, and add capacity if queues are backing up or CPU is sustained above 80%. ServiceNow's sizing guidance (available in the product documentation) provides more specific recommendations based on your Discovery scope and infrastructure size.