Is this possible to have several IPFS nodes with the same keys across them?
What we want is to store our files on several nodes, but we would like to access them via IPNS names, and as I understand we need the same key on all nodes to have the same IPNS name on them. Is this possible at all?
Multiple nodes with the same peer ID is a big no no and doesn’t work.
However you can have alternative keys to use for IPNS (see ipfs key --help
), if you have duplicates of that, it does likely not much. One of the peer counter will be higher than the other and only that peer publishes will go through. (that a guess, I havn’t actually tested maybe I’m wrong).
However, you don’t need to have IPNS running on all nodes for them to share the files.
You can have a single node publishing IPNS and other ones just storing the same CIDs behind the IPNS record. (there is still a single point of failure for the IPNS publishing but all nodes will serve the files).
How can I copy files already uploaded from the first node to other nodes? Is there some kind of sync or something like that?
Run this on the other nodes:
ipfs pin add Qmfoo
Replace Qmfoo
with your CID.
That kinda of a pain because you need to do that on all nodes, personally for that I use: cluster.ipfs.io you add or pin the file once, and it get broadcasted to all the nodes.
I was searching for that and, you can link IPNS names to IPFS content. Redirecting a .crypto / .wallet (from Unstoppable Domains) address to an IPFS link, or a “.eth” (Ethereum domain) to an IPFS link (or even, as shown below, a simple DNSLink to your “web 2.0” domain via DNS). Then your domain.crypto or domain.eth (or domain.com) will link to all nodes.
i.e., what I was looking for, and what you are looking for if you arrived here (hi!) could also be this, or something similar.
Hardened, site-specific DNSLink gateway.
Disable fetching of remote data (NoFetch: true) and resolving DNSLink at unknown hostnames (NoDNSLink: true). Then, enable DNSLink gateway only for the specific hostname (for which data is already present on the node), without exposing any content-addressing Paths:
$ ipfs config --json Gateway.NoFetch true
$ ipfs config --json Gateway.NoDNSLink true
$ ipfs config --json Gateway.PublicGateways '{
"en.wikipedia-on-ipfs.org": {
"NoDNSLink": false,
"Paths": []
}
}'
Gateway.NoDNSLink is set to false by default, which means Kudo will resolve “TXT” DNSLinks in name servers, by default.
Does it also resolve .eth/.crypto domain names (etc.) by default too, now? Looks like it does. Neat stuff! (Edit: Otherwise, this fixes it.)