# Kubo container with private swarm webui not shown

**URL:** <https://discuss.ipfs.tech/t/kubo-container-with-private-swarm-webui-not-shown/16644>\
**Category:** Kubo\
**Created:** [July 1, 2023, 2:52pm UTC](https://discuss.ipfs.tech/t/kubo-container-with-private-swarm-webui-not-shown/16644 "2023-07-01T14:52:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashpixx](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/flashpixx/32/2335_2.png) [@flashpixx](https://discuss.ipfs.tech/u/flashpixx)\
**Post date:** [July 1, 2023, 2:52pm UTC](https://discuss.ipfs.tech/t/kubo-container-with-private-swarm-webui-not-shown/16644/1 "2023-07-01T14:52:41Z")

</div>

Hello,

i try to build a private swarm with Kubo containers (ipfs/kubo:latest), if I remove all bootstrapping peers and set the environment flag IPFS\_SWARM\_KEY\_FILE with my key file I cannot get access to the web ui on [http://localhost:5001/webui](http://localhost:5001/webui), the site is loaded but the browser hangs, so that the ui is not shown anymore. If I remove any “private” parts and let the container connect to the public peers everything works fine.

I have seen there is a post [webui-not-working-in-private-network-configuration/6348](https://discuss.ipfs.tech/t/webui-not-working-in-private-network-configuration/6348), but in my case it should worked with the container version in a private network.

How can I make this work? Make it sense, to build my own container with pack the ui with the container?

---

<div class="post-metadata">

**Author:** ![hexcola](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hexcola/32/7781_2.png) [@hexcola](https://discuss.ipfs.tech/u/hexcola)\
**Post date:** [July 3, 2023, 10:26am UTC](https://discuss.ipfs.tech/t/kubo-container-with-private-swarm-webui-not-shown/16644/2 "2023-07-03T10:26:51Z")

</div>

Hi,

I met this issue before. The reason here is when you try to open `http://localhost:5001/webui`, it will redirect to the link like this `http://localhost:5001/ipfs/bafybeic4gops3d3lyrisqku37uio33nvt6fqxvkxihrwlqsuvf76yln4fm` (if you are using Kubo v0.20.0) which is trying to load data from other peers. So if you’re in a private network, it won’t work.

Here is the solution:

1. Start a public ipfs node, and let it download the WebUI files to your repo;
2. Export the WebUI files as a car file by `ipfs dag export [webui root cid] > webui.car`, which may take a while.
3. After step 2 is finished, go to your private node, and import the car file by `ipfs dag import webui.car`, it will unzip and save files to the node automatically.

Hope it can help you! 😀

---

<div class="post-metadata">

**Author:** ![flashpixx](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/flashpixx/32/2335_2.png) [@flashpixx](https://discuss.ipfs.tech/u/flashpixx)\
**Post date:** [July 3, 2023, 4:53pm UTC](https://discuss.ipfs.tech/t/kubo-container-with-private-swarm-webui-not-shown/16644/3 "2023-07-03T16:53:55Z")

</div>

Thanks in general helps this, I create my own dockerfile and add the webui.car and initialize this with a shell script, so works for me with some little modification

---

<div class="post-metadata">

**Author:** ![atomniketh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/atomniketh/32/8527_2.png) [@atomniketh](https://discuss.ipfs.tech/u/atomniketh)\
**Post date:** [April 18, 2024, 2:59am UTC](https://discuss.ipfs.tech/t/kubo-container-with-private-swarm-webui-not-shown/16644/4 "2024-04-18T02:59:38Z")

</div>

Any chance you could share the dockerfile and shell script?

---

<div class="post-metadata">

**Author:** ![flashpixx](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/flashpixx/32/2335_2.png) [@flashpixx](https://discuss.ipfs.tech/u/flashpixx)\
**Post date:** [April 18, 2024, 6:14am UTC](https://discuss.ipfs.tech/t/kubo-container-with-private-swarm-webui-not-shown/16644/5 "2024-04-18T06:14:44Z")

</div>

This is the shell script

```auto
00-ipfs-bootstrap-private.sh
574 B
#!/bin/sh -e
ipfs bootstrap rm all
#ipfs bootstrap add "/ip4/$PRIVATE_PEER_IP_ADDR/tcp/4001/ipfs/$PRIVATE_PEER_ID"
ipfs dag import /webui.car
ipfs config --json Experimental.FilestoreEnabled true
ipfs config --json Experimental.UrlstoreEnabled true
ipfs config --json Experimental.Libp2pStreamMounting true
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://0.0.0.0:5001", "http://localhost:3000", "http://127.0.0.1:5001", "https://webui.ipfs.io"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST", "GET", "DELETE"]'

```

and the Dockerfile

```auto
FROM ipfs/kubo:v0.21.0

# for private networks webui must be included manually,
# see https://discuss.ipfs.tech/t/kubo-container-with-private-swarm-webui-not-shown/16644

COPY ./webui.car /
COPY ./00-ipfs-bootstrap-private.sh /container-init.d

```

---

<div class="post-metadata">

**Author:** ![atomniketh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/atomniketh/32/8527_2.png) [@atomniketh](https://discuss.ipfs.tech/u/atomniketh)\
**Post date:** [April 18, 2024, 4:35pm UTC](https://discuss.ipfs.tech/t/kubo-container-with-private-swarm-webui-not-shown/16644/6 "2024-04-18T16:35:21Z")

</div>

Thank you! That was very kind.
