# How to setup kopia/htmlui for development?

**URL:** <https://kopia.discourse.group/t/how-to-setup-kopia-htmlui-for-development/1769>\
**Category:** Support\
**Created:** [February 2, 2023, 3:59pm UTC](https://kopia.discourse.group/t/how-to-setup-kopia-htmlui-for-development/1769 "2023-02-02T15:59:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/peter/32/441_2.png) [@peter](https://kopia.discourse.group/u/peter)\
**Post date:** [February 2, 2023, 3:59pm UTC](https://kopia.discourse.group/t/how-to-setup-kopia-htmlui-for-development/1769/1 "2023-02-02T15:59:09Z")

</div>

I just started to have a look at the htmlui. When I start it, it tried to access the api at [http://localhost:3000/api/v1/](http://localhost:3000/api/v1/)

Is there somewhere documentation how to setup a dev environment?

---

<div class="post-metadata">

**Author:** ![budy](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/budy/32/38_2.png) [@budy](https://kopia.discourse.group/u/budy)\
**Post date:** [February 3, 2023, 10:24am UTC](https://kopia.discourse.group/t/how-to-setup-kopia-htmlui-for-development/1769/2 "2023-02-03T10:24:06Z")

</div>

What do you mean by “dev environment”? Do you want to setup a test server or do you really want to mess with the code?

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/peter/32/441_2.png) [@peter](https://kopia.discourse.group/u/peter)\
**Post date:** [February 17, 2023, 12:30pm UTC](https://kopia.discourse.group/t/how-to-setup-kopia-htmlui-for-development/1769/3 "2023-02-17T12:30:35Z")

</div>

My plan is to _“mess with the code”_ … in case I’ve got some spare time… There are some things in the UI I’d like to give it a try if I could improve.

(One thing that’s in my mind: It’s so nice that I can mount a directory from any snapshot in the UI with a single click. But it happened to me now that I forgot which directory I did mount so I had to click around a bit before checking `mount` from the CLI. So I thought it would be nice to keep a list of mounted directories in the UI accessible. Maybe add a new tab that is only visible when there are mounts.)

But after starting `react-scripts start` the UI just shows “Request failed with status code 504” as it tries to access the API at localhost:3000/api. And of course there is nothing running. So I expect that some more setup is needed which might be part of a different project.

---

<div class="post-metadata">

**Author:** ![budy](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/budy/32/38_2.png) [@budy](https://kopia.discourse.group/u/budy)\
**Post date:** [February 17, 2023, 12:56pm UTC](https://kopia.discourse.group/t/how-to-setup-kopia-htmlui-for-development/1769/4 "2023-02-17T12:56:33Z")

</div>

What worked for me was to fork Kopia on GH to my own account and then setting up Github on my target machine - in this case a Linux box, using the Github repo and rpms.

Then I checked out my fork of Kopia where I had performed my changes to test them out. Getting gh to work is essential, since it pulls-in a lot of dependencies.

---

<div class="post-metadata">

**Author:** ![jkowalski](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/jkowalski/32/3_2.png) [@jkowalski](https://kopia.discourse.group/u/jkowalski)\
**Post date:** [February 17, 2023, 4:28pm UTC](https://kopia.discourse.group/t/how-to-setup-kopia-htmlui-for-development/1769/5 "2023-02-17T16:28:02Z")

</div>

In one terminal do:

```auto
$ cd kopia
$ go run . server start --insecure --without-password --disable-csrf-token-checks --log-level=debug

```

In another:

```auto
$ cd htmlui
$ npm run start

```

You can now access kopia UI on `localhost:3000`

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/peter/32/441_2.png) [@peter](https://kopia.discourse.group/u/peter)\
**Post date:** [February 24, 2023, 6:54pm UTC](https://kopia.discourse.group/t/how-to-setup-kopia-htmlui-for-development/1769/6 "2023-02-24T18:54:40Z")

</div>

this worked well, nice - thanks! 🙂

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/peter/32/441_2.png) [@peter](https://kopia.discourse.group/u/peter)\
**Post date:** [March 15, 2023, 3:13pm UTC](https://kopia.discourse.group/t/how-to-setup-kopia-htmlui-for-development/1769/7 "2023-03-15T15:13:14Z")

</div>

So now I did “mess” a little with the code: [Added directory breadcrumb buttons to see path and navigate back](https://github.com/kopia/htmlui/pull/141)

 ![Screenshot_20230315_161119](https://global.discourse-cdn.com/free1/uploads/kopia/original/1X/f107426c0d59a8e03aa157d09c540f4e52599b67.png)

Would be nice to know if this goes in a direction that you’d approve.
