Local Server

Local Server, an optional component of ArcGIS Runtime SDK for Qt, is primarily for executing offline geoprocessing tasks in your ArcGIS Runtime apps. These tasks work in the same way as geoprocessing tasks published from ArcGIS Online or ArcGIS Enterprise. Running a geoprocessing task on Local Server requires a geoprocessing package (.gpk file). These packages are authored in ArcGIS Desktop either using Model Builder or by writing a Python script.

Local Server also allows developers to consume map image layers or feature layers that use local content in a map package (.mpk file). These packages are authored and created using ArcGIS Desktop. This capability has been included to support workflows in earlier versions of ArcGIS Runtime. If you're starting a new project and require offline data, use sync-enabled geodatabases, which are generated from feature services. See Create an offline map for details.

Local Server can be downloaded for Windows (32- and 64-bit) and Linux platforms (64-bit). Local Server is not supported with the QML API, and not on macOS, Android or iOS.

To develop with Local Server, you must set up your development environment's access to it. To deploy your app with Local Server capabilities, you must set up your app's access to the Local Server.

Before you use Local Server capabilities, you must start the Local Server instance.

Installing the Local Server SDK

Install Local Server on Windows

  1. Make sure your development machine meets the systems requirements for ArcGIS Runtime Local Server SDK Qt. Development and deployment machines must also have the following packages installed:
    • Microsoft Visual C++ 2008 Redistributable Package (x86 or x64 to match your platform)
    • Microsoft Visual C++ 2010 Redistributable Package (x86 or x64 to match your platform)
    • Microsoft Visual C++ 2012 Redistributable Package (x86 or x64 to match your platform)
    • Microsoft Visual C++ 2013 Redistributable Package (x86 or x64 to match your platform)
  2. Download Local Server by clicking the button in this step or from the Downloads page. You'll need to log in with an ArcGIS developer account. Sign up for a free account if you haven't already. Save the file to a location on your development machine.

    Download for Windows

  3. Extract the file you downloaded, and then double-click the Setup.exe file to start the installation wizard.
  4. Follow the instructions. In the Destination Folder dialog, you can change the default installation directory by clicking the Change button, then navigating to the desired folder. Make sure you have write permissions to this folder on your development machine. Ensure no other users are using the folder.
  5. On the last panel of the wizard, click Finish. The ArcGIS Runtime Local Server is now installed at the installation folder you chose in the previous step.

Install Local Server on Linux

  1. Make sure your development machine meets the systems requirements for ArcGIS Runtime Local Server SDK Qt.
  2. Download Local Server by clicking the button in this step or from the Downloads page. You'll need to log in with an ArcGIS developer account. Sign up for a free account if you haven't already. Save the file to a location on your development machine.

    Download for Linux

  3. Unzip the ArcGIS Runtime gzip file to get the tar file. At the prompt, type gunzip .tar.gz.
  4. Extract the product .tar file to create the installation directory: tar xvf .tar.
  5. Run the script ./Setup from the extraction location.
    Caution:

    Do not double-click on the file in the file browser and select Run in Terminal, or the post-installer will start and then exit as soon as the terminal window closes.

  6. Follow the instructions. In the Choose Install Folder dialog, you can change the default installation directory by clicking the Choose button, and then navigating to the desired directory. Make sure this directory is on your development machine and that you have write permissions to this directory. Ensure no other users are using the directory.
  7. On the last panel of the wizard, click Done. Local Server is now installed in the installation directory you chose in the previous step.
  8. If you are using an Enterprise Geodatabase connection which uses ODBC (SDE connection to netezza for example) you will need to modify init_user_params.sh to uncomment the following line:
    #
    # Enable this section to point to the native ODBC driver.  Note the path
    # may be different on your system. 
    #
    #export LIB_ODBC_DRIVER_MANAGER=/usr/lib64/libodbc.so.2
    The exact path may differ depending on your installation, and you may need to install the unixODBC-utf16-2.3.1-1.x86_64 or later library.
Note:

If you see 'Fontconfig error: Cannot load default config file' on the console, Local Server cannot find fonts on your machine. Set the FONTCONFIG_PATHenvironment variable either in /etc/profile or explicitly—for example, export FONTCONFIG_PATH=/etc/fonts.

Installing database client software for Enterprise Geodatabase connections

If any of your Local Server packages make use of Enterprise Geodatabase connections (SDE), then you may need to install the client software for the database you are connecting to. The section on Database connections gives details on the configuration of database client software.

Set up your app's Local Server directory

As a developer, when you have installed the Local Server SDK, your applications that use Local Server will work because they'll use the installation directories.

However when you deploy your application, you need to make the Local Server binaries available to your application in one of the following ways. The Local Server binaries for 32-bit platforms are in the 32 directory, and 64-bit binaries are in the 64 directory.

  • If you have not done so already, create a Local Sever deployment.
  • Copy the Local Server directory so that it is adjacent to your application executable file (so that the 32 or 64 folder is at the same level as your app's executable file).
  • Set your own custom location for the Local Server directory using the setInstallPath("c:/myLocalServerInstall") method and be sure to install the Local Server folder there as part of the app install.

Start a Local Server instance

You must start a Local Server instance if you want your app to use any services on the Local Server. Only one instance of the Local Server can be running at any time.

  1. Prior to requesting Local Server to start, it's good practice to check that your application can access the Local Server installation path.
  2. Once you have a valid Local Server directory, start the process.
  3. Once the Local Server has started, you can start services (such as geoprocessing services, for example) as described in the following sections.
  4. When an application is closed down, the Local Server should also be shut down by calling LocalServer::stop.

Run geoprocessing services

Geoprocessing services can be used from Local Server with a geoprocessing package file (.gpk file). The geoprocessing packages are authored and published from ArcMap. For more information about geoprocessing, see Run a geoprocessing task.

A local geoprocessing service can be started provided that the Local Server is started.

Run map image layer services

Map services can be consumed from Local Server using a map package file. Provided that the Local Server is started, you can start a service. Once the service is started, the URL is obtained and used to add an ArcGISMapImageLayer to your map.

ArcGISMapImageLayer from a local map service

Run feature services

Feature services can also be consumed from a Local Server instance. As with map services, these services use a map package file (.mpk) that has been authored and published from ArcGIS Desktop.