I'm using Truffle v4.0.1 (core: 4.0.1) with the default configuration (ganache-cli aka TestRPC) on Ubuntu and it works fine, but I'd like to use the Ganache GUI. However, I can't find any instructions on how to configure them to work together. The Truffle documentation has a nice page explaining what it is and how it install and configure it, but not how to configure Truffle to take advantage of it. Thanks!

  • 1
    always feel free to make a PR to the official docs instead of just posting a self answered question here. thanks!
    – 0TTT0
    Commented Feb 20, 2018 at 18:42
  • nice. can we bind ganache server to public ip of my instance, to access it from anywhere.
    – Harsh
    Commented May 31, 2018 at 7:58

2 Answers 2


You'll need to add a development section to the networks section in your project's truffle.js:

module.exports = {
  networks: {
    development: {
      host: "localhost",
      port: 7545,
      network_id: "5777"

Make sure you get the port and network ID correct. Those are the defaults, so if you change them in Ganache you will need to change them here as well.

To use this specified network, after building the contract files, you'd use the command

truffle migrate --network development
  • I tried doing this and failed. Maybe there is bitrot. I found that editing truffle.js made no difference, and I had to edit the client js in the truffle library to get it to use the right port. Commented Jan 23, 2018 at 19:40
  • my transactions are failing though. Calling a setter is throws Error: connection not open
    – srinivas
    Commented Apr 26, 2020 at 11:35

Download ganache from https://truffleframework.com/ganache/

Open Terminal from your ganache file directory. Type the following and enter.

chmod a+x ganacheVersion.AppImage

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.