Ipfs only in a local network

Hi,all
I ddint want my files exposed to the world so I reset my bootstrap as a few local machine ip address and I also reset the bootstrap of those machines.
it went well at first,but recently I found that my machine be connected to many other node I dont know…

so what’s the problem is and how to solve it?

2 Likes

@Tim you’re trying to form a private network. There’s functionality to support that. @kubuxu where are the best docs for private networks?

1 Like

Checkout https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#private-networks

If you have any more questions ask here.

2 Likes

Hi, thanks for ur tips.
I go get the code and I made a file “swarm.key” on the path

but it doesnt work and actually I dont know how to establish the private and run the network,tnx


the machine environment is WINDOWS 10, ipfs version is

@flyingzumwalt @Kubuxu

Just making sure, swarm.key contains key in correct format, right?
Then as you are on windows, could you try converting this file to Unix line ends?
I crated https://github.com/libp2p/go-libp2p-pnet/issues/12 to track it but it might be something else in your case.

1 Like

tnx, so what’s the format of key?

You can use https://github.com/Kubuxu/go-ipfs-swarm-key-gen to generate it.
Example:

 > cat $IPFS_PATH/swarm.key
/key/swarm/psk/1.0.0/
/b16/
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2 Likes

hi, I generated the key as follow:

but there isnt any file like swarm.key under the path “~./.ipfs”(I didnt set $IPFS_PATH environment path).
so I created a swarm.key like


and put it in the file of .ipfs
but I still cant start the ipfs…

thanks.

my machine environment is windows 10

@Kubuxu @flyingzumwalt

the 3rd line is just hex string of 32 characters (16 bytes).