I am running a testnet on Ganache UI. But when I deploy a contract and close and reopen ganache, there are no blocks and the contract deployment is gone. Is it possible to save/load a blockchain through ganache UI?

I know how to save a blockchain in ganache-cli. But ganache-cli and ganache UI seem to be different and I can't connect them to each other.

I would like to save my blockchain within ganache UI.

2 Answers 2


You should use Ganache GUI's 'Workspace' feature. Workspace stores the current state of the chain even after restarting ganache or even the system.

To create a new workspace:

  1. Open up Ganache GUI.
  2. Click on 'New Workspace'.
  3. Enter the Workspace's name and configure settings as per your needs.
  4. Click 'Save Workspace'.
  5. The next time you open up Ganache GUI, select your required workspace from the list.

Your blockchain's state would remain intact.


Try using the command with the --db param, which will save the blockchain to a path, and load that up on next run. You can make an empty directory for the first run.

$ mkdir /path/to/blockchain 
$ ganache-cli --db /path/to/blockchain

See more details in the docs.

  • Sorry for not writing clear. I want to save the blockchain within ganache UI. In ganache-cli I already know how it works :)
    – dkb
    Jun 17, 2018 at 13:35
  • Hmm, I tried passing this same command to the app via the command line like so /Applications/Ganache.app/Contents/MacOS/Ganache --db /path/to/chain, but the program isn't finding the local chain. Also, I dug through the settings and don't see any save options. I know it's a bit of a hack, but I was able to connect the Mist UI to ganache-cli with ` /Applications/Mist.app/Contents/MacOS/Mist --rpc localhost:8545`, which gives me some (albeit slightly different) UI features.
    – Ann Kilzer
    Jun 17, 2018 at 14:25
  • There is ganache-cli, which is former testrpc, but also Ganache, which you can download here: truffleframework.com/ganache. While Ganache-cli runs on command tool only, Ganache offers an UI where you can see the addresses, transactions and more. That's why I wanted to use Ganache with UI. But it seems like there you can't save the blockchain, instead, every time you start the program everything is "clean". In ganache-cli you can save the blockchain, I know. Thanks!
    – dkb
    Jun 18, 2018 at 10:49
  • Right, in the command above, I am calling the UI Ganache and passing in the parameters. Running the UI app via the command line is possible in Mac OS X.
    – Ann Kilzer
    Jun 18, 2018 at 15:34
  • Ah ok, that's it :-D. I can't load UI Ganache through command line. I use Windows 10.
    – dkb
    Jun 20, 2018 at 10:11

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.