Ipfs node cannot see other ipfs nodes inside a docker network

Hi guys, i would like to create a docker-compose.yml to deploy a configured ipfs private network, but i have a problem this. My ipfs nodes cannot conect to other ipfs nodes.
My docker-compose file is in my github:

What i can do?
Inside any ipfs container, i can ping to other containers using docker dns (ipfs, ipfs1)
Inside any ipfs container, i can use in in ipfs1 container, wget to ipfs0:8080/ipfs/[SomeFileUploadedInIPFS0] to access and download any file in ipfs0 node
What i cant do?
Use ipfs get/cat [SomeFileUploadedInOtherIpfsNode]

In my script, i remove all default bootstrap nodes, i added my own bootstraps nodes:
But still cannot connect to the network
Using the WEB UI, i cant still connect to the other nodes (Could not connect to the provided peer.)
I successfully setup an ipfs private network using the swarm.key and the env LIBP2P_FORCE_PNET to 1
All nodes run correctly.

IPFS version:
ipfs0 | Initializing daemon…
ipfs0 | go-ipfs version: 0.4.22-
ipfs0 | Repo version: 7
ipfs0 | System version: amd64/linux
ipfs0 | Golang version: go1.12.7

1 Like

did you try to start without your ipfs*.yml just init node when you start your dockerfile ?

1 Like

Cool. That was the problem, using the env IPFS_PROFILE=server, this would not let me connect to other ipfs nodes. Without it, i can run successfully my ipfs private network.
Thx you!

1 Like

i’m not sure but IMO it’s caused by PublicKey properties i you specify public key you need also to specify private key (but is not a best pratrice to share private key) but in your case public key not permit to re-generate private key but a private key yes. with just public key your nodes cannot communicate with another node because it cannot shared fingerprint or sign data to certified the content.

it’s juste my opinion that’s need to test. but if your issue is solved that’s cool :+1: