Private IPFS Swarm with Kubo

I’m trying to understand the relationship between IPFS_SWARM_KEY_FILE and IPFS_SWARM_KEY

Docs: Run Kubo IPFS inside Docker | IPFS Docs

  • If both are defined, and the file defined in IPFS_SWARM_KEY_FILE contains a different key to IPFS_SWARM_KEY, which key will be used?
  • If I only define IPFS_SWARM_KEY env var with the value new_secret and the /data/ipfs/swarm.key already contains old_secret. Will Kubo update /data/ipfs/swarm.key with new_secret?

Having a look into the container_daemon file (kubo/container_daemon at master · ipfs/kubo · GitHub) it looks like if you have defined both variables, IPFS_SWARM_KEY_FILE will override IPFS_SWARM_KEY.

If you only define IPFS_SWARM_KEY and you already had a key secret, that file will be overridden.

1 Like

Thanks! That answers the question!

Another question regarding private swarms:

Are CIDs pinned by a private swarm retrievable normally via the http gateway if it’s exposed?