Set up private ipfs

I am creating a private ipfs network for two devices only
I followed the steps in this link
Deploy a private IPFS network in 5 steps | by Sander van Laar | Medium
But unfortunately I am facing the same error on both computers when I run daemon

ipfs daemon
Initializing daemon…
go-ipfs version: 0.12.0
Repo version: 12
System version: amd64/linux
Golang version: go1.16.12
Swarm is limited to private network of peers with the swarm key
Swarm key fingerprint: 7755a274fd70862e822ec58c3b59bd43
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/192.168.0.105/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/192.168.0.105/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
API server listening on /ip4/0.0.0.0/tcp/5001
WebUI: http://0.0.0.0:5001/webui
Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080
Daemon is ready

i2022-05-04T16:44:34.402+0200 ERROR cmd/ipfs ipfs/daemon.go:567 failed to bootstrap (no peers found): consider updating Bootstrap or Peering section of your config
2022-05-04T17:00:08.133+0200 ERROR reprovider.simple simple/reprovide.go:109 failed to reprovide: failed to find any peer in table

I really don’t know the solution
I am new to building networks and I became sane in this problem for a long time. I hope someone can help me.
I don’t have much time anymore

You need to populate the bootstrap list for each node. Simply have 1 entry that lists the address of the other node, and they’ll find each other when they start.

1 Like

I applied this link

First, delete all the botstrap list on both devices with a command
Ipfs bootstrap rm --all
Then I write the statement to node 0
ipfs bootstrap add /ipv4/bootnode-ip/tcp/4001/p2p/bootnode peerID
On my main node 0 machine

Then I made an order
ipfs connect /ipv4/bootnode-ip/tcp/4001/p2p/bootnode peerID
on my node 1
But it gives me the error: unknown command " "connect

Is what I’m doing right or not?
I’m really new to this topic and I really hope you can help me

The command is ipfs swarm connect, not ipfs connect.

1 Like

I implemented it like this
But I get another error
I don’t know what’s wrong
ipfs swarm connect /ip4/192.168.0.6/tcp/4001/p2p/12D3KooWJxTqvY7Y6ZwquQje98opKJgahhid8fLCQxpR37ufAqFg

Error: connect 12D3KooWJxTqvY7Y6ZwquQje98opKJgahhid8fLCQxpR37ufAqFg failure: failed to dial 12D3KooWJxTqvY7Y6ZwquQje98opKJgahhid8fLCQxpR37ufAqFg:

  • [/ip4/192.168.0.6/tcp/4001] dial tcp4 192.168.0.6:4001: connect: connection refused
    Do you have any idea

Either the node wasn’t running, or there’s a firewall in front of it that blocks access to tcp 4001.

P.S. or, the address is wrong. run ipfs id on the target node first, to see what addresses it actually advertises

P.P.S. or, the node you are using isn’t on the same private subnet. in that case, the target node has to be publicly reachable (must have a public IP address, not a private one like the one you used). again, check ipfs id to see what it advertises

1 Like