I want to launch Bitcoin core connecting to a specific list of peers. I can do this using connect:

bitcoind -connect=<IP1> -connect=<IP2>

Is there a way I can put the peers I want to connect to into a file and give this file to bitcoind as input?

  • You can put them in the bitcoin.conf file, but I'm guessing that's not what you mean. Simply multiple lines with: connect=IP
    – Jannes
    Commented Jun 13, 2018 at 10:49
  • @Jannes "put them in the bitcoin.conf file" -- why not? Will the effect be as described? Commented Jun 13, 2018 at 11:03
  • Yeah it will work fine. I was just assuming you were getting some computer generated dynamic list from somewhere.
    – Jannes
    Commented Jun 14, 2018 at 1:02

1 Answer 1


Within the data directory for your coin (/dir/for/yourcoin/.yourcoin) you will have a configuration file. Within this configuration file, you will want to place the line connect=IP ADDRESS:PORT

This will make your client automatically attempt to establish a connection with the node(s) you specify.

Example: within myaltcoin.conf place the line connect= Obviously just substitute your desired IP address and port.

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.