Skip To Content

Publish Routing Services utility

The Publish Routing Services utility allows you to publish directions, routing, and logistics services based on a network dataset to your ArcGIS Server. These services can be used to perform route, closest facility, service area, location-allocation, origin destination cost matrix, or vehicle routing problem analyses on transportation networks. If your ArcGIS Server is federated with a portal, the services are configured as utility services with your portal. Once published, the services can be used with ArcGIS Desktop applications such as ArcGIS Pro and ArcMap, or in the Map Viewer application available with ArcGIS Enterprise portal to get directions and perform analysis. The services are similar to directions and routing services available with ArcGIS Online, but are based on your own network dataset and running in your ArcGIS Enterprise.


To use this utility, your ArcGIS Server site needs to have an ArcGIS Network Analyst extension license.

Data requirements

You can use this utility with a network dataset that is available as part of StreetMap Premium for ArcGIS or with your own network dataset. Before running the utility, the network dataset should be copied (in the same directory path) to all the machines participating in your GIS Server site.


While you can keep the network dataset in a shared location that is accessible to all of the machines in your GIS Server site, it is recommended to copy the network dataset locally on each machine for best performance when running the services.

If your StreetMap Premium data is licensed, you need to install the appropriate data license on each machine before running this utility. Follow the instructions for installing the data license on Linux or Windows.

The utility supports network datasets from StreetMap Premium for ArcGIS 2015 Release 1 or later.


Older versions of Streetmap Premium network datasets (including the network datasets in SDC format) are not supported.

If you are using your own network dataset, it must satisfy the following conditions:

  • Has at least one time-based and one distance-based cost attribute
  • Defines at least one travel mode
  • Stored in a file geodatabase
  • Supports directions


Once you have correctly set up the network dataset on your GIS Server site, you can run the Publish Routing Services utility using the following parameters.



User name for a user with publisher or administrative privileges in the ArcGIS Server site. If the site is federated with a portal, the user must be a portal user and can have administrative privilege or a publisher privilege that allows publishing web tools and publishing server-based layers. If the site is not federated, the user must have administrative privileges. If your site is configured with web-tier authentication, specify a built-in user, such as the primary site administrator account or the initial administrator account in your portal.


The password of the user who was specified with the -u parameter.


The fully qualified domain name of the machine running ArcGIS Server, such as, or the local URL to your ArcGIS Server site in the format


The fully qualified domain name of the machine, such as, where Portal, to which your ArcGIS Server site federates with, is installed. The value can also be a local URL to the portal in the format A value for this option is required only if the ArcGIS Server that will host the routing services is federated with the portal.


The full path to the network dataset. Along with the path to the file geodatabase, the path should also include the name of the network dataset and the name of the feature dataset containing the network dataset. For example, a value for this option can be c:\data\Streets.gdb\Routing\Routing_ND on Windows and /data/Streets.gdb/Routing/Routing_ND on Linux where Streets.gdb is the file geodatabase that has a network dataset named Routing_ND in a feature dataset named Routing.


Path to a folder where the utility will create the service definition files for the services and a log file named publishroutingservices.log that includes the details about the execution as well as any errors that might be encountered.


Prints help for the utility.


The following examples show how to call the Publish Routing Services utility on an ArcGIS Server site that is federated with a portal.

Publish routing services on ArcGIS Server (Windows).

C:\Python27\ArcGISx6410.6\python.exe "C:\Program Files\ArcGIS\Server\tools\PublishRoutingServices\" -s -P -u admin -p site.admin -o D:\RoutingServices\ServiceDefinitions -n D:\data\Streets.gdb\Routing\Routing_ND

Publish routing services on ArcGIS Server (Linux). The example assumes that the ArcGIS Server installation location is /arcgis/server.


Unlike on Windows, you do not have to specify the Python installation location when running the utility on Linux.

/arcgis/server/tools/publishroutingservices/publishroutingservices -s -P -o /data/routing-services/service-definitions -n /data/Streets.gdb/Routing/Routing_ND