How is the truffle port set when one runs truffle unbox react and then truffle develop ?

The documentation states that the default port is 9545 (https://trufflesuite.com/docs/truffle/getting-started/using-truffle-develop-and-the-console.html), but the port specified in the downloaded truffle-config.js is 8545, which is supposed to be the default port when Ganache is the client.

I also noticed that the default port specified here :


is 8545:


 // Fallback to localhost; use dev console port by default...
      else {
         const provider = new Web3.providers.HttpProvider(

Can someone help shed light on this ?

2 Answers 2


truffle develop spins up a specially configured ganache to interact with the truffle console. This is on purpose run on a different port (9545) to not conflict with the default ganache port 8545, see https://github.com/trufflesuite/ganache-cli-archive).

  • Thx, I didn't know it ran ganache internally. Do you know why when I run truffle develop it states : Truffle Develop started at instead of : Truffle Develop started at ?
    – femibyte
    Jan 17, 2022 at 18:17

Ok, so the way I got it to start up on port 9545 was to modify the truffle-config.js. The default file generated when I ran truffle unbox react had these lines:

 networks: {
   develop: {
     port: 8545

Contrary to the documentation, it does seem like truffle develop results in this file being read.

I changed the network name to development:

 networks: {
   development: {
     port: 8545

And now when I run truffle develop it starts up on port 9545.

Truffle Develop started at

It looks like the Truffle documentation may be a bit outdated.

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.