Integrations

Configure a MID Server

MID Servers create the bridge between ServiceNow and your on-premise infrastructure, enabling Discovery, LDAP integration, and custom API calls that can't reach across your firewall. This guide gets you from downloaded installer to validated connection.

Why MID Servers exist

Before MID Servers, ServiceNow couldn't reach anything behind your firewall — no network discovery, no on-premise LDAP authentication, no custom integrations with internal APIs. Your platform admins had to choose between exposing internal systems to the internet (security nightmare) or living without key integrations. The MID Server solves this by establishing an outbound connection from your network to ServiceNow — your firewall doesn't need inbound rules, and ServiceNow can proxy requests through the MID Server to reach internal resources.

How MID Servers work

A MID Server is Java software that runs on a Windows or Linux host in your network. It polls ServiceNow every few seconds asking 'got any work for me?' — when ServiceNow needs to scan a server or query LDAP, it queues the work and the MID Server picks it up, executes it locally, then sends results back. The config.xml file contains the connection details (your instance URL, credentials, proxy settings). Multiple MID Servers can share workload, and you can assign specific servers to specific tasks using capability tags.

Production improvements and maintenance

Once your basic MID Server connects, production improvements include: setting up a second MID Server for redundancy, configuring capability words to assign specific work to specific servers, setting up proper service account permissions instead of using overprivileged accounts, and monitoring MID Server logs for connection issues. Regular maintenance means keeping the Java runtime updated, monitoring disk space in the logs directory, and cycling service account passwords according to your security policy.

Before you start

  • mid_server role or admin role in ServiceNow
  • Windows or Linux server with network access to target systems
  • Service account with appropriate OS privileges on the MID Server host
  • Outbound HTTPS access to your ServiceNow instance (port 443)
Sourdough
Chrome Extension

Sourdough: ServiceNow Monitoring and Analytics

A Chrome extension for ServiceNow Admins and Developers with essential tools, analytics, graphs and monitoring features.

Instance HealthGraphs & ChartsAPI HealthDeveloper ToolsQuick SearchInstance Switcher
Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Step by step

1

Download the MID Server installer

Navigate to Discovery > MID Servers and click Download MID Server. Choose the appropriate installer for your OS. The installer includes the Java runtime — don't use your system's Java installation. Extract the downloaded archive to your chosen directory (commonly C:\ServiceNow\MID_Server on Windows or /opt/servicenow/mid on Linux).

TIP

Use a path without spaces to avoid Java classpath issues later.

2

Create the ServiceNow user account

In ServiceNow, navigate to User Administration > Users and create a new user for the MID Server. Assign the mid_server role. Set a strong password and note the username — you'll need both for config.xml. This account will authenticate all MID Server communications with your instance.

TIP

Use a descriptive name like 'midserver.prod' to distinguish it from other integration accounts.

3

Configure the service account

On your MID Server host, create a dedicated service account with 'Log on as a service' rights (Windows) or appropriate sudo privileges (Linux). This account needs read access to systems you'll discover and write access to the MID Server installation directory. Avoid using highly privileged accounts — grant only the minimum permissions needed for your integration requirements.

4

Edit the config.xml file

In the MID Server installation directory, open config.xml in a text editor. Set the url parameter to your full ServiceNow instance URL (https://yourinstance.service-now.com). Set mid.instance.username to your MID Server user account name. Set mid.instance.password to the password. Change name to a unique identifier for this MID Server. Save the file.

TIP

The name parameter becomes the MID Server's display name in ServiceNow — make it descriptive like 'PROD-MID-01'.

5

Start the MID Server service

Run the start script as your service account (start_mid.bat on Windows, start_mid.sh on Linux). The MID Server will connect to ServiceNow and begin logging to the logs directory. Watch the wrapper.log file for startup messages — you should see successful authentication and registration within 30 seconds.

TIP

If authentication fails, check that your ServiceNow user account hasn't been locked due to failed login attempts.

6

Validate the connection

In ServiceNow, navigate to Discovery > MID Servers. Your MID Server should appear with Status = Up and a recent Last Refreshed timestamp. Click on the MID Server name to view details. The Validated field should show true, and you should see a green status indicator.

TIP

If Status shows 'Down', check the MID Server logs for connection errors — usually it's a proxy configuration or DNS resolution issue.

7

Install as a system service

Stop the MID Server and run the service installation script (install_service.bat on Windows, or create a systemd unit file on Linux). Configure the service to run as your dedicated service account. Start the service and verify it connects automatically. This ensures the MID Server restarts after system reboots.

TIP

Test the service installation by rebooting the host — the MID Server should come online automatically within a few minutes.

Best practices

  • Never run MID Server as root or Administrator — create a dedicated service account with minimal required privileges to limit security exposure.

  • Set up at least two MID Servers for production environments — if one fails during Discovery, work automatically flows to the other.

  • Monitor the logs directory size — MID Servers generate substantial log files and can fill disk space if not managed with log rotation.

  • Use capability words to assign specific MID Servers to specific tasks rather than letting all work flow to any available server.

  • Keep MID Server credentials in a password manager and rotate them according to your security policy — they have broad access to your ServiceNow instance.

Test Your Knowledge

Quick 3-question quiz — see how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue