Skip to content

Configuration

Edge Connector Configuration

The Edge Connector is configured through a combination of a config.json file and environment variables. Environment variables always take precedence over config file values, which in turn take precedence over built-in defaults. This page covers all configuration options, file formats, and the precedence rules.

When the Edge Connector resolves a configuration value, it checks the following sources in order (highest priority first):

  1. Environment variables — always override everything else.

  2. config.json file — values from the configuration file in the working directory.

  3. Built-in defaults — hardcoded fallback values used when no other source provides a value.

The following environment variables control Edge Connector behavior. All are optional; the Edge Connector works with default values for local development.

VariableDefaultDescription
TOOL_RPC_URLws://localhost:3001WebSocket URL for the nara platform server. This is the primary connection endpoint for all tool execution traffic. Use wss:// for production.
PLATFORM_API_URLhttp://localhost:3000Base URL for the nara platform API. Used for bundle management, authentication endpoints, and cloud connector operations.
NEXT_PUBLIC_TOOL_RPC_URLAlternative to TOOL_RPC_URL. If TOOL_RPC_URL is not set, this value is used. Useful when sharing environment files with the webapp.
NEXT_PUBLIC_PLATFORM_API_URLAlternative to PLATFORM_API_URL. Same precedence behavior.
VariableDefaultDescription
AUTH_TOKEN_PATH./auth-token.jsonPath to the file where the authentication JWT token is stored. Can be absolute or relative to the installation directory.
DEPLOYMENT_IDDeployment identifier for cloud/server mode. When both DEPLOYMENT_ID and DEPLOYMENT_SECRET are set, the connector uses deployment credentials instead of JWT token authentication.
DEPLOYMENT_SECRETDeployment secret for cloud/server mode. Must be set together with DEPLOYMENT_ID.
DEPLOYMENT_CREDENTIALS_PATHPath to a file containing deployment credentials as an alternative to setting DEPLOYMENT_ID and DEPLOYMENT_SECRET individually.
VariableDefaultDescription
CUSTOM_IMPLEMENTATIONS_PATH./custom-implementations/index.jsPath to the entry point of your custom tool implementations. The runtime loads implementations from this path at startup.
NARA_INSTALL_DIRECTORYCurrent working directoryRoot installation directory. Used for resolving relative paths (token file, lock file, shutdown file) and as the base for the process lock.
VariableDefaultDescription
HEALTH_PORT8080Port for the HTTP health check server. Exposes /livez, /healthz, and /statusz endpoints.
EC_TEST_RUNSet to 1 to enable test mode. Disables state persistence, autostart, and the system tray. Used by edge-connector run for local testing.
EC_DISABLE_STATESet to 1 to disable state persistence. The runtime will not save or restore its running state. Automatically enabled in test mode.
EC_DISABLE_AUTOSTARTSet to 1 to disable automatic startup on system boot. Automatically enabled in test mode.
EC_DISABLE_TRAYSet to 1 to disable the system tray icon. Automatically enabled in test mode.
EC_CONNECTOR_TYPEEDGEConnector type identifier.
INSTANCE_TYPESet to E2E to register E2E test tools alongside regular tools. Used in end-to-end testing environments.

The config.json file lives in the Edge Connector’s working directory. If it does not exist, the runtime copies a default configuration from the installation package.

Full schema:

{
"toolRpcUrl": "ws://localhost:3001",
"authTokenPath": "./auth-token.json",
"customImplementationsPath": "./custom-implementations/index.js",
"connectorType": "EDGE",
"platformApiUrl": "http://localhost:3000",
"deploymentId": null,
"currentBundleId": null
}

Field reference:

FieldTypeRequiredDescription
toolRpcUrlstringYesWebSocket URL for the nara platform server
authTokenPathstringYesPath to the authentication token file (absolute or relative to install directory)
customImplementationsPathstringYesPath to the custom implementations entry point
connectorType"EDGE"YesConnector type
platformApiUrlstringNoBase URL for the nara platform API
deploymentIdstringNoDeployment ID (set when assigned to a deployment)
currentBundleIdstringNoCurrently tracked bundle ID (set automatically by bundle checkout and upload)

The authentication token is stored as a JSON file. This file is created automatically by edge-connector auth and managed by the runtime.

{
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"savedAt": "2025-01-15T10:30:00.000Z"
}
FieldTypeDescription
tokenstringThe JWT authentication token
savedAtstringISO 8601 timestamp of when the token was saved

The file is created with restrictive permissions (0600) to protect the token from unauthorized access.

For server/cloud deployments, credentials can be stored in a file instead of environment variables:

{
"deploymentId": "dep_abc123xyz",
"deploymentSecret": "sec_9f8e7d6c5b4a..."
}

Set the DEPLOYMENT_CREDENTIALS_PATH environment variable to point to this file. The runtime reads the file at startup and uses the credentials for WebSocket authentication.

The platform API URL determines where the Edge Connector sends API requests for authentication, bundle management, and cloud operations. The URL is resolved in this order:

  1. PLATFORM_API_URL environment variable

  2. NEXT_PUBLIC_PLATFORM_API_URL environment variable

  3. platformApiUrl field in config.json

  4. Default: http://localhost:3000

For production deployments, this should be set to your nara instance URL (e.g., https://app.nara.de).

{
"toolRpcUrl": "ws://localhost:3001",
"authTokenPath": "./auth-token.json",
"customImplementationsPath": "./custom-implementations/index.js",
"connectorType": "EDGE",
"platformApiUrl": "http://localhost:3000"
}