Reputation: 3410
IPFS provides useful caching mechanism. My goal is to use IPFS caching mechanism without providing an online access.
Even I do not share the ipfs-hash
of the file with other users, I want to disable probability for other users to access/pull that file I stored on my local IPFS directory, somehow if they find out the ipfs-hash
of the file/folder.
=> If I don't run ipfs daemon
would it be a solution? If yes, the problem is for some files I may need to use ipfs daemon
to share them with other users or I also may need to pull files from other nodes. The problem rises that when I start running ipfs daemon this will enable access to all the files that is stored on the local ipfs folder.
[Q] So basically I want to use IPFS
as a offline caching tool and do not provide outside access for some specific folders that I store in IPFS. Even ipfs daemon was running, could I disable online access for specific files/folders that I decide?
For example, I have multiple folders and I want to store them under local IPFS folder, where who ever has their ipfs-hash
will not be get able to pull those files. Even ipfs daemon is running could I force those folders that is stored in local IPFS folder to have no outside access? and provide online access for some other folders.
As a solution, on my machine could I run two different IPFS processes having different local repository. First one is open to outside and can pull from other nodes etc. (running ipfs daemon
); but other does not have any access to outside and no-one can access to its files.
Upvotes: 5
Views: 2260
Reputation: 12565
In addition to the offline mode mentioned by Victor Bjelkholm, you can look into setting up a private swarm. For instructions, see https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#private-networks
That way you have a node that can be connected to other nodes of yours with the same swarm key, it is absolutely impossible for this node to intentionally or accidentally connect to the public IPFS network.
Upvotes: 3
Reputation: 2016
You can run the daemon in offline-mode meaning it won't make any outside connections. You can do this by running ipfs daemon --offline
and confirming that there is no swarm addresses outputted after starting the daemon.
Upvotes: 6