1

Parity has had a command line option for running a node using configuration parameters sourced from a configuration file.

I was wondering as to how one does similar with a Geth node?

Thomas Clowes
  • 4,385
  • 2
  • 19
  • 43

1 Answers1

2

As outlined in this blog post, as of Geth 1.6 there is support for specifying configuration parameters for your node in an external .toml configuration file.

You can generate a configuration file by using a command such as the below:

geth --fast --rpc --rpccorsdomain="https://yourdomain.com" --rpcapi eth,web3 dumpconfig

The dumpconfig parameter will result in the apropriate configuration being outputted to your terminal.

Alternatively you can direct this output directly to a file.

geth --fast --rpc --rpccorsdomain="https://yourdomain.com" --rpcapi eth,web3 dumpconfig > config.toml

At this point you can run your node by simply executing geth --config config.toml

I use this such that I can have a config file for my Mainnet and Ropsten nodes which can easily be instantiated with a simple command.

Thomas Clowes
  • 4,385
  • 2
  • 19
  • 43