LinuxCommandLibrary

ganache

TLDR

Start Ganache CLI

$ ganache
copy
Start on specific port
$ ganache -p [8545]
copy
Start with specific accounts
$ ganache -a [20]
copy
Start with mnemonic
$ ganache -m "[word1 word2 ... word12]"
copy
Fork mainnet
$ ganache -f [https://mainnet.infura.io/v3/KEY]
copy
Start with deterministic accounts
$ ganache -d
copy

SYNOPSIS

ganache [options]

DESCRIPTION

Ganache is a personal Ethereum blockchain for development. It simulates full client behavior, providing instant transaction mining, configurable accounts, and blockchain forking.
Developers use Ganache to test smart contracts locally before deploying to testnets or mainnet. It integrates with Truffle, Hardhat, and other development frameworks.

PARAMETERS

-p, --port port

Port to listen on (default 8545).
-h, --host host
Hostname (default 127.0.0.1).
-a, --accounts num
Number of accounts to generate.
-e, --defaultBalanceEther amount
Default account balance.
-m, --mnemonic phrase
BIP39 mnemonic for HD wallet.
-d, --deterministic
Generate deterministic addresses.
-f, --fork url
Fork from network at URL.
-b, --blockTime seconds
Block time for mining.
-g, --gasLimit limit
Block gas limit.
--chain.chainId id
Chain ID.

CAVEATS

Not for production. Behavior may differ from mainnet. State is lost on restart (use --database.dbPath for persistence). Forking requires archive node access.

HISTORY

Ganache was developed by Truffle Suite (now part of Consensys). It evolved from TestRPC and was renamed Ganache around 2017. The current version (Ganache 7+) is a complete rewrite supporting forking and improved compatibility.

SEE ALSO

hardhat(1), truffle(1), geth(1)

Copied to clipboard