I'm in a dilemma with docker/podman containers and node_connection_info.config

The short question:

Can I move either node_connection_info.config to another default location?

So here’s the issue:

  1. I run one first root node inside a container.
  2. I run another node inside a container and connect to the main node.
  3. In order to connect the other nodes with the first node I need the root node’s genesis’ key.
  4. The node’s genesis key, if I am correct, is generated in ~/.safe/node/node_connection_info_config. In this folder one can also find the binary file sn_node and secret reward keys from the root_dir, whatever those are.
  5. The solution for that, if I’m correct, is to do what Storj has done, is to create a volume for this. This volumes retain data even after the containers have been destroyed.
  6. I’m not sure when these volumes start as empty, I assume after the build, as so far I’ve found it impossible to build without first destroying the downloaded sn_node, leaving my container unable to run.

So I can’t assign my volume to ~/.safe/node
and I don’t know how to move the location where node_connection.info.config is created.

Does anyone know a best solution to this dilemma?


Now that I’m thinking about it again. I could also just have them share client data.


I’m not sure about volumes for that dir, but aye, I’d just copy the config across to the new container and you should be good to go?


When my containers run, they run the node at entrypoint, so the node_connection_info.config file of the root node would have to be available immediately, especially it’s genesis key.
I’ll create a shared cli volume and that should do the trick.


So far it’s not working because my second container is not having it’s volume shared, despite being called like this:

bash command

podman run \
--name test_joinnode-ipv4 \
--restart unless-stopped \
--publish $JOIN_IP:$JOIN_PORT:$JOIN_PORT/tcp \
--publish $JOIN_IP:$JOIN_PORT:$JOIN_PORT/udp \
--mount type=bind,source=$CLI_DIR,destination=/home/admin/.safe/cli/ \
-d localhost/joinnode-ipv4_test


# Assign volume
VOLUME /home/admin/.safe/cli

# Launch safe join node
ENTRYPOINT safe networks switch $NETWORK_NAME && RUST_LOG=safe_network=info,qp2p=info ~/.safe/node/sn_node --skip-igd

This topic was automatically closed after 60 days. New replies are no longer allowed.