1

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?

3
  • 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
    Jun 13, 2018 at 10:49
  • @Jannes "put them in the bitcoin.conf file" -- why not? Will the effect be as described? 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
    Jun 14, 2018 at 1:02

1 Answer 1

3

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=192.168.49.50:9332 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 that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.