Skip to main content
Version: Graph 2.2.0

Install Aerospike Graph Service


This page describes how to install Aerospike Graph Service (AGS) in a Docker container for use with an Aerospike database.


  • A running Aerospike Database instance, version or later. You can use an existing instance, or start one in a Docker container. See Install with Docker to set up an Aerospike Database instance with Docker.

  • Have the accessible network address of your database instance handy.

  • An Aerospike feature key file which has the graph-service key enabled. Click here to sign up for an Aerospike Graph trial, or contact your Aerospike account manager.


    Verify the IP address of your Aerospike server. If you are running Aerospike in a Docker container, get the IP address with the following command:

    docker inspect -f  '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' AEROSPIKE-CONTAINER-ID

    Replace AEROSPIKE-CONTAINER-ID with the Docker container ID of your Aerospike container.

Run AGS with Docker

  1. Download the AGS Docker image. Docker is a containerization service.

    Pull from Docker:

    docker pull aerospike/aerospike-graph-service


    Pull from the Google Container Registry:

    docker pull
  2. Run the AGS Docker container.

    docker run -p8182:8182 -e [OPTIONS] aerospike/aerospike-graph-service

    The options you pass to your Docker command specify how AGS will connect to your Aerospike database and what kind of indexes to create. For a complete list of available options, see Configuration Options.

    You can either specify configuration options with a configuration file (recommended) or with environment variables via Docker command-line arguments.

    In the following example, the AGS Docker image runs with these configuration options:

    aerospike.client.namespace: test aerospike-devel-cluster-host1:3000, aerospike-devel-cluster-host2:3000 property1, property2
    aerospike.graph.index.vertex.label.enabled: true
    docker run -p8182:8182 -e aerospike.client.namespace="test" \
    -e"aerospike-devel-cluster-host1:3000, aerospike-devel-cluster-host2:3000" \
    -e,property2 \
    -e aerospike.graph.index.vertex.label.enabled=true \

    Java options

    Aerospike Graph is constrained by the amount of memory available to the Java Virtual Machine (JVM) in its Docker container, which is 80% of memory available to the Docker container by default. You can set the amount of memory available to the JVM by setting the aerospike.graph-service.heap.max and aerospike.graph-service.heap.min configuration options.

    In the example below, the Docker container's JVM can use up to 32GB of memory:

    docker run -p 8182:8182 \
    -e aerospike.graph-service.heap.max="32768m" \
    -e"" \

    To use other Java options, set the JAVA_OPTIONS Docker environment variable with the -e command line argument. For example, to set the option:

    -e JAVA_OPTIONS=""

    The leading space before the Java option is required.

    Configuration file options

    It is also possible to run the AGS Docker image with a configuration file. To use a configuration file, create a file named, store it locally, and reference it when you start the AGS Docker image.

    The following properties file uses options equivalent to those in the above Docker command:, aerospike-devel-cluster-host2:3000

    To use a configuration file when running the AGS Docker image, use the -v flag to create a volume bind. In the following example, the full path to the configuration file is /home/graph-user/graph/conf/ The filepath after the :, /opt/aerospike-graph/, is the correponding configuration file in the AGS Docker container.

    docker run -p 8182:8182 \
    -v /home/graph-user/graph/conf/ \

    Docker output

    The AGS Docker container runs a Gremlin server instance, so you will see some Gremlin server initialization messages after the container starts. The messages look similar to the following:

    Server config:

    [INFO] o.a.t.g.s.GremlinServer - 3.6.3
    (o o)

    [INFO] o.a.t.g.s.GremlinServer - Configuring Gremlin Server from /opt/aerospike-graph/conf/docker-default/aerospike-gremlin-server.yaml
    [INFO] o.a.t.g.s.u.MetricManager - Configured Metrics ConsoleReporter configured with report interval=180000ms
    [INFO] o.a.t.g.s.GremlinServer$1 - Channel started at port 8182.

If you've successfully completed these steps, you're ready to start using Aerospike Graph. See Using Aerospike Graph for help with getting started on interacting with your graph data.