when I am trying to run this command on geth console.it give an error.how to run this command on geth console.

run geth with this commnad

 geth --port 5000 --networkid 58342  --datadir="" --rpc --rpcport 8545 --rpcaddr --rpccorsdomain "*" --rpcapi "eth,net,web3" --testnet

web3.eth.accounts.create(); TypeError: 'create' is not a function at :1:1

  • 1
    There is no create function for eth , do you want to create a account? Aug 30, 2017 at 7:42

3 Answers 3


I think you need to load personal library --rpcapi "eth,net,web3,personal" and i don't thin using --datadir="" is a good idea.

 geth --port 5000 --networkid 58342   --rpc --rpcport 8545 --rpcaddr --rpccorsdomain "*" --rpcapi "eth,net,web3,personal" --testnet

Try to use personal.newAccount('passphrase')

and use rpcapi="eth,personal,miner,web3"

(1) First start your geth
geth --port 5000 --networkid 58342 --datadir="" --rpc --rpcport 8545 --rpcaddr --rpccorsdomain "*" --rpcapi "eth,personal,net,web3" --testnet

(2) Now Open Ethereum's Javascript console
geth attach ipc

(3) Create new address


There are atleast 3 methods to create account:

method 1: with geth directly ( without geth javascript console )

geth --datadir node1/ account new --password "your password"

method 2: for javascript console.

attach to node with

geth attach node1/geth.ipc

then at console

personal.newAccount('your password')

method 3: with web3.js (also .py, .go, .dart etc. are available )

const Web3=require('web3')
const web3 = new Web3("http://localhost:8546"); // rpc: node 1

accountDetails= web3.eth.accounts.create() // or web3.eth.accounts.create('password') or web3.eth.accounts.create(web3.utils.randomHex(32))


all above 3 methods works perfectly with blockchain made with geth (go-ethereum ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.