# How to specify the default account, public and private keys for the flow emulator?

**URL:** <https://forum.flow.com/t/how-to-specify-the-default-account-public-and-private-keys-for-the-flow-emulator/1627>\
**Category:** Uncategorized\
**Created:** [April 1, 2021, 7:03pm UTC](https://forum.flow.com/t/how-to-specify-the-default-account-public-and-private-keys-for-the-flow-emulator/1627 "2021-04-01T19:03:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amazedsaint](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/amazedsaint/32/391_2.png) [@amazedsaint](https://forum.flow.com/u/amazedsaint)\
**Post date:** [April 1, 2021, 7:03pm UTC](https://forum.flow.com/t/how-to-specify-the-default-account-public-and-private-keys-for-the-flow-emulator/1627/1 "2021-04-01T19:03:02Z")

</div>

Struggling a little bit to figure out how to specify the public and private keys and account address for the default service account when I’m using flow emulator.

If I do a ‘flow project start-emulator’ - the default service account is created with this message

`'Using service account 0xf8d6e0586b0a20c7 serviceAddress=f8d6e0586b0a20c7 serviceHashAlgo=SHA3_256 servicePrivKey=bf9db4706c2fdb9011ee7e170ccac492f05427b96ab41d8bf2d8c58443704b76 servicePubKey=c8e020c9ddd636cdf82084958914610af86099c3e69c58b53994fdfe537673a261c71b2bcabdf2e5ed7d6bb4113dfe9762ce77adc4108e538d8488d1d4c90b1e serviceSigAlgo=ECDSA_P256'` -

Am I supposed to use the given private key in the flow.json file?

---

<div class="post-metadata">

**Author:** ![strikerjax](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@strikerjax](https://forum.flow.com/u/strikerjax)\
**Post date:** [April 4, 2021, 4:55am UTC](https://forum.flow.com/t/how-to-specify-the-default-account-public-and-private-keys-for-the-flow-emulator/1627/2 "2021-04-04T04:55:03Z")

</div>

Step 1 - Flow project init //creates flow.json  
Step 2 - Flow project start-emulator  
Step 3 - Flow keys generate  
Step 4 - flow accounts create --key=“Public\_KEY” //use the public key from Step 3  
Step 5 - flow transactions status //tx-id from emulator run - command line

//when you create the flow.json it will fill in the service account  
flow.json  
{  
“emulators”: {  
“default”: {  
“port”: 3569,  
“serviceAccount”: “emulator-account”  
}  
},  
“contracts”: {  
“ExampleNFT”: “Nft.cdc”  
},  
“networks”: {  
“emulator”: {  
“host”: “127.0.0.1:3569”,  
“chain”: “flow-emulator”  
}  
},  
“accounts”: {  
“emulator-account”: {   
“address”: “xxxxxxx”,  
“keys”: "xxxxx ",  
“chain”: “flow-emulator”  
}  
},  
“deployments”: {   
“emulator”: {  
“emulator-account”: [“ExampleNFT”]  
}   
}  
}
