WARNING: IPFS is designed as a public network so, please, don't share sensetive info, because it may leak.
See:
- https://github.com/ipfs/kubo/blob/master/docs/config.md#routingtype.
- https://github.com/ipfs/kubo/blob/master/docs/config.md#profiles.
- https://discuss.ipfs.tech/t/ipfs-for-file-distribution-in-local-network/9458.
ipfs config Routing.Type none
ipfs config profile apply local-discovery
# [...] Install avahi or mdns packages for your OS.
ipfs id # Returns your ipfs peer ID. Transfer it to another machine.
# Connect to another local peer:
ipfs swarm connect /ip4/HIS_LOCAL_IP_HERE/tcp/4001/p2p/HIS_PEER_ID_HERE# Endlessly generate IPNS keys until interrupted with `Ctrl+C`:
$ i=0; while true; do i=$((i+1)); ipfs key gen "2025_11_03_e2_tmp$i"; done
> [...] # Outputs each key generated and saves it to IPFS key storage (under `~/.ipfs/`).
# Then search among all generated keys for some keywords:
$ ipfs key list -l | grep --color -e 'SOME_REGEX_HERE' -e 'ANOTHER_REGEX_HERE'
> [...] # Prints matched keys with the keywords colored.
# or search for prefixes. Prefixes can only begin with some letters, most frequent are `ghijklm`.
# Skip one char by using a dot in regexes if needed:
$ ipfs key list -l | cut -d ' ' -f 1 | sed 's/^k51qzi5uqu5d//' | grep --color -E '^(ilya|.decrab)'See https://github.com/ipfs/kubo/blob/master/docs/fuse.md.
IPFS project doesn't provide musl binaries.
So I'm using gcompat: see https://wiki.alpinelinux.org/wiki/Software_management#Running_glibc_programs.
To install:
doas apk add gcompatSee https://wiki.alpinelinux.org/wiki/MDNS.
To install:
doas apk add avahidoas apk add fuse3
doas ln -s /usr/bin/fusermount3 /usr/bin/fusermount
doas modprobe fuse
ipfs init
ipfs daemon --mount
# [...]