I have a ganache-cli running on an ec2 instance but everytime I restart the ganache-cli the contracts go missing. I have specified a db, a id and also the precious mnemonic and it still is the same.

This is the command I use.

ganache-cli -h localhost -p 7545 -db C:\Apps\ganacheDb -m "myth like bonus scare over problem client lizard pioneer submit female collect"
-i  1582605308235

Can someone help me?

  • Suggestion: Try to run ganache-cli locally on your machine, then close it, then run it again. If the problem at hand is solved, then your actual problem is in the configuration of the remote EC2 machine. If the problem at hand persists, then your problem is indeed in the configuration of the ganache-cli process. Feb 26, 2020 at 11:34
  • Yes I have tried it on my local machine and it still is the same.
    – vteja711
    Feb 26, 2020 at 13:27
  • Good, so now you (we) can investigate the problem on a local machine. Feb 26, 2020 at 13:35
  • @goodvibration looks like the solution by Xavier is perfect and it was just a simple mistake on my part
    – vteja711
    Feb 26, 2020 at 14:02
  • OK, so here is the full guide, just in case you need to for future reference. Feb 26, 2020 at 14:10

1 Answer 1


It is --db.

Note the double -.

  • 1
    Such a simple mistake and has been eating my head for almost 2 days. Lol!
    – vteja711
    Feb 26, 2020 at 14:00

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.