Skip to main content

Overview

This page provides a comprehensive reference for all command-line flags available in the tomo command. Flags are organized by category for easy navigation.

General Settings

datadir
string
default:"~/.tomo"
Data directory for the databases and keystore. This is where all blockchain data, accounts, and node configuration are stored.
tomo --datadir /custom/path
keystore
string
default:"<datadir>/keystore"
Directory for the keystore. By default, keystores are stored inside the datadir.
tomo --keystore /secure/keystore
identity
string
Custom node name to identify your node on the network.
tomo --identity "MyVictionNode"
networkid
integer
default:"89"
Network identifier (integer, 89=Viction Mainnet).
tomo --networkid 89
tomo-testnet
boolean
Connect to the Viction test network.
tomo --tomo-testnet

Account Management

unlock
string
Comma-separated list of accounts to unlock at startup. Can be addresses or account indices.
tomo --unlock "0xAddress1,0xAddress2"
password
string
Password file to use for non-interactive password input. File should contain one password per line.
tomo --password /path/to/password.txt

Sync Modes

syncmode
string
default:"fast"
Blockchain sync mode: “fast”, “full”, or “light”.
  • fast: Downloads blocks and states, validates recent transactions
  • full: Downloads all blocks and executes all transactions
  • light: Downloads block headers only
tomo --syncmode fast
fast
boolean
Enable fast syncing through state downloads (shorthand for —syncmode fast).
tomo --fast
light
boolean
Enable light client mode.
tomo --light
gcmode
string
default:"full"
Blockchain garbage collection mode: “full” or “archive”.
  • full: Prunes old state data (recommended)
  • archive: Keeps all historical state data
tomo --gcmode archive

Network Settings

port
integer
default:"30303"
Network listening port for P2P connections.
tomo --port 30303
maxpeers
integer
default:"25"
Maximum number of network peers. Set to 0 to disable networking.
tomo --maxpeers 50
maxpendpeers
integer
default:"0"
Maximum number of pending connection attempts. Defaults are used if set to 0.
tomo --maxpendpeers 10
bootnodes
string
Comma-separated enode URLs for P2P discovery bootstrap.
tomo --bootnodes "enode://node1@ip1:port1,enode://node2@ip2:port2"
bootnodesv4
string
Comma-separated enode URLs for P2P v4 discovery bootstrap.
tomo --bootnodesv4 "enode://..."
bootnodesv5
string
Comma-separated enode URLs for P2P v5 discovery bootstrap.
tomo --bootnodesv5 "enode://..."
nodekey
string
P2P node key file path.
tomo --nodekey /path/to/nodekey
nodekeyhex
string
P2P node key as hex (for testing purposes).
tomo --nodekeyhex "0x..."
nat
string
default:"any"
NAT port mapping mechanism: any, none, upnp, pmp, extip:<IP>.
tomo --nat "extip:1.2.3.4"
nodiscover
boolean
Disables the peer discovery mechanism (manual peer addition only).
tomo --nodiscover
v5disc
boolean
Enables the experimental RLPx V5 (Topic Discovery) mechanism.
tomo --v5disc
netrestrict
string
Restricts network communication to the given IP networks (CIDR masks).
tomo --netrestrict "192.168.0.0/16,10.0.0.0/8"

RPC Settings

rpc
boolean
Enable the HTTP-RPC server.
tomo --rpc
rpcaddr
string
default:"127.0.0.1"
HTTP-RPC server listening interface.
tomo --rpc --rpcaddr 0.0.0.0
rpcport
integer
default:"8545"
HTTP-RPC server listening port.
tomo --rpc --rpcport 8545
rpcapi
string
API modules offered over the HTTP-RPC interface. Comma-separated list.Available modules: eth, net, web3, personal, admin, debug, miner, txpool
tomo --rpc --rpcapi "eth,net,web3"
rpccorsdomain
string
Comma-separated list of domains from which to accept cross-origin requests (browser enforced).
tomo --rpc --rpccorsdomain "https://example.com"
rpcvhosts
string
default:"localhost"
Comma-separated list of virtual hostnames from which to accept requests (server enforced). Accepts ’*’ wildcard.
tomo --rpc --rpcvhosts "*"
rpctimeout
integer
default:"120"
Timeout for RPC HTTP handlers in seconds.
tomo --rpc --rpctimeout 300

WebSocket Settings

ws
boolean
Enable the WebSocket-RPC server.
tomo --ws
wsaddr
string
default:"127.0.0.1"
WebSocket-RPC server listening interface.
tomo --ws --wsaddr 0.0.0.0
wsport
integer
default:"8546"
WebSocket-RPC server listening port.
tomo --ws --wsport 8546
wsapi
string
API modules offered over the WebSocket-RPC interface.
tomo --ws --wsapi "eth,net,web3"
wsorigins
string
Origins from which to accept WebSocket requests.
tomo --ws --wsorigins "*"

IPC Settings

ipcdisable
boolean
Disable the IPC-RPC server.
tomo --ipcdisable
ipcpath
string
Filename for IPC socket/pipe within the datadir (explicit paths escape it).
tomo --ipcpath /custom/path/tomo.ipc

Staking/Mining Settings

mine
boolean
Enable staking (masternode block creation).
tomo --mine
minerthreads
integer
default:"1"
Number of CPU threads to use for staking.
tomo --minerthreads 4
etherbase
string
default:"0"
Public address for block mining rewards (default = first account created).
tomo --etherbase 0xYourMasternodeAddress
gasprice
integer
Minimal gas price to accept for mining a transaction (in Wei).
tomo --gasprice 250000000
targetgaslimit
integer
Target gas limit sets the artificial target gas floor for blocks to mine.
tomo --targetgaslimit 84000000

Transaction Pool Settings

txpool.nolocals
boolean
Disables price exemptions for locally submitted transactions.
tomo --txpool.nolocals
txpool.journal
string
default:"transactions.rlp"
Disk journal for local transaction to survive node restarts.
tomo --txpool.journal /path/to/transactions.rlp
txpool.rejournal
duration
default:"1h"
Time interval to regenerate the local transaction journal.
tomo --txpool.rejournal 30m
txpool.pricelimit
integer
default:"1"
Minimum gas price limit to enforce for acceptance into the pool.
tomo --txpool.pricelimit 1
txpool.pricebump
integer
default:"10"
Price bump percentage to replace an already existing transaction.
tomo --txpool.pricebump 10
txpool.accountslots
integer
default:"16"
Minimum number of executable transaction slots guaranteed per account.
tomo --txpool.accountslots 32
txpool.globalslots
integer
default:"4096"
Maximum number of executable transaction slots for all accounts.
tomo --txpool.globalslots 8192
txpool.accountqueue
integer
default:"64"
Maximum number of non-executable transaction slots permitted per account.
tomo --txpool.accountqueue 128
txpool.globalqueue
integer
default:"1024"
Maximum number of non-executable transaction slots for all accounts.
tomo --txpool.globalqueue 2048
txpool.lifetime
duration
default:"3h"
Maximum amount of time non-executable transactions are queued.
tomo --txpool.lifetime 6h

Performance Tuning

cache
integer
default:"1024"
Megabytes of memory allocated to internal caching (min 16MB / database forced).
tomo --cache 4096
cache.database
integer
default:"75"
Percentage of cache memory allowance to use for database I/O.
tomo --cache.database 50
cache.gc
integer
default:"25"
Percentage of cache memory allowance to use for trie pruning.
tomo --cache.gc 50

TomoX (DEX) Settings

tomox
boolean
Enable the TomoX protocol.
tomo --tomox
tomox.datadir
string
default:"<datadir>/tomox"
Data directory for the TomoX databases.
tomo --tomox --tomox.datadir /custom/tomox/path
tomox.dbengine
string
default:"leveldb"
Database engine for TomoX: “leveldb” or “mongodb”.
tomo --tomox --tomox.dbengine mongodb
tomox.dbName
string
default:"tomodex"
Database name for TomoX.
tomo --tomox --tomox.dbName mydex
tomox.dbConnectionUrl
string
default:"localhost:27017"
Connection URL to database if dbEngine is mongodb. Format: Host:port. Multiple instances separated by comma.
tomo --tomox --tomox.dbConnectionUrl "localhost:27017,localhost:27018"
tomox.dbReplicaSetName
string
Replica set name if Master-Slave MongoDB setup is used.
tomo --tomox --tomox.dbReplicaSetName "rs0"

Console Settings

jspath
string
default:"."
JavaScript root path for loadScript in the console.
tomo console --jspath /path/to/scripts
exec
string
Execute JavaScript statement and exit (non-interactive mode).
tomo console --exec "eth.blockNumber"
preload
string
Comma-separated list of JavaScript files to preload into the console.
tomo console --preload "script1.js,script2.js"

Logging and Monitoring

ethstats
string
Reporting URL of an ethstats service. Format: nodename:secret@host:port
tomo --ethstats "mynode:[email protected]:443"
metrics
boolean
Enable metrics collection and reporting.
tomo --metrics
metrics.expensive
boolean
Enable expensive metrics collection and reporting.
tomo --metrics --metrics.expensive
metrics.addr
string
default:"127.0.0.1"
Enable stand-alone metrics HTTP server listening interface.
tomo --metrics --metrics.addr 0.0.0.0
metrics.port
integer
default:"6060"
Metrics HTTP server listening port.
tomo --metrics --metrics.port 6060

Advanced Settings

lightkdf
boolean
Reduce key-derivation RAM & CPU usage at some expense of KDF strength.
tomo account new --lightkdf
announce-txs
boolean
Always commit transactions immediately.
tomo --announce-txs
store-reward
boolean
Store reward information to file.
tomo --store-reward
rollback
string
Rollback chain to specified block hash.
tomo --rollback 0xBlockHash
rewound
integer
default:"0"
Number of blocks to rewind from the current head.
tomo --rewound 100
reexec
integer
default:"256"
Number of blocks to re-execute during state regeneration.
tomo --reexec 512
vmdebug
boolean
Record information useful for VM and contract debugging.
tomo --vmdebug

Whisper Settings

shh
boolean
Enable Whisper protocol.
tomo --shh
shh.maxmessagesize
integer
default:"1048576"
Maximum message size accepted (in bytes).
tomo --shh --shh.maxmessagesize 2097152
shh.pow
float
default:"0.2"
Minimum POW (Proof of Work) accepted.
tomo --shh --shh.pow 0.5

Common Flag Combinations

Full Masternode Setup

tomo \
  --datadir /data/viction \
  --networkid 89 \
  --port 30303 \
  --rpc \
  --rpcaddr 0.0.0.0 \
  --rpcport 8545 \
  --rpcapi eth,net,web3 \
  --ws \
  --wsaddr 0.0.0.0 \
  --wsport 8546 \
  --wsapi eth,net,web3 \
  --etherbase 0xYourAddress \
  --mine \
  --unlock 0xYourAddress \
  --password /secure/password.txt \
  --maxpeers 50 \
  --cache 4096

Testnet Node

tomo \
  --tomo-testnet \
  --datadir /data/testnet \
  --rpc \
  --rpcapi eth,net,web3,personal \
  --ws \
  --wsapi eth,net,web3

Archive Node

tomo \
  --gcmode archive \
  --syncmode full \
  --cache 8192 \
  --datadir /large/storage/viction

Light Client

tomo \
  --light \
  --rpc \
  --rpcapi eth,net,web3

See Also

Build docs developers (and LLMs) love