Someguy Environment Variables

August 4, 2026 ยท View on GitHub

The environment variables below override someguy's built-in defaults.

Configuration

SOMEGUY_LISTEN_ADDRESS

The address to listen on.

Default: 127.0.0.1:8190

SOMEGUY_DHT

Controls DHT client mode: standard, accelerated, disabled

Default: accelerated

SOMEGUY_CACHED_ADDR_BOOK

Enables the cached address book. When disabled, Someguy omits cached addresses from FindProviders results for peers lacking multiaddrs.

Default: true

SOMEGUY_CACHED_ADDR_BOOK_RECENT_TTL

TTL for recently connected peers' multiaddrs in the cached address book. Applies only when SOMEGUY_CACHED_ADDR_BOOK is enabled.

Default: 48h

SOMEGUY_CACHED_ADDR_BOOK_ACTIVE_PROBING

Enables active probing of cached peers to keep their multiaddrs up to date. Applies only when SOMEGUY_CACHED_ADDR_BOOK is enabled.

Default: true

SOMEGUY_CACHED_ADDR_BOOK_MAX_CONCURRENT_FIND_PEERS

Maximum background FindPeer lookups that run at once. Someguy starts one of these when a provider record arrives without addresses and the cache has none. At the limit Someguy skips the lookup and omits the record. Applies only when SOMEGUY_CACHED_ADDR_BOOK is enabled.

Raise this only if someguy_cached_router_find_peer_lookups_rejected keeps increasing. See metrics.md and peer-address-caching.md.

Default: 512

SOMEGUY_DNSADDR_RESOLUTION

Controls when Someguy replaces a /dnsaddr address with the addresses it names.

A /dnsaddr carries no transport component, so filter-addrs can neither match it nor exclude it. A provider reachable only through a /dnsaddr is dropped from a filtered response, and a provider the client asked to exclude survives one. Resolving before the filter runs fixes both.

  • append (default): resolve on every request. A request that sends filter-addrs gets the /dnsaddr replaced, because a filter cannot match one and it would otherwise survive a filter meant to exclude it. A request without a filter gets the resolved addresses added and keeps the /dnsaddr, so it can dial now and re-resolve later.
  • replace: like append, but a request without a filter also gets the /dnsaddr replaced. Responses are smaller and no client has to resolve a /dnsaddr itself, at the cost of the indirection: a client cannot re-resolve the hostname later from the response alone.
  • filtered: resolve only when the request sends filter-addrs, and replace the /dnsaddr when it does. Requests without a filter are left alone and cost no DNS lookup.
  • never: never resolve.

In every resolving mode, a filter whose positive entries name dnsaddr itself keeps the /dnsaddr: that is the one filter which can match it, and the client sending it is asking for the indirections. See dnsaddr-resolution.md for the details.

Resolved sets are cached, and one request cannot trigger an unbounded number of DNS lookups. See dnsaddr-resolution.md.

Default: append

SOMEGUY_ROUTING_TIMEOUT

Maximum time one /routing/v1 request spends in the routers.

Keep this below the timeout the client applies to the whole request. A client that gives up first loses every record Someguy found, because the response is still open when the client disconnects. Helia's delegated routing client allows 30 seconds and starts its timer before Someguy starts this one.

Default: 25s

SOMEGUY_RECORDS_LIMIT

Maximum providers or peers returned per Accept: application/json request. HTTP Routing v1, section 4.1.5 recommends 100. Set to 0 to disable the cap.

Default: 100

SOMEGUY_STREAMING_RECORDS_LIMIT

Maximum providers or peers returned per Accept: application/x-ndjson request. Sits above SOMEGUY_RECORDS_LIMIT so streaming returns more results. Set to 0 to disable the cap.

Default: 1000

SOMEGUY_PROVIDER_ENDPOINTS

Comma-separated list of Delegated Routing V1 endpoints for provider lookups.

Supports two URL formats:

  • Base URL without path: https://example.com
  • Full URL with path: https://example.com/routing/v1/providers

The auto placeholder (default) resolves to endpoints from the network configuration at SOMEGUY_AUTOCONF_URL.

Default: auto

SOMEGUY_PEER_ENDPOINTS

Comma-separated list of Delegated Routing V1 endpoints for peer routing.

URL formats: same as SOMEGUY_PROVIDER_ENDPOINTS (use /routing/v1/peers path).

Default: auto

SOMEGUY_IPNS_ENDPOINTS

Comma-separated list of Delegated Routing V1 endpoints for IPNS records.

URL formats: same as SOMEGUY_PROVIDER_ENDPOINTS (use /routing/v1/ipns path).

Default: auto

SOMEGUY_AUTOCONF

Enables automatic configuration (autoconf) of delegated routing endpoints and bootstrap peers.

When enabled, Someguy replaces the auto placeholder in endpoint configuration with network-recommended values fetched from the autoconf URL.

Default: true

SOMEGUY_AUTOCONF_URL

URL to fetch autoconf data from. Defaults to the service that provides configuration for IPFS Mainnet.

Default: https://conf.ipfs-mainnet.org/autoconf.json

SOMEGUY_AUTOCONF_REFRESH

How often to refresh the autoconf data. The configuration is cached and updated at this interval.

Default: 24h

SOMEGUY_HTTP_BLOCK_PROVIDER_ENDPOINTS

Comma-separated list of HTTP trustless gateways that Someguy probes to synthesize provider records.

When a configured gateway responds with HTTP 200 to a HEAD /ipfs/{cid}?format=raw request, FindProviders returns a provider record that contains the matching PeerID from SOMEGUY_HTTP_BLOCK_PROVIDER_PEERIDS and the gateway endpoint as a multiaddr with the /tls/http suffix.

Important

When creating a synthetic /routing/v1 for your gateway, and not a general-purpose routing endpoint, set SOMEGUY_DHT=disabled and SOMEGUY_PROVIDER_ENDPOINTS="" to disable default DHT and HTTP routers and exclusively use the explicitly defined SOMEGUY_HTTP_BLOCK_PROVIDER_ENDPOINTS.

Default: none

SOMEGUY_HTTP_BLOCK_PROVIDER_PEERIDS

Comma-separated list of multibase-encoded peerIDs that Someguy embeds in synthetic provider records for the HTTP endpoints in SOMEGUY_HTTP_BLOCK_PROVIDER_ENDPOINTS. The order of PeerIDs must match the order of endpoints.

If you configure provider endpoints without PeerIDs, Someguy generates synthetic PeerIDs automatically, deterministically derived from SHA-256 hashes of the endpoint URLs. These PeerIDs exist only for routing-system compatibility; HTTP trustless gateways never use them for cryptographic operations or peer authentication.

Default: none

SOMEGUY_LIBP2P_LISTEN_ADDRS

Comma-separated libp2p listen multiaddresses. Someguy binds port 4004 on IPv4 and IPv6 across libp2p's default transports. To see the exact defaults built into this release, run someguy start --help.

SOMEGUY_LIBP2P_CONNMGR_LOW

Minimum number of libp2p connections to keep.

Default: 100

SOMEGUY_LIBP2P_CONNMGR_HIGH

Maximum number of libp2p connections to keep.

Default: 3000

SOMEGUY_LIBP2P_CONNMGR_GRACE_PERIOD

Minimum libp2p connection TTL.

Default: 1m

SOMEGUY_LIBP2P_MAX_MEMORY

Maximum memory to use for libp2p.

Default: 0 (85% of the system's available RAM)

SOMEGUY_LIBP2P_MAX_FD

Maximum number of file descriptors used by libp2p node.

Default: 0 (50% of the process' limit)

Logging

GOLOG_LOG_LEVEL

Sets the log level globally or per subsystem. Levels:

  • debug
  • info
  • warn
  • error
  • dpanic
  • panic
  • fatal

Specify per-subsystem levels as subsystem=level. Combine a global level with any number of per-subsystem levels by separating them with commas.

Default: error

Example:

GOLOG_LOG_LEVEL="error,someguy=debug" someguy

GOLOG_LOG_FMT

Sets the log message format. Supported values:

  • color: human-readable, colorized (ANSI) output
  • nocolor: human-readable, plain-text output
  • json: structured JSON

For example, to log structured JSON (for easier parsing):

export GOLOG_LOG_FMT="json"

The logging format defaults to color when the output is a terminal, and nocolor otherwise.

GOLOG_FILE

Writes logs to the given file. Defaults to stderr.

GOLOG_TRACING_FILE

Writes tracing events to the given file. Tracing is disabled by default.

Warning: tracing affects performance.

Tracing

See tracing.md.

SOMEGUY_TRACING_AUTH

Setting a non-empty value enables on-demand per-request tracing.

To honor a Traceparent or Tracestate header, Someguy requires the request to carry an Authorization header whose value matches SOMEGUY_TRACING_AUTH.

SOMEGUY_SAMPLING_FRACTION

Fraction of routing requests to sample (0 to 1). Applied independently of Traceparent-based sampling.

Default: 0