Introducing a new way to review your PRs.

Read the announcement

celestiaorg / celestia-node

Celestia Data Availability Nodes

View on GitHub

22 documents · Updated Nov 23, 2026

docs / command-line-operations

Command-line node operations

The command-line tools provide the operator path for creating, running, configuring, accessing, and checking a Celestia node. celestia manages node life cycle and RPC-backed actions, cel-key manages chain account keys, and cel-shed provides focused diagnostics and store repair tools. This page gives the operating model; see Public APIs and node operations, RPC API contracts and clients, Node configuration and operating modes, and Transaction submission and account state for the related system views.

Command surfaces

The tools divide work by its effect on the node. The main celestia command selects a node mode or calls a running service. cel-key works with the chain account keyring. cel-shed works with local stores or short-lived diagnostic clients.

CommandPrimary purposeUsual node state
celestiaInitialize and run Bridge or Light nodes. Manage config, auth, RPC services, and node state.Init and config actions use a local store. RPC actions use a running node.
cel-keyCreate and manage chain account keys used to sign transactions.Does not require the node daemon to run.
cel-shedInspect data, test network paths, measure service behavior, and repair selected stores.Depends on the command. Store edits require a stopped node.

celestia command tree

The celestia bridge and celestia light branches select the node operating mode. Both branches expose init, start, authentication, configuration changes, and store reset actions. The root also exposes module command groups for a running node, docgen for OpenRPC documentation, and version for build information.

The main command groups map to the node's public services:

GroupOperator concern
blobSubmit blobs and retrieve blobs or proofs.
dasRead data-availability sampling statistics.
headerRead heads, stored headers, and sync state.
shareRead shares, namespaces, ranges, and extended data squares.
stateRead account state and submit account or staking transactions.
p2pInspect peers and control peer connections.
nodeInspect the node, change log levels, and manage RPC permissions.

These groups are command-line views of JSON-RPC services. Their output is formatted as JSON with a result field, so scripts can consume the same broad service results that other RPC clients use.

References: cmd/…/main.go• L13-35 cmd/…/version.go• L11-25 cmd/…/docgen.go• L14-49 nodebuilder/…/blob.go• L25-38 nodebuilder/…/das.go• L13-32 nodebuilder/…/header.go• L13-29 nodebuilder/…/share.go• L16-44 nodebuilder/…/state.go• L26-70 nodebuilder/…/p2p.go• L22-51 nodebuilder/…/node.go• L13-22 cmd/util.go• L25-44 cmd/…/blob_test.go• L26-63

Build information

celestia version reports the identity of the running binary. It supports text for operator reading and JSON for scripts or release checks. The output includes the semantic version, source commit, build time, system version, and Go version.

References: cmd/…/version.go• L19-56

OpenRPC documentation

celestia docgen produces an OpenRPC description of the node's public command and service surface. It gathers the registered modules and their API comments, maps module names to client receivers, discovers the documented methods, and writes the result as formatted JSON to standard output.

References: cmd/…/docgen.go• L14-49 cmd/…/main.go• L26-34

cel-key command tree

cel-key is the chain account key utility. It provides the standard Cosmos key commands through one command root and points them at the node's key directory unless the operator gives another keyring directory.

Before a key command runs, cel-key loads the client settings and persistent keyring directory flags. It sets the test keyring backend when no backend was selected. Operators that use another backend must select it explicitly so key management matches node policy. The command uses the Celestia application home directory and client configuration when it builds this context.

The directory normally follows the selected node type and P2P network. This keeps keys for different node roles or networks apart. A caller can override the keyring directory when the key must be managed outside the derived node store.

References: cmd/…/main.go• L19-59 cmd/…/main.go• L62-71 cmd/…/node_types.go• L22-68

cel-shed command tree

cel-shed is a separate tool for focused checks and experiments. It does not start the normal Bridge or Light node command path. Its command groups cover P2P connection checks, header-store repair, EDS and datastore checks, square construction, hash lookup, stress work, and latency monitoring.

Use it when the question is about a local data store or one narrow network path rather than normal node operation. Some commands start short-lived clients or open a store directly. They must not be used against data that the running node is changing. Every subcommand runs under a context canceled by SIGINT or SIGTERM, so long-running checks can stop through the normal process signal path.

References: cmd/…/main.go• L12-34 cmd/…/p2p.go• L23-30 cmd/…/header.go• L15-18 cmd/…/ods_verify.go• L22-40 cmd/…/datastore.go• L18-30 cmd/…/square.go• L17-29

Node lifecycle

The node life cycle has a clear boundary between preparing a store and running a daemon. init creates the durable starting state. start reads that state, builds the selected node mode, and owns the process until shutdown.

Initialization

celestia bridge init and celestia light init prepare a node store for later startup. The command selects the node type, network, store path, and configuration values. It then saves the configuration, creates the key and data areas, and creates a chain account key when the keyring has no key.

Initialization is a persistent action. Flags passed to init become the base configuration for future starts. The command also takes a store lock, so it cannot initialize a store that another node process has open.

The normal first-use sequence is:

  1. Choose bridge or light and a network.
  2. Choose a new or intended store with --node.store, or use the default path.
  3. Run init with any values that must persist.
  4. Save the displayed account mnemonic and address in a safe place.
  5. Start the node with start.

References: cmd/node.go• L16-67 cmd/init.go• L10-30 nodebuilder/init.go• L24-74 nodebuilder/init.go• L189-233

Startup and shutdown

celestia bridge start and celestia light start open the selected store and its keyring, apply start-time flags, and construct the requested node. The aliases run and daemon provide the same operation.

Startup flags override the stored values for that run only. Node startup and shutdown each use the configured time limit. The first SIGINT or SIGTERM starts a graceful stop. A later stop signal cancels the shutdown context and can force remaining components to close while the first shutdown is still in progress. This makes the command suitable for a service manager while still allowing an operator to interrupt a stuck startup or shutdown.

The life-cycle flow is:

flowchart LR
    A[Node type and network] --> B[Select store]
    B --> C[Load stored or external configuration]
    C --> D[Apply start-time overrides]
    D --> E[Open keyring and store]
    E --> F[Build node]
    F --> G[Start services]
    G --> H[Serve RPC and node work]
    H --> I[Receive stop signal]
    I --> J[Graceful shutdown]

References: cmd/start.go• L19-83 cmd/flags_node.go• L39-73 cmd/util.go• L110-159 nodebuilder/node.go• L101-167

Configuration changes

The command line has two different configuration actions. config-update adds values from the current defaults to an existing config.toml while preserving existing custom values. config-remove deletes the stored configuration but does not remove the rest of the store.

Use --node.config when a complete TOML file must come from outside the store. Otherwise the commands use config.toml in the selected store, or the defaults for the selected node mode when no stored configuration exists. Review the resulting file after config-update, because new default fields can change the behavior of a later start.

The configuration source and command action relate as follows:

ActionConfiguration effectStore effect
initBuilds and saves the selected profile.Creates the key and data areas.
startApplies temporary overrides in memory.Opens the existing store.
config-updateMerges new default fields into the saved file.Keeps node data and keys.
config-removeRemoves the saved file.Keeps node data and keys.

See Node configuration and operating modes for the full configuration model.

References: cmd/config.go• L10-56 cmd/flags_node.go• L21-73 nodebuilder/config.go• L53-145 nodebuilder/init.go• L77-124

RPC command access

The RPC-backed celestia groups are short-lived clients. A command creates a client for one request, calls the selected service, prints the result, and closes the client. The node daemon remains the owner of the service and its local state.

RPC client selection

RPC commands accept --url, --token, --timeout, and --node.store. The client combines these flags with local node discovery in a fixed order:

  • An explicit --token is used as supplied.
  • With no token, the command loads the selected store configuration when --node.store is set or when --url is absent. It uses the configured URL when no URL was supplied. If authentication is enabled, it also reads the store's JWT secret and creates a full-permission token.
  • With --url alone, the command uses that endpoint without local token lookup. A protected remote endpoint therefore needs an explicit --token.
  • When no store is given, local lookup tries to discover the store opened by a running node. If discovery cannot find one, provide --node.store.

The timeout applies to the RPC request context. A command therefore fails within the requested time instead of waiting without a bound for an endpoint that does not respond.

References: cmd/rpc.go• L25-52 cmd/rpc.go• L55-100 cmd/rpc.go• L102-132 cmd/rpc_test.go• L24-126 nodebuilder/…/blob.go• L33-38 nodebuilder/…/node.go• L17-22

Service command groups

The service groups expose the common operator actions without requiring a separate RPC client program. Read commands cover heads, sampling state, shares, blobs, peers, node information, and account state. Write commands include blob submission, peer control, log-level changes, and state transactions.

The command group does not change the service contract. It parses command arguments into the service's input types, then prints the service result or error. For method names, permission rules, subscriptions, and client use outside the shell, see RPC API contracts and clients.

References: nodebuilder/…/blob.go• L40-78 nodebuilder/…/header.go• L31-133 nodebuilder/…/share.go• L46-205 nodebuilder/…/p2p.go• L53-80 nodebuilder/…/node.go• L24-109 nodebuilder/…/state.go• L72-155

RPC authentication

RPC access uses permission-bearing JSON Web Tokens (JWTs). The top-level celestia ... auth command signs a token from the node's stored secret and accepts one of public, read, write, or admin permission levels. A time-to-live can limit how long the token remains valid.

The node permissions command asks a running node which permissions a token has. The node set-permissions command asks the node to sign a new token. These are different paths: the top-level auth command reads the local secret, while the node commands use the running node's RPC service.

Authentication can be disabled with the RPC configuration. This is an explicit open-access choice and should not be confused with a missing token, which limits a request to the public permission level.

References: cmd/auth.go• L23-80 cmd/auth.go• L91-126 nodebuilder/…/node.go• L69-110 nodebuilder/…/config.go• L37-56 nodebuilder/…/flags.go• L41-45

Key and transaction operations

The command tools separate key custody from transaction use. cel-key changes the keyring. celestia state selects a local signer and submits actions through the running node's state service. The private key stays local to the keyring; RPC callers pass a key name, signer address, or token rather than a private key.

Chain account keys

Node initialization creates a default chain account key only when the selected keyring is empty. The mnemonic and address shown during that step are the recovery material and public identity for the account. cel-key can then create, list, inspect, or remove keys in the same keyring family.

Keep key directories separate for different node modes and networks. A key created for one network is not a substitute for checking the account and configuration used by another network.

References: nodebuilder/init.go• L189-233 cmd/…/main.go• L19-59 cmd/…/node_types.go• L22-68 nodebuilder/…/keyring.go• L11-26

State transactions

celestia ... state provides account queries and chain actions such as transfers, delegation changes, reward withdrawal, and fee grants. Transaction flags choose the signer or key, gas and gas price, transaction priority, and an optional fee granter.

The command sends these choices to the node's state service. That service resolves the local key, prepares and signs the transaction, and uses the configured Core connection to submit it. A configured signer address takes priority over a key name when both are present. See Transaction submission and account state for the transaction and fee model.

References: nodebuilder/…/state.go• L26-70 nodebuilder/…/state.go• L127-155 nodebuilder/…/state.go• L412-460 nodebuilder/…/state.go• L472-547

Diagnostics and store workflows

Diagnostics fall into two groups. Runtime diagnostics use RPC or short-lived network clients while the node is active. Store diagnostics open persisted data directly and therefore need a stopped node unless the command explicitly uses an independent store.

Runtime diagnostics

The running-node commands give an operator a view of service health and control. node info returns administrative information. node log-level changes module log levels. header sync-state and das sampling-stats show progress. P2P commands show identity, peers, reachability, connection state, bandwidth, and pubsub membership.

The normal celestia start flags also support operational telemetry. Operators can enable pprof, metrics, tracing, or Pyroscope when they need profiles or exported measurements. The pprof endpoint is exposed on port 6000 when enabled.

cel-shed latency-monitor is an external service check. It submits and retrieves blobs through a Bridge node and exports latency and failure measurements to an OTLP metrics endpoint. It is useful for a network-level check rather than a local node state check. The monitor requires explicit Bridge access, Core gRPC access, a signing key, a network, and a metrics endpoint. It repeats the check until its process context ends.

References: nodebuilder/…/node.go• L24-66 nodebuilder/…/header.go• L104-117 nodebuilder/…/das.go• L20-33 nodebuilder/…/p2p.go• L53-108 cmd/flags_misc.go• L40-135 cmd/flags_misc.go• L166-264 cmd/…/latency_monitor.go• L23-93 cmd/…/latency_monitor.go• L95-140 cmd/…/latency_monitor.go• L151-226 cmd/…/latency_monitor.go• L229-291

Store reset operations

Store reset commands are recovery actions, not normal maintenance. Stop the node first, confirm the store path, and choose the smallest action that fixes the problem.

CommandPurposePreserved data
celestia ... unsafe-reset-storeRemove node data and recreate the empty data areas.Keystore and configuration.
cel-shed datastore erase <namespace>Remove one datastore namespace.Other namespaces, keys, and configuration.
cel-shed datastore erase-samplesRemove sampling and related sample data so the node can sample again without resyncing headers.Headers, keys, and configuration.
cel-shed header store-reset <path>Force the header-store head or tail to a chosen height.Other store areas.
cel-shed header store-recover <path>Find a usable header from a start height and reset the header tail to it.Other store areas.

The full node reset clears data areas according to node type. A Light node clears its data store. A Bridge node also clears block, transient, and index areas. The header commands change only header-store boundaries, so they are more targeted but also more sensitive to the chosen heights.

References: cmd/reset_store.go• L10-30 nodebuilder/init.go• L77-124 cmd/…/datastore.go• L27-60 cmd/…/datastore.go• L69-105 cmd/…/header.go• L27-94 cmd/…/header.go• L97-163

Data integrity checks

cel-shed eds-store ods-verify compares stored extended data square (EDS) files with the matching chain headers. It checks lookup by height and data hash, square size, data hash, and data-availability header roots. It reports mismatches and can try to repair a height-to-file mapping when the data-hash copy is correct and --fix is enabled.

The hash commands answer whether an EDS exists by its root hash and can print the stored value. The square command accepts a Core endpoint and block height. It builds an EDS and extended header from that signed Core block, prints the square width, and compares the raw block data hash with the computed data hash. These tools help separate bad stored data from a bad index or an upstream block view.

References: cmd/…/ods_verify.go• L22-40 cmd/…/ods_verify.go• L96-166 cmd/…/ods_verify.go• L170-229 cmd/…/ods_verify.go• L423-468 cmd/…/hash_presence.go• L20-55 cmd/…/hash_presence.go• L57-114 cmd/…/square.go• L21-68

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the bridge and light command trees aligned with the node types accepted by node assembly.
  • Preserve the boundary between flags saved by init and flags used only by start.
  • Keep store-path discovery, network-derived key paths, and RPC token lookup aligned so commands address the same node.
  • Keep RPC URL, token, store, timeout, service namespaces, client construction, output shape, and permission levels aligned across local and remote command use.
  • Keep the default account key name, cel-key backend and directory rules aligned with state transaction signer selection.
  • Mark every direct store edit as a stopped-node operation unless its storage isolation is explicit.
  • Keep reset scope visible when a store layout or node mode changes, especially for keys, config, headers, blocks, and indexes.
  • Keep integrity repair tools aligned with the data-hash and height indexes they validate.
  • Keep the square diagnostic's Core endpoint, block height, EDS construction, and hash comparison aligned with the current block format.
  • Keep docgen module discovery, receiver registration, and OpenRPC output aligned with the RPC service surface.
  • Keep version output fields and text/JSON formats stable for release checks and scripts.
  • Keep latency-monitor connection requirements and exported metric names aligned with its Bridge, Core, keyring, network, and OTLP consumers.
  • Keep blob-submit argument decoding aligned with its plain-text and 0x-prefixed hex input contract.

Important failure modes

TriggerConsequenceGuard
init, start, config changes, or reset runs while the store is open.The command cannot safely use or change the store.Stop the node and let the store lock pass to one operation.
start uses a different network or store from init.The node can load the wrong chain data, keys, or configuration.Pass the same node type, network, and store selection at both stages.
cel-key uses a keyring backend or directory that differs from the node's configured keyring.The operator can create or select a key that the node cannot use.Match the explicit backend and directory to the node configuration before managing keys.
The keyring has no usable configured signer.State and blob transactions cannot sign.Restore or create the expected key and check the selected key directory.
A protected remote endpoint is used with --url alone.The request has no local token and the endpoint can reject it with an authorization error.Supply --token, or add --node.store so the command can load the store secret.
An RPC command cannot find a URL or local store.The command cannot create a client or reach the node.Set --url and --node.store explicitly when local discovery is not reliable.
RPC authentication is disabled on a reachable endpoint.All RPC permissions are exposed to callers of that endpoint.Treat --rpc.skip-auth as an explicit security exception.
A state transaction has the wrong signer, fee, or gas settings.The chain rejects the transaction or a different account pays.Check signer precedence, fee-granter rights, gas price, and transaction options.
A store reset uses a broad command when a narrow repair was needed.Recoverable local data is removed.Prefer namespace, sample, header, or integrity repair before unsafe-reset-store.
Header repair uses the wrong head, tail, or start height.Header sync can resume from an invalid boundary or lose available history.Verify the target height against the chain and inspect the result before restart.
ODS verification finds mismatches and runs without --fix.The command reports the problem but does not repair a height index.Use --fix only after confirming the data-hash copy is the source of truth.
The square diagnostic uses an invalid Core endpoint or block height.It cannot fetch the signed block and compare the data hashes.Use a reachable Core gRPC endpoint and an existing height.
The latency monitor receives invalid blob or size counts.It stops before it can measure the service.Use positive values for --num-blobs and --blob-size.
The latency monitor has incomplete endpoint, key, network, or metrics settings.It cannot build its client or export its measurements.Provide all required connection, signing, network, and OTLP flags.
A script requests an unsupported celestia version --output value.The command exits without build information.Use text or json only.
Node startup or shutdown exceeds its configured time limit.The operation returns a timeout and may leave lifecycle work unwinding.Set realistic startup and shutdown limits, then inspect the returned cause before retrying.
blob submit receives a value that is mistaken for hex.The command submits bytes that differ from the operator's intended blob data.Use the 0x prefix for hex input; otherwise the value is submitted as plain text.

Key files

FileWhy to read it
cmd/…/main.goDefines the top-level celestia command and its node-mode branches.
cmd/…/version.goDefines build information output for release and runtime checks.
cmd/…/docgen.goGenerates the OpenRPC description of the public node service surface.
cmd/node.goShows the shared Bridge and Light command setup.
cmd/init.goDefines persistent node-store initialization.
cmd/start.goDefines store opening, start-time overrides, signal handling, and lifecycle entry.
cmd/util.goShows how command flags become node type, network, store, and configuration.
cmd/rpc.goDefines RPC URL, token, store discovery, and timeout behavior.
cmd/rpc_test.goVerifies local and remote URL, token, store, and authentication combinations.
cmd/auth.goDefines local JWT creation and permission levels.
cmd/…/main.goDefines the key utility client context, backend default, and keyring entry point.
cmd/…/node_types.goDefines network and node-type directory selection for keys.
cmd/…/main.goDefines the diagnostic command root and signal-aware command context.
cmd/…/latency_monitor.goDefines the external blob latency check and OTLP metrics output.
cmd/…/datastore.goDefines targeted datastore erase workflows.
cmd/…/header.goDefines header-store reset and recovery workflows.
cmd/…/ods_verify.goDefines EDS integrity checks and height-index repair.
cmd/…/square.goDefines the Core block to EDS and extended-header comparison diagnostic.
cmd/…/blob_test.goShows the command-level blob submission contract for plain text and 0x-prefixed hex data.
nodebuilder/init.goDefines store creation, key creation, locking, and broad reset scope.
nodebuilder/config.goDefines durable configuration load, save, update, and removal.
nodebuilder/…/config.goDefines RPC endpoint and authentication defaults.
nodebuilder/…/state.goDefines account and transaction command options.
nodebuilder/node.goDefines node assembly and bounded start and stop behavior.