I used below command to start my node container in private mode:

./mainnet.sh start --private-mode --no-bootstrap-peers --bootstrap-threshold=1 --connections 1 --peer public-node-ip

Node got started in private mode, but now it is not able to connect to public node ip and also when I stop and start my container using the below command, the private mode is not getting removed.

./mainnet.sh stop

./mainnet.sh start

How do I connect to the peer node while still in private mode, or how do I remove the private mode so that my baker doesn't stop functioning for now?

  • Is your command complete ? The final --peer expects an argument, which is the description of another node ('AAA.BBB.CCC.DDD:PORT` or HOSTNAME:PORT)
    – lefessan
    Feb 14, 2019 at 9:25
  • Do you have a config.json file in your ~/.tezos-node directory ?
    – lefessan
    Feb 14, 2019 at 9:25

2 Answers 2


This is caused by an awkward behavior of the docker entrypoint script: it passes the node options along to tezos-node config {init,update} every time, which means options can accumulate and become impossible to remove through the entrypoint. :(

One option would be to just delete your config.json and start over: ./mainnet.sh shell, then in the shell rm /var/run/tezos/node/data/config.json, then exit the shell and restart the node with the options you want. Or, edit the same config file by hand (say using vi in the docker shell) as FLF OCP suggests.

  • Thanks Tom. Yes if found the config.json file but i accidently left some incorrect configuration in it and now my docker container won't start and unless the container starts i can't login in to container shell. now i am stuck with my node container restarting again and again. Any solution for that? Feb 15, 2019 at 13:39
  • 1
    D'oh! I am no docker expert, but, for me, it looks like the config file can be found at /var/lib/docker/volumes/mainnet_node_data/_data/data/config.json from outside the container. Perhaps you could delete or modify it (with sudo) at that location?
    – Tom
    Feb 15, 2019 at 20:25
  • Thanks. That solves my problem. I found the volume with name mainnet_node_data, was mounted with the path mentioned by you. /var/lib/docker/volumes/mainnet_node_data/_data/data/ Now my container is running again. Feb 17, 2019 at 1:03

If you want to remain in private-mode, you must provide an argument --peer node:port when starting your node, or edit the config.json file of the node to add such peers (which is better, as it will be used everytime you restart it).

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.