arkd is configured via environment variables. This page documents settings that affect runtime behavior, gRPC transport, and API performance.
All variables can be passed as environment variables or written to an
.env file in the arkd data directory.gRPC Transport
MAX_CONCURRENT_STREAMS
Controls the maximum number of concurrent HTTP/2 streams allowed per gRPC connection.| Key | Default | Type |
|---|---|---|
MAX_CONCURRENT_STREAMS | 1000 | uint32 |
- High-traffic operators serving many simultaneous clients should increase this value.
- Setting it to
0is invalid and will preventarkdfrom starting (validation error at boot).
As of arkd PR #978, both the secure and insecure gRPC listeners respect this setting. Prior to this change, the HTTP/2 server used the Go default.
Split Unary vs. Streaming Connections
arkd internally routes unary RPCs and server-side streaming RPCs through separate gRPC transports. This is an implementation detail — no configuration is required — but it has observable effects:
- Health checks use the unary transport. They remain responsive even when streaming connections experience backpressure or reconnects.
GetEventStream/GetTransactionsStreamuse the streaming transport with jittered reconnect backoff.- The admin service (wallet operations, config updates) runs on a dedicated gateway separate from the public client endpoints.
GetInfo Caching
GetInfo responses are now cached in memory at startup to reduce database load on high-frequency calls.
Cache behavior
| Trigger | Effect |
|---|---|
arkd startup | Cache is warmed from the database |
| Admin RPC updates session config | Cache is automatically invalidated and reloaded |
| Admin RPC updates intent fee formulas | Cache is automatically invalidated and reloaded |
Manual RefreshInfoCache admin action | Force-refreshes the cache |
- Dust amounts and min/max UTXO/VTXO amounts
- Scheduled session configuration (round intervals, expiry delays)
- Fee formula parameters
- Server signer public key and network type
- Market hours configuration
- Real-time VTXO states and balances (always queried live)
- Transaction history
If you update server configuration outside of the standard admin RPCs (e.g., by directly modifying the database), call
RefreshInfoCache via the admin API to ensure GetInfo returns up-to-date values.Other Notable Environment Variables
For reference, the full list of environment variables is defined ininternal/config/config.go. Key variables include:
| Variable | Purpose |
|---|---|
ARK_NETWORK | Bitcoin network (mainnet, testnet3, signet, mutinynet, regtest) |
ROUND_INTERVAL | Seconds between batch rounds |
UNILATERAL_EXIT_DELAY | CSV delay for unilateral exits (in seconds) |
VTXO_NO_CSV_VALIDATION_CUTOFF_DATE | Unix timestamp cutoff for skipping CSV validation on old VTXOs |
ENABLE_PPROF | Enable Go pprof profiling endpoint (default: false) |
MAX_CONCURRENT_STREAMS | gRPC max concurrent HTTP/2 streams (default: 1000) |