Skip to main content
Version: 0.15.0

Configuring Juno

Juno can be configured using several methods, with the following order of precedence:

  1. Command line parameters (flags)
  2. Environment variables
  3. Configuration file

Command line params

Juno can be configured directly on the command line by prefixing -- to each option name:

./build/juno --http --http-port 6060 --http-host 0.0.0.0 --eth-node <YOUR-ETH-NODE>

When using Docker, append the command line parameters after the image name to configure Juno:

docker run nethermind/juno --http --http-port 6060 --http-host 0.0.0.0 --eth-node <YOUR-ETH-NODE>
tip

Command line parameters override environment variables and configuration file.

Environment variables

Juno can be configured through environment variables by prefixing the variable names with JUNO_ and using the configuration options in SCREAMING_SNAKE_CASE format.

To set the http, http-port, and http-host configurations, Juno should be run in this format:

JUNO_HTTP=true JUNO_HTTP_PORT=6060 JUNO_HTTP_HOST=0.0.0.0 JUNO_ETH_NODE=<YOUR-ETH-NODE> ./build/juno

When using Docker, start Juno using the -e command option:

docker run \
-e "JUNO_HTTP=true JUNO_HTTP_PORT=6060 JUNO_HTTP_HOST=0.0.0.0 JUNO_ETH_NODE=<YOUR-ETH-NODE>" \
nethermind/juno
tip

Environment variables rank second in configuration precedence. Command line parameters override environment variables.

Configuration file

Juno can be configured using a YAML file:

Sample YAML File
log-level: info
network: mainnet
http: true
http-port: 6060
metrics: true
metrics-port: 9090
eth-node: <YOUR-ETH-NODE>

To run Juno with a configuration file, use the config option to specify the path of the configuration file:

# Standalone binary
./build/juno --config <CONFIG FILE PATH>

# Docker container
docker run nethermind/juno --config <CONFIG FILE PATH>
info

By default, Juno looks for the configuration file in the $XDG_CONFIG_HOME directory.

tip

Configuration file rank third in configuration precedence. Command line parameters and environment variables override configuration file.

Configuration options

To list all available command line options, you can use the --help parameter:

# Standalone binary
./build/juno --help

# Docker container
docker run nethermind/juno --help

Below is a list of all configuration options available in Juno, along with their default values and descriptions:

Config OptionDefault ValueDescription
cn-core-contract-addressCustom network core contract address.
cn-feeder-urlCustom network feeder URL.
cn-gateway-urlCustom network gateway URL.
cn-l1-chain-idCustom network L1 chain id.
cn-l2-chain-idCustom network L2 chain id.
cn-nameCustom network name.
cn-unverifiable-range0,100Custom network range of blocks to skip hash verifications (e.g. 0,100).
colourtrueUse --colour=false command to disable colourized outputs (ANSI Escape Codes).
configThe YAML configuration file.
db-cache-size1024Determines the amount of memory (in megabytes) allocated for caching data in the database.
db-compaction-concurrencyDB compaction concurrency range. Format: N (lower=1, upper=N) or M,N (lower=M, upper=N). Default: 1,GOMAXPROCS/2
db-compression"snappy"Database compression profile. Options: snappy, zstd, minlz. Use zstd for low storage.
db-max-handles1024A soft limit on the number of open files that can be used by the DB
db-memtable-size256Determines the amount of memory (in MBs) allocated for database memtables.
db-pathpath to your db locationLocation of the database files.
disable-l1-verificationDisables L1 verification since an Ethereum node is not provided.
disable-rpc-batch-requestsDisables handling of batched RPC requests.
eth-nodeWebSocket endpoint of the Ethereum node. To verify the correctness of the L2 chain, Juno must connect to an Ethereum node and parse events in the Starknet contract.
grpcEnable the HTTP gRPC server on the default port.
grpc-host"localhost"The interface on which the gRPC server will listen for requests.
grpc-port6064The port on which the gRPC server will listen for requests.
gw-api-keyAPI key for gateway endpoints to avoid throttling
gw-timeouts"5s"Timeouts for requests made to the gateway. Can be specified in three ways: - Single value (e.g. '5s'): After each failure, the timeout will increase dynamically. - Comma-separated list (e.g. '5s,10s,20s'): Each value will be used in sequence after failures. - Single value with trailing comma (e.g. '5s,'): Uses a fixed timeout without dynamic adjustment.
helphelp for juno
httpEnables the HTTP RPC server on the default port and interface.
http-host"localhost"The interface on which the HTTP RPC server will listen for requests.
http-port6060The port on which the HTTP server will listen for requests.
http-update-host"localhost"The interface on which the log level and gateway timeouts HTTP server will listen for requests.
http-update-portThe port on which the log level and gateway timeouts HTTP server will listen for requests.
log-level"info"Options: trace, debug, info, warn, error.
max-vm-queue72Maximum number for requests to queue after reaching max-vms before starting to reject incoming requests
max-vms36Maximum number for VM instances to be used for RPC calls concurrently
metricsEnables the Prometheus metrics endpoint on the default port.
metrics-host"localhost"The interface on which the Prometheus endpoint will listen for requests.
metrics-port9090The port on which the Prometheus endpoint will listen for requests.
networkmainnetOptions: mainnet, sepolia, sepolia-integration.
p2pEXPERIMENTAL: Enables p2p server.
p2p-addrEXPERIMENTAL: Specify p2p listening source address as multiaddr. Example: /ip4/0.0.0.0/tcp/7777
p2p-feeder-nodeEXPERIMENTAL: Run juno as a feeder node which will only sync from feeder gateway and gossip the new blocks to the network.
p2p-peersEXPERIMENTAL: Specify list of p2p peers split by a comma. These peers can be either Feeder or regular nodes.
p2p-private-keyEXPERIMENTAL: Hexadecimal representation of a private key on the Ed25519 elliptic curve.
p2p-public-addrEXPERIMENTAL: Specify p2p public address as multiaddr. Example: /ip4/35.243.XXX.XXX/tcp/7777
pending-poll-interval1sSets polling interval for pending block updates before starknet v0.14.0;for pre_latest block updates from starknet v0.14.0 onward.(0s will disable polling).
plugin-pathPath to the plugin .so file
pprofEnables the pprof endpoint on the default port.
pprof-host"localhost"The interface on which the pprof HTTP server will listen for requests.
pprof-port6062The port on which the pprof HTTP server will listen for requests.
preconfirmed-poll-interval500msSets how frequently pre_confirmed block will be updated(0s will disable fetching of pre_confirmed block).
readiness-block-tolerance6Maximum blocks behind latest for /ready endpoints to return 200 OK
remote-dbgRPC URL of a remote Juno node
rpc-call-max-gas100000000Maximum number of Sierra gas to be executed in starknet_call requests
rpc-call-max-steps4000000Maximum number of steps to be executed in starknet_call requests
rpc-cors-enableEnable CORS on RPC endpoints
rpc-max-block-scan18446744073709551615Maximum number of blocks scanned in single starknet_getEvents call
seq-block-time60Time to build a block, in seconds
seq-disable-feesSkip charge fee for sequencer execution
seq-enableEnables sequencer mode of operation
seq-genesis-filePath to the genesis file
submitted-transactions-cache-entry-ttl5m0sTime-to-live for each entry in the submitted transactions cache
submitted-transactions-cache-size10000Maximum number of entries in the submitted transactions cache
transaction-combined-layoutEXPERIMENTAL: Enable combined (per-block) transaction storage layout. Once enabled, cannot be disabled.
versionversion for juno
versioned-constants-fileUse custom versioned constants from provided file
wsEnables the WebSocket RPC server on the default port.
ws-host"localhost"The interface on which the WebSocket RPC server will listen for requests.
ws-port6061The port on which the WebSocket server will listen for requests.

Subcommands

Juno provides several subcommands to perform specific tasks or operations. Here are the available ones:

  • genp2pkeypair: Generate a private key pair for p2p.
  • db: Perform database-related operations
    • db info: Retrieve information about the database.
    • db size: Calculate database size information for each data type.
    • db revert: Reverts the database to a specific block number.

To use a subcommand, append it when running Juno:

# Running a subcommand
./build/juno <subcommand>

# Running the genp2pkeypair subcommand
./build/juno genp2pkeypair

# Running the db info subcommand
./build/juno db info