How to replace the default webui by a new version?

Hi,

I have some issues with the default webui in swarm mode (302 redirects forever). I cloned, built the latest webui and added to my IPFS node
added QmcJ6JchgpNHyuADGDCuFN4CBadEYyB2DgfBVMwJnJpEA6 build

Checked, well added: http://node_ip:8080/ipfs/QmcJ6JchgpNHyuADGDCuFN4CBadEYyB2DgfBVMwJnJpEA6/#/welcome

but http://node_ip:5001/webui still redirects to /ipfs/bafybeid26vjplsejg7t3nrh7mxmiaaxriebbm4xxrxxdunlk7o337m5sqq.

How to update the configuration to point to the new hash ?

Thanks!

Current issue with webgui:

curl -IL http://127.0.0.1:5001/webui
HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=utf-8
Location: /webui/
Date: Sat, 17 Jul 2021 21:51:14 GMT

HTTP/1.1 302 Found
Content-Type: text/html; charset=utf-8
Location: /ipfs/bafybeid26vjplsejg7t3nrh7mxmiaaxriebbm4xxrxxdunlk7o337m5sqq
Date: Sat, 17 Jul 2021 21:51:14 GMT

HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=utf-8
Location: /ipfs/bafybeid26vjplsejg7t3nrh7mxmiaaxriebbm4xxrxxdunlk7o337m5sqq/
Date: Sat, 17 Jul 2021 21:51:14 GMT

I found swarm tutorials that go-ipfs needs to be recompiled to set the hash for the webui ( core/corehttp/webui.go).
Is it the only way ?

Can’t you just make a shortcut to the new web UI?

http://bafybeiflkjt66aetfgcrgvv75izymd5kc47g6luepqmfq6zsf5w6ueth6y.ipfs.localhost:8080

How does it work outside localhost? (my ipfs server is headless)

I found a solution:

curl https://ipfs.io/api/v0/get/bafybeid26vjplsejg7t3nrh7mxmiaaxriebbm4xxrxxdunlk7o337m5sqq| tar xf -
ipfs add --cid-version 1 -r bafybeid26vjplsejg7t3nrh7mxmiaaxriebbm4xxrxxdunlk7o337m5sqq

Then the default webui at least works.

1 Like