Server Configuration

Configure the Traverse server with CLI arguments, environment variables or a TOML config file.

Configuration Priority

Settings are resolved in this order (highest priority first):

  1. CLI arguments
  2. Environment variables
  3. TOML config file (--config <path>, or traverse.toml in the working directory)
  4. Built-in defaults

Settings

CLI flagEnvironment variableTOML keyDefaultDescription
-c, --config--traverse.toml in the working directoryTOML config file
--listenTRAVERSE_LISTENlisten0.0.0.0:7690Bolt listen address
--http-listenTRAVERSE_HTTP_LISTENhttp_listen0.0.0.0:7691HTTP API, WebSocket and Studio listen address (none turns it off)
--dataTRAVERSE_DATAdatanoneA .tvdb file, or a directory of them (see Data Storage)
--default-dbTRAVERSE_DEFAULT_DBdefault_dbtraverseDefault database name
--memory-limitTRAVERSE_MEMORY_LIMITmemory_limit90% of RAMProcess memory budget (4GB, 512MB or bytes)
--query-memory-limitTRAVERSE_QUERY_MEMORY_LIMITquery_memory_limit25% of RAMPer-query memory budget (0 = unlimited); see Memory
--authTRAVERSE_AUTHauthnoneSeed admin user (user:pass)
--query-timeoutTRAVERSE_QUERY_TIMEOUTquery_timeoutnoneStatement time limit in milliseconds
--tx-idle-timeoutTRAVERSE_TX_IDLE_TIMEOUTtx_idle_timeout60Seconds an explicit transaction may sit idle before it's rolled back (0 = no limit)
--slow-query-thresholdTRAVERSE_SLOW_QUERY_THRESHOLDslow_query_thresholdnoneLog queries slower than this many milliseconds
--allowed-ipsTRAVERSE_ALLOWED_IPSallowed_ipsall allowedIP allowlist in CIDR notation
--allow-drop-databaseTRAVERSE_ALLOW_DROP_DATABASEallow_drop_databasetrueAllow deleting databases from Studio and the HTTP API (false locks it down)
--durabilityTRAVERSE_DURABILITYdurabilitysnapshotsnapshot, wal-async or wal (see Durability)
--wal-fsync-msTRAVERSE_WAL_FSYNC_MSwal_fsync_ms1000wal-async only: milliseconds between background syncs of the redo log
--checkpoint-intervalTRAVERSE_CHECKPOINT_INTERVALcheckpoint_interval300Seconds between background saves of changed databases (0 = off)
--ml-deviceTRAVERSE_ML_DEVICEml_deviceautoWhere ML training and inference run: auto, cpu, gpu or gpu:<n> (GPUs need a build with the ml-cuda feature)
--ml-max-jobsTRAVERSE_ML_MAX_JOBSml_max_jobs1ML training jobs that run at once; the rest queue
--api-keyTRAVERSE_API_KEYapi_keygeneratedHTTP API key (must start with tvs_)
-TRAVERSE_QUIETquietfalseLeave out the startup banner, which prints the API key
--ai-providerTRAVERSE_AI_PROVIDERai_provideroffGraph Assistant provider: anthropic or openai (see Graph Assistant)
-TRAVERSE_AI_API_KEYai_api_keynoneThe provider's API key; it stays on the server
--ai-modelTRAVERSE_AI_MODELai_modelclaude-opus-5-5 on anthropicModel to answer with; required on openai
--ai-base-urlTRAVERSE_AI_BASE_URLai_base_urlthe provider'sAPI base URL, for a gateway, Azure OpenAI or a local model
--ai-max-tokensTRAVERSE_AI_MAX_TOKENSai_max_tokens64000 on anthropicOutput tokens per answer
--ai-effortTRAVERSE_AI_EFFORTai_effortthe model'sClaude API effort: low, medium, high, xhigh or max
--log-levelTRAVERSE_LOG_LEVELlog_levelinfotrace, debug, info, warn or error
--log-dirTRAVERSE_LOG_DIRlog_dirconsole onlyDirectory for daily log files (traverse.log.<date>)
--server-agentTRAVERSE_SERVER_AGENT-Traverse/<version>Bolt server agent announced to clients (see Client Compatibility)
--tls-certTRAVERSE_TLS_CERTtls_certnoneTLS certificate (PEM)
--tls-keyTRAVERSE_TLS_KEYtls_keynoneTLS private key (PEM)
--grpc-listenTRAVERSE_GRPC_LISTENgrpc_listen0.0.0.0:50051gRPC listen address
--service-install---Install as a Windows service
--service-uninstall---Uninstall the Windows service

TOML Config File

Place a traverse.toml in the working directory, or pass a path with --config:

# Network
listen = "0.0.0.0:7690"
http_listen = "0.0.0.0:7691"   # "none" turns the HTTP API and Studio off

# Data
data = "/var/lib/traverse/databases"
default_db = "main"
durability = "snapshot"         # or "wal-async", "wal"
checkpoint_interval = 300

# Memory
memory_limit = "8GB"
query_memory_limit = "2GB"

# Authentication and limits
auth = "admin:changeme"
query_timeout = 30000
slow_query_threshold = 1000
allowed_ips = ["10.0.0.0/8", "192.168.0.0/16"]
allow_drop_database = false
# api_key = "tvs_your_key_here"  # generated when not set

# Graph Assistant (optional)
# ai_provider = "anthropic"
# ai_api_key = "sk-ant-..."

# TLS (optional)
# tls_cert = "/etc/traverse/cert.pem"
# tls_key = "/etc/traverse/key.pem"

Note: TOML keys use underscores (http_listen) where CLI flags use hyphens (--http-listen). In TOML allowed_ips is an array; on the command line and in the environment it's a comma-separated string.

Data Storage

Traverse is an in-memory database. Databases are loaded from .tvdb files at startup and written back by saves.

  • Directory (--data ./databases): every *.tvdb file is loaded, and its file name is the database name (users.tvdb is the users database). New databases (created in Studio, by an import, with CREATE DATABASE) get a file there.
  • Single file (--data mydb.tvdb): the file is the default database, created at the first save if it doesn't exist. Databases created later have no file, so use a directory when you'll create them.
  • No path: an empty in-memory database, kept nowhere.

Saving

Changed databases are saved by the periodic checkpoint (every checkpoint_interval seconds, 300 by default), at graceful shutdown (SIGTERM or SIGINT: kill $PID or Ctrl+C) and on request: POST /api/save saves every database at once. A save writes the file from a snapshot of one moment, so queries and writes keep running while it happens.

Important: kill -9 and taskkill /F skip the save. In snapshot mode that loses the writes since the last save.

Durability

ModeBehavior
snapshot (default)Writes run at full in-memory speed and are kept by saves (the checkpoint, shutdown, POST /api/save). A crash loses the writes since the last save.
wal-asyncEvery commit is appended to the redo log before it's acknowledged, and the log is synced to disk every wal_fsync_ms milliseconds (default 1000). A crash loses at most that interval, at close to snapshot write speed.
walEvery commit is appended to the redo log (<db>.tvdb.rlog.* segments next to the file) and synced before it's acknowledged: an acknowledged write survives a crash or power loss. Group commit shares one disk sync across concurrent writers, so throughput scales with concurrency but is bounded by the disk. Other queries see a commit once it's durable.
# per-commit crash durability
traverse-server --data ./data --durability wal

On startup, log segments a save hasn't covered yet are replayed, whatever the current mode, so switching modes between runs is safe. Each save deletes the segments it covers, so the log stays small. Choose snapshot for maximum write throughput (analytics, bulk loads, data rebuilt from a source) and wal when Traverse is the system of record.

Transactions

Every query runs with snapshot isolation: it sees every transaction committed before it started, nothing committed after, and never uncommitted state. Reads never wait for writes, and writes never wait for reads.

  • Auto-commit queries (a Bolt RUN outside BEGIN, an HTTP query) write under the single writer lock and commit when they finish.
  • Explicit transactions (Bolt BEGIN/COMMIT, gRPC transactions, the drivers' managed transactions) read their snapshot plus their own writes and apply everything at COMMIT, so an open transaction blocks no one. If another transaction committed a change to something this one changed or deleted, COMMIT fails with Neo.TransientError.Transaction.Outdated, which the official drivers retry automatically in managed transactions.
  • GQL transaction blocks over the HTTP API (START TRANSACTION ... COMMIT) run their statements as one unit: all of them commit, or none.
  • BEGIN with mode: "r" (driver read sessions) refuses writes.
  • A transaction idle longer than tx_idle_timeout (60 seconds) is rolled back. An open transaction keeps the data versions it can see in memory, so don't leave transactions open.

Snapshot isolation is the same level as PostgreSQL's REPEATABLE READ: two transactions that read the same data but change different objects can both commit.

Seeing and Stopping Running Work

Every statement runs as part of a transaction that SHOW TRANSACTIONS lists, across every session and protocol (Bolt, HTTP, WebSocket, gRPC, MCP). With authentication on, users see and stop their own transactions; admins see everyone's.

// what's running
SHOW TRANSACTIONS

// every column, filtered and sorted
SHOW TRANSACTIONS YIELD * WHERE elapsedTime > duration('PT30S') ORDER BY elapsedTime DESC

// stop one
TERMINATE TRANSACTIONS 'neo4j-transaction-12'

// stop everything running longer than a minute
SHOW TRANSACTIONS YIELD transactionId AS id, elapsedTime
WHERE elapsedTime > duration('PT1M')
TERMINATE TRANSACTIONS id YIELD message
RETURN id, message

A terminated transaction's running statement stops within milliseconds and its writes are rolled back. Statements also stop when their time limit passes (query_timeout, a Bolt tx_timeout, a gRPC timeout_ms), when their client goes away (a Bolt RESET or closed connection, an aborted HTTP request, a cancelled gRPC call), or when a WebSocket client sends {"type": "cancel", "id": "<query id>"}.

Memory

Memory is governed at two levels. Both limits take sizes (TB, GB, MB, KB, any case) or bytes; 0 or unlimited turns a limit off.

  • Process budget (memory_limit, default 90% of RAM): when the process passes it, writes are refused and running queries stop until usage drops below it.
  • Per-query budget (query_memory_limit, default 25% of RAM): every query tracks what its own buffers hold (a sort, an aggregation, a hash join, an Eager barrier, a variable-length expansion, the result set). A query that passes its budget fails with query exceeded its memory limit, and the server and every other query keep running.

Most statements never come near the budget because the executor streams: CREATE, SET, REMOVE and MERGE apply one row at a time. The planner adds an Eager operator (visible in EXPLAIN) only where a later clause has to see all of an earlier clause's writes.

Graph Assistant

Studio's Graph Assistant answers with a model you configure; the server calls the provider itself, and the provider's key never reaches the browser. It's off, and hidden in Studio, until ai_provider is set.

# the Claude API (claude-opus-5-5 unless TRAVERSE_AI_MODEL says otherwise)
TRAVERSE_AI_PROVIDER=anthropic TRAVERSE_AI_API_KEY=sk-ant-... traverse-server --data ./data

# any OpenAI-compatible endpoint: OpenAI, Azure OpenAI, Ollama, LM Studio, vLLM
TRAVERSE_AI_PROVIDER=openai TRAVERSE_AI_MODEL=llama3.1 \
  TRAVERSE_AI_BASE_URL=http://localhost:11434/v1 traverse-server --data ./data

Client Compatibility

Traverse implements Bolt 5.1 to 6.0 and works with the standard Neo4j drivers. Some client applications check that the server identifies itself as Neo4j during the Bolt handshake and refuse to connect otherwise, with an error such as:

Server does not identify as a genuine Neo4j instance: 'Traverse/0.9.2'

For those clients, set the announced server agent so it starts with Neo4j/:

traverse-server --data ./data --server-agent "Neo4j/5.26.0"
# or
TRAVERSE_SERVER_AGENT="Neo4j/5.26.0" traverse-server --data ./data

Only the identification string changes, not the behavior.

G.V() (gdotv.com): choose Neo4j as the database type in the connection dialog and start Traverse with --server-agent "Neo4j/5.26.0".

Inspecting the Configuration

The running server lists its resolved configuration with SHOW SETTINGS (composable with YIELD and WHERE). The API key is redacted, and the Graph Assistant's provider key isn't listed.

SHOW SETTINGS YIELD name, value WHERE name CONTAINS 'bolt';

Authentication

When no users exist, authentication is off and every connection has full access. Seed the first admin with --auth; it's only created while there are no users:

traverse-server --auth admin:s3cret --data ./data
RolePermissions
ADMINEverything: queries, writes, schema, users and databases
EDITORQueries and writes
READERRead-only queries

Manage users with Cypher (in the CLI or through a Bolt driver), in Studio's Users panel, or through the HTTP API (/api/users):

CREATE USER alice SET PASSWORD 'hunter2' SET ROLE EDITOR;
ALTER USER alice SET ROLE ADMIN;
DROP USER alice;
SHOW USERS;

Users live in the default database's .tvdb file, with bcrypt-hashed passwords (cost 12). Each change is saved, crash-safely, before the command returns. If the stored users can't be read at startup, the server refuses to start rather than run without authentication; start it with --auth user:pass to replace them with that admin.

API Key

The HTTP API and Studio require an API key. A random one (tvs_ and 32 hex characters) is generated at each start and printed in the startup banner, unless you set one; a key you set must start with tvs_:

traverse-server --api-key tvs_your_custom_key_here

Clients pass it in one of:

  • X-API-Key: tvs_... header
  • Authorization: Bearer tvs_... header
  • ?token=tvs_... query parameter (for WebSocket connections)

Open without a key: GET /api/health, GET /api/ready, GET /api/docs, GET /api/openapi.json, GET /metrics and Studio's static files.

IP Filtering

Restrict connections by address, in CIDR notation:

traverse-server --allowed-ips "192.168.1.0/24,10.0.0.0/8"

IPv4 and IPv6 ranges both work. The allowlist applies to Bolt and HTTP connections; without one every address is allowed.

TLS

Give the server a certificate and private key (PEM):

traverse-server --tls-cert /path/to/cert.pem --tls-key /path/to/key.pem

Bolt clients then connect with bolt+s://, and the HTTP API is served over HTTPS.

Logging

RUST_LOG filters the log (tracing EnvFilter syntax):

RUST_LOG=traverse_server=debug traverse-server
RUST_LOG="traverse_server=debug,traverse_cypher=info" traverse-server

With slow_query_threshold set, queries slower than the threshold are logged at WARN with their time and text.

Windows Service

On Windows, Traverse can run as a service (installing needs Administrator rights):

REM Install the service (TraverseServer, automatic start)
traverse-server --service-install

REM Start and stop
sc start TraverseServer
sc stop TraverseServer

REM Uninstall
traverse-server --service-uninstall

The service reads traverse.toml from the executable's directory and the environment, and runs like the console server: the same settings, listeners, checkpoints and durability modes. It logs to daily files (traverse.log.<date>) in TRAVERSE_LOG_DIR, by default the executable's directory.