Skip to main content

Configuration Reference

EphemeralNet applies settings in this order: built-in defaults (ephemeralnet::Config), YAML/JSON config file (--config), named profile (--profile), environment overlay (--env), and finally CLI flags. Later layers override earlier ones. Use this table-driven guide alongside include/ephemeralnet/Config.hpp when tuning nodes.

TTL, storage, and lifecycle

FieldDefaultCLI flag / keyNotes
default_chunk_ttl6h--default-ttlApplied when uploads omit a TTL. Clamped between min_manifest_ttl and max_manifest_ttl.
min_manifest_ttl30s--min-ttlRequests below this fail with ERR_TTL_BELOW_MIN.
max_manifest_ttl6h--max-ttlRequests above this drop to the max.
cleanup_interval5mprofile/env onlyDrives Node::tick() cadence.
storage_persistent_enabledfalse--persistent / --no-persistentMirrors chunks to disk when true.
storage_directorystorage--storage-dir <path>Base path for persisted chunks.
storage_wipe_on_expirytrue--no-wipe disablesOverwrites expired files storage_wipe_passes times.
storage_wipe_passes1--wipe-passes <1-255>Number of overwrite passes.
key_rotation_interval5m--key-rotation <seconds>Session key refresh cadence.

Control plane & CLI interaction

FieldDefaultCLI flag / keyDescription
control_host127.0.0.1--control-host, --control-loopback, --control-exposeBind address for daemon. --control-expose binds 0.0.0.0 with a confirmation prompt unless --yes.
control_port47777--control-portTCP port for the control socket.
control_tokenunset--control-token <secret>Shared secret validated per connection.
control_stream_max_bytes32 MiB--max-store-bytesUpper bound for PAYLOAD-LENGTH.
max_entries_per_listimpl-definedconfig onlyCap the number of rows returned by LIST to keep automation snappy.

Data plane, NAT, and relay

FieldDefaultCLI flag / keyDescription
transport_listen_port45000--transport-portTCP listener for encrypted peer traffic.
nat_stun_enabledtrueprofile/envEnables STUN probes against stun.shardian.com / turn.shardian.com.
advertise_control_hostunset--advertise-control host:portForces manual control endpoint hints in manifests.
advertise_allow_privatefalse--advertise-allow-privatePublish RFC1918 endpoints when true.
advertise_auto_modeon`--advertise-auto onwarn
advertised_endpoints[]config onlyStatic endpoint list always inserted into manifests.
relay_enabledtrueprofile/envToggles relay fallback.
relay_endpoints[relay.shardian.com:9750]--relay-endpoint host:port (repeatable)Additional TURN-like relays for stubborn NATs.

Proof-of-work & swarm tuning

FieldDefaultCLI flag / keyDescription
announce_pow_difficulty6--announce-pow <0-24>Bits required for ANNOUNCE messages.
handshake_pow_difficulty4config onlyBits required for transport handshakes.
store_pow_difficulty6config / DEFAULTSBits required for uploads; CLI auto-solves.
swarm_target_replicas3config onlyDesired replicas per chunk.
swarm_min_providers2config onlyMinimum healthy providers before fetch commands consider the chunk satisfied.
swarm_candidate_sample8config onlySample size passed to the DHT when picking replica targets.
swarm_rebalance_interval30mconfig onlyInterval for manifest re-announcement.
announce_min_interval15s--announce-intervalLower bound between ANNOUNCE transmissions.
announce_burst_limit4--announce-burstMax announcements per rolling window.
announce_burst_window120s--announce-windowWindow paired with the burst limit.

Chunk sharding & cryptography

FieldDefaultCLI flag / keyDescription
shard_threshold3profile/envShares required to reconstruct the key.
shard_total5profile/envTotal shares emitted per chunk.
protocol_message_version0internalHighest gossip message version the daemon emits.
protocol_min_supported_version1internalLower bound accepted during decoding.

Fetch/upload concurrency

FieldDefaultCLI flag / keyDescription
fetch_max_parallel_requests3--fetch-parallelMaximum concurrent remote fetch attempts (0 = unlimited).
fetch_retry_attempt_limit5config onlyCap on retries before marking a fetch failed.
fetch_retry_initial_backoff3sconfig onlyStarting back-off for retries.
fetch_retry_max_backoff60sconfig onlyBack-off ceiling.
upload_max_parallel_transfers3--upload-parallelConcurrent uploads allowed per node.
upload_max_transfers_per_peer1config onlyPrevents peers from monopolising bandwidth.
upload_transfer_timeout30sconfig onlyCancels stalled uploads.