Skip to content

Configuration

All environment variables for configuring Graph Explorer, organized by concern.

These variables control server behavior, networking, and security. None of these variables are required. Defaults are listed below.

string default: /

Base path used to serve the graph-explorer front end application. Example: /explorer

string default: localhost

The public hostname of the server. Used to generate the self-signed SSL certificate at container startup. Required when using HTTPS connections without providing your own certificate files.

boolean default: true (Docker)

Uses the self-signed certificate to serve Graph Explorer over HTTPS if true. Only used in Docker via the entrypoint script.

number default: 443

The port to use for the HTTPS server.

number default: 80

The port to use for the HTTP server.

boolean default: true (Docker)

Uses the self-signed certificate to serve the proxy-server over HTTPS if true. Defaults to false in code, true in Docker via the entrypoint script.

string default: blocked

Restricts which origins are allowed to make cross-origin requests to the proxy server. When set, only requests from these exact origins will receive CORS headers. When not set, cross-origin requests are blocked. Each origin must include the scheme and must not have a trailing slash or path.

Example: https://my-app.example.com or https://app-a.example.com,https://app-b.example.com

"cloudwatch" | "default" default: default

Controls the log output format. cloudwatch omits timestamps and hostname/pid (provided by CloudWatch). default uses the standard log format.

string default: packages/graph-explorer

Override path for the folder containing .env and defaultConnection.json. When set, replaces the default path entirely.

To provide a default connection such that initial loads of Graph Explorer always result with the same starting connection, modify the docker run ... command to either take in a JSON configuration or runtime environment variables. If you provide both a JSON configuration and environmental variables, the JSON will be prioritized.

These are the valid variables used for the default connection:

  • Required:
    • PUBLIC_OR_PROXY_ENDPOINT - None
  • Optional
    • GRAPH_TYPE - None - If not specified, multiple connections will be created for every available query language.
    • USING_PROXY_SERVER - False
    • IAM - False
    • GRAPH_EXP_HTTPS_CONNECTION - True - Controls whether Graph Explorer uses SSL or not
    • PROXY_SERVER_HTTPS_CONNECTION - True - Controls whether the server uses SSL or not
    • GRAPH_EXP_FETCH_REQUEST_TIMEOUT - 240000 - Controls the timeout for the fetch request. Measured in milliseconds (i.e. 240000 is 240 seconds or 4 minutes).
    • GRAPH_EXP_NODE_EXPANSION_LIMIT - None - Controls the limit for node counts and expansion queries.
  • Conditionally Required:
    • Required if USING_PROXY_SERVER=True
      • GRAPH_CONNECTION_URL - None
    • Required if USING_PROXY_SERVER=True and IAM=True
      • AWS_REGION - None
      • SERVICE_TYPE - neptune-db, Set this as neptune-db for Neptune database or neptune-graph for Neptune Analytics.

Create a config.json file containing values for the connection attributes:

{
"PUBLIC_OR_PROXY_ENDPOINT": "https://public-endpoint",
"GRAPH_CONNECTION_URL": "https://{your-cluster-id}.us-west-2.neptune.amazonaws.com:8182",
"USING_PROXY_SERVER": true,
"IAM": true,
"SERVICE_TYPE": "neptune-db",
"AWS_REGION": "us-west-2",
"GRAPH_TYPE": "gremlin",
"GRAPH_EXP_HTTPS_CONNECTION": true,
"PROXY_SERVER_HTTPS_CONNECTION": true,
"GRAPH_EXP_FETCH_REQUEST_TIMEOUT": 240000,
"GRAPH_EXP_NODE_EXPANSION_LIMIT": 500
}

GRAPH_TYPE accepts "gremlin", "sparql", or "openCypher". GRAPH_EXP_FETCH_REQUEST_TIMEOUT is measured in milliseconds (e.g., 240000 is 4 minutes).

Pass the config.json file path to the docker run command.

docker run -p 80:80 -p 443:443 \
--env HOST={hostname-or-ip-address} \
-v /path/to/config.json:/graph-explorer/config.json \
public.ecr.aws/neptune/graph-explorer