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/
Swarm listening on /ip4/
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit
Swarm announcing /ip4/
Swarm announcing /ip4/
Swarm announcing /ip6/::1/tcp/4001
API server listening on /ip4/
Gateway (readonly) server listening on /ip4/
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/

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

  • [/ip4/] dial tcp4 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

Hi, I’m facing a similar issue. Experimenting with creating a private reverse proxy ipfs gateway with three nodes. I spin up 2 nodes on Digital Ocean, with a private configuration. I set the bootstrap list in each config, before starting the Daemons. The two D.O. nodes see each other, and work fine. However, neither of them see my PC node I have running.

In the above pic, the black terminal is the node I have running on my PC, I notice that it doesn’t advertise on my PC public ip, whereas the two D.O. nodes do. I’m kinda stuck at the moment, how can I get the other nodes to see the PC node? I checked the firewall, it looks to me like it doesn’t block anything for ipfs.

When I start my PC node, it tells me there are no peers:

Daemon is ready
2022-07-18T20:11:21.405-0700    ←[31mERROR←[0m  cmd/ipfs        ipfs/daemon.go:567      failed to bootstrap (no peers found): consider updating Bootstrap or Peering section of your config

Bootstrap list for PC:

"Bootstrap": [

Why does your bootstrap list say /ipfs/ instead of /p2p/?

Hey, thanks for the response :slightly_smiling_face: , Used these tutorials:

Should it be p2p? I’ll try and see if that fixes it.

This is what my node says about bootstrap list.

May need the same configuration.

Can you ipfs swarm connect <multiaddress> from your PC at home to the DO nodes?

The /ipfs/ vs /p2p/ thing should not matter. /ipfs/ is a legacy form however.

Hey, I’ve tried ipfs swarm connection both sides:

From PC to DO:

From DO to PC:

Here is what the firewall settings for ipfs on PC look like:

You probably need to configure your DO nodes to be reachable from the internet, because they don’t seem to be.

ah ok, I did install firewalls on the DO machines based on this tutorial, and another one I found.
It’s a bit odd, I was actually able to get a connection between all of the nodes when entering the commands manually in some initial tests. I wrote some shell scripts to do the installs, also seemed to work initially. DO has recently done some upgrades, then it stopped working altogether. My understanding on this stuff is a bit rudimentary. Not sure of the best way to debug it, if anyone could point me to a good tutorial I’d be immensely appreciative. I’ll go ahead and post the fire wall settings I installed on the DO machines, in case anyone sees anything that seems off. It’s possible I missed something, or it got messed up in the shell scripts somehow:

Using Config Server, the port configs(5001, I added, since I was running into problems):

Soooo, where are the rules allowing incoming TCP/UDP traffic to 4001?..

and on the flip side, why are you allowing 5001 in?

1 Like

Why oh why indeed lol, I think I added the 5001 based on some post I read along the way… it’s a bit of a blur now. Still, I updated it adding 4001, with the same result.

I will test shutting down the firewall, determining the DO nodes are not accessible to the internet:

That is based on what ipfs returns right? Is there another way I can test if they are accessible?

Yes. Use nc (or telnet) to connect to TCP/4001 from the outside (from your PC). If it works, it should look like this:

> nc 4001

of course, use the IP address of what you are trying to test (that was a just a test on my LAN)



that’s an interesting response… I’ll keep looking for the answer, at least I have a better idea where to look now. Thanks for your help guys :+1:

1 Like