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):
- CLI arguments
- Environment variables
- TOML config file (
--config <path>, ortraverse.tomlin the working directory) - Built-in defaults
Settings
| CLI flag | Environment variable | TOML key | Default | Description |
|---|---|---|---|---|
-c, --config | - | - | traverse.toml in the working directory | TOML config file |
--listen | TRAVERSE_LISTEN | listen | 0.0.0.0:7690 | Bolt listen address |
--http-listen | TRAVERSE_HTTP_LISTEN | http_listen | 0.0.0.0:7691 | HTTP API, WebSocket and Studio listen address (none turns it off) |
--data | TRAVERSE_DATA | data | none | A .tvdb file, or a directory of them (see Data Storage) |
--default-db | TRAVERSE_DEFAULT_DB | default_db | traverse | Default database name |
--memory-limit | TRAVERSE_MEMORY_LIMIT | memory_limit | 90% of RAM | Process memory budget (4GB, 512MB or bytes) |
--query-memory-limit | TRAVERSE_QUERY_MEMORY_LIMIT | query_memory_limit | 25% of RAM | Per-query memory budget (0 = unlimited); see Memory |
--auth | TRAVERSE_AUTH | auth | none | Seed admin user (user:pass) |
--query-timeout | TRAVERSE_QUERY_TIMEOUT | query_timeout | none | Statement time limit in milliseconds |
--tx-idle-timeout | TRAVERSE_TX_IDLE_TIMEOUT | tx_idle_timeout | 60 | Seconds an explicit transaction may sit idle before it's rolled back (0 = no limit) |
--slow-query-threshold | TRAVERSE_SLOW_QUERY_THRESHOLD | slow_query_threshold | none | Log queries slower than this many milliseconds |
--allowed-ips | TRAVERSE_ALLOWED_IPS | allowed_ips | all allowed | IP allowlist in CIDR notation |
--allow-drop-database | TRAVERSE_ALLOW_DROP_DATABASE | allow_drop_database | true | Allow deleting databases from Studio and the HTTP API (false locks it down) |
--durability | TRAVERSE_DURABILITY | durability | snapshot | snapshot, wal-async or wal (see Durability) |
--wal-fsync-ms | TRAVERSE_WAL_FSYNC_MS | wal_fsync_ms | 1000 | wal-async only: milliseconds between background syncs of the redo log |
--checkpoint-interval | TRAVERSE_CHECKPOINT_INTERVAL | checkpoint_interval | 300 | Seconds between background saves of changed databases (0 = off) |
--ml-device | TRAVERSE_ML_DEVICE | ml_device | auto | Where ML training and inference run: auto, cpu, gpu or gpu:<n> (GPUs need a build with the ml-cuda feature) |
--ml-max-jobs | TRAVERSE_ML_MAX_JOBS | ml_max_jobs | 1 | ML training jobs that run at once; the rest queue |
--api-key | TRAVERSE_API_KEY | api_key | generated | HTTP API key (must start with tvs_) |
| - | TRAVERSE_QUIET | quiet | false | Leave out the startup banner, which prints the API key |
--ai-provider | TRAVERSE_AI_PROVIDER | ai_provider | off | Graph Assistant provider: anthropic or openai (see Graph Assistant) |
| - | TRAVERSE_AI_API_KEY | ai_api_key | none | The provider's API key; it stays on the server |
--ai-model | TRAVERSE_AI_MODEL | ai_model | claude-opus-5-5 on anthropic | Model to answer with; required on openai |
--ai-base-url | TRAVERSE_AI_BASE_URL | ai_base_url | the provider's | API base URL, for a gateway, Azure OpenAI or a local model |
--ai-max-tokens | TRAVERSE_AI_MAX_TOKENS | ai_max_tokens | 64000 on anthropic | Output tokens per answer |
--ai-effort | TRAVERSE_AI_EFFORT | ai_effort | the model's | Claude API effort: low, medium, high, xhigh or max |
--log-level | TRAVERSE_LOG_LEVEL | log_level | info | trace, debug, info, warn or error |
--log-dir | TRAVERSE_LOG_DIR | log_dir | console only | Directory for daily log files (traverse.log.<date>) |
--server-agent | TRAVERSE_SERVER_AGENT | - | Traverse/<version> | Bolt server agent announced to clients (see Client Compatibility) |
--tls-cert | TRAVERSE_TLS_CERT | tls_cert | none | TLS certificate (PEM) |
--tls-key | TRAVERSE_TLS_KEY | tls_key | none | TLS private key (PEM) |
--grpc-listen | TRAVERSE_GRPC_LISTEN | grpc_listen | 0.0.0.0:50051 | gRPC 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*.tvdbfile is loaded, and its file name is the database name (users.tvdbis theusersdatabase). New databases (created in Studio, by an import, withCREATE 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
| Mode | Behavior |
|---|---|
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-async | Every 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. |
wal | Every 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 walOn 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
RUNoutsideBEGIN, 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 atCOMMIT, so an open transaction blocks no one. If another transaction committed a change to something this one changed or deleted,COMMITfails withNeo.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. BEGINwithmode: "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, messageA 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, anEagerbarrier, a variable-length expansion, the result set). A query that passes its budget fails withquery 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 ./dataClient 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 ./dataOnly 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| Role | Permissions |
|---|---|
ADMIN | Everything: queries, writes, schema, users and databases |
EDITOR | Queries and writes |
READER | Read-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_hereClients pass it in one of:
X-API-Key: tvs_...headerAuthorization: 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.pemBolt 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-serverWith 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-uninstallThe 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.