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?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
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
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.