If you Setup IPFS on a private Linux Server and you wont share Files over Internet you must do this:
- Setup Debian
- Download and install https://dist.ipfs.tech/kubo/v0.32.1/kubo_v0.32.1_linux-amd64.tar.gz (inside the ipfs copy to /usr/local/bin)
- Create a new Linux User called Pluto and login on console to Pluto
- run “ipfs init” as User Pluto
- now start ipfs by “ipfs daemon” as User Pluto
- open a Browser and enter http://localhost:5001/webui
- NOW you see a new URL inside the adressbar http://localhost:5001/ipfs/bafy….
- COPY bafy…. HASH in the mouse (CTRL+C)
- open a new Terminal enter “ipfs get bafy….” this will PULL the CURRENT builtin WEBUI Software 21MB to your home drive
- if done, STOP ipfs by “CTRL+C”
- now enter at Terminal “ipfs bootstrap rm –all” to drop public WEBUI Sources (on all your Nodes)
- write a private.sh Script enter:
- Code
#!/bin/bash export LIBP2P_FORCE_PNET=1 export IPFS_LOGGING=info export IPFS_PATH=/home/pluto/.ipfs ipfs daemon exit 0
- now create a swarm.key file (this is your personal key, ONLY for your Nodes)
-
echo -e "/key/swarm/psk/1.0.0/ /base16/ `tr -dc 'a-f0-9' < /dev/urandom | head -c64`" > /.ipfs/swarm.key
- and place private.sh and swarm.key inside every .ipfs Profile Folder on each PC of your Home
- start ipfs by running sh private.sh
- NOW Workaround upload on Terminal a COPY of your local downloaded WEBUI to the local IPFS NODE CACHE by
-
ipfs files cp /ipfs/$(ipfs add -r -Q bafyXXXX.... ) "/webui"
- enter a Webbrowser by http://localhost:5001/webui which should run the Webui without hanging
- open on firewall port 4001 tcp/udp
THE MAJOR BUG on IPFS at the Private NETWORK SETUP is that the WEBUI is not loaded from the public IPFS Cloud-Cache outside your home. After some time or running the “ipfs repo gc” Garbage Collector Cleanup Tool the Webui is broken! Do the Down and Upload Steps on every local Node to Cache them locally, if the bafy-Hash is “different” you must download every single bafy- Webui-Version for every Node cause its cached on local ipfs then!!
This is the current Webui Sources List which i found and the basic Informations for my Workaround to understand the IPFS Mechanism
https://github.com/ipfs/kubo/blob/master/core/corehttp/webui.go