# Use the webgui server without running a backend server?

**URL:** <https://kopia.discourse.group/t/use-the-webgui-server-without-running-a-backend-server/2632>\
**Category:** General Topics\
**Created:** [February 2, 2024, 7:28pm UTC](https://kopia.discourse.group/t/use-the-webgui-server-without-running-a-backend-server/2632 "2024-02-02T19:28:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrOlocet](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/mrolocet/32/936_2.png) [@MrOlocet](https://kopia.discourse.group/u/MrOlocet)\
**Post date:** [February 2, 2024, 7:28pm UTC](https://kopia.discourse.group/t/use-the-webgui-server-without-running-a-backend-server/2632/1 "2024-02-02T19:28:31Z")

</div>

Hi all!

I am running Kopia inside a docker container, and using the WebGUI to do backups of my local system to the cloud. So far so good, everything seems to be running quite smoothly, highly impressed!

However, I cannot get rid of the feeling that the configuration of the Kopia server is somewhat beyond my understanding, and I find the documentation on the various features a bit confusing. It seems that by running kopia server start, I am not only starting the webgui, but also a backup backend, which other clients could potentially connect to?

Is this understanding correct? If so, how can I disable this kopia backend, so that no backup clients can ever connect, I just want to use the WebGUI to start/schedule/check on my local backups in a lazy way.

This is what I use to run the server as docker entrypoint:  
kopia server start --insecure --readonly --htpasswd-file /config/htpasswd --address 0.0.0.0:51515 --server-username=XXX --random-server-control-password

Is this a secure configuration if I just want the GUI? Any better options?

Also, it seems I need to set the repository pwd via the container variable KOPIA\_PASSWORD, which I don’t like, I don’t want my container config to contain credentials. Is there any way to supply the password in a file, or by other (automated) means on container start? Reading from console is not possible because of the docker setup.

Thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![97b4958b055b](https://avatars.discourse-cdn.com/v4/letter/9/47e85d/32.png) [@97b4958b055b](https://kopia.discourse.group/u/97b4958b055b)\
**Post date:** [March 22, 2025, 1:09am UTC](https://kopia.discourse.group/t/use-the-webgui-server-without-running-a-backend-server/2632/2 "2025-03-22T01:09:58Z")

</div>

> [@MrOlocet](#):
>
> If so, how can I disable this kopia backend, so that no backup clients can ever connect, I just want to use the WebGUI to start/schedule/check on my local backups in a lazy way.

Your host OS firewall will intercept incoming connection attempts. I’d look over what the default rules are for it.

Though if you’re only running it locally I’d think `--address 127.0.0.1:51515` (the `localhost`-only IPv4) would be enough to do it.

---

<div class="post-metadata">

**Author:** ![97b4958b055b](https://avatars.discourse-cdn.com/v4/letter/9/47e85d/32.png) [@97b4958b055b](https://kopia.discourse.group/u/97b4958b055b)\
**Post date:** [March 22, 2025, 2:00am UTC](https://kopia.discourse.group/t/use-the-webgui-server-without-running-a-backend-server/2632/3 "2025-03-22T02:00:18Z")

</div>

> [@MrOlocet](#):
>
> Also, it seems I need to set the repository pwd via the container variable KOPIA\_PASSWORD, which I don’t like, I don’t want my container config to contain credentials. Is there any way to supply the password in a file, or by other (automated) means on container start? Reading from console is not possible because of the docker setup.

I don’t see why not. It’d require manual intervention before you booted the docker image, however. I’d use `gocryptfs` for this. It’s nice & lightweight. It also happens to use the same cryptography as Kopia.

After you remove whatever is hard coded for `KOPIA_PASSWORD` from the docker compose file, subsequent launches should just be fired via `$HOME/bin/get-creds-kopia.sh` (you might want to set a bash alias).

```auto
#!/usr/bin/env bash

# the path to the encrypted gocryptfs dir
CRED_ENC="/path/cred.enc"

# path where unencrypted creds will be mounted
MNT="/media/vault/cred"

# create the mount point if it doesn't exist
# otherwise continue
mkdir -p "$MNT"

# mount the encrypted dir to the mount point
# this will prompt you for the password
gocryptfs "$CRED_ENC" "$MNT"

# read the path to the mounted, unencrypted creds for kopia
# ensure there is only _one_ 'kopia.YOURPASSWORD' file
CRED_MNT="$(ls $MNT/kopia.*)"

# extract the password from the filename
export KOPIA_PASSWORD="$(printf $CRED_MNT | cut -d '.' -f 2)"

# unmount the cred mount point now that the password is exported
umount "$MNT"

# don't use 'exit 0' or it will revoke the exported variable after successfully exiting.
# you could try the command to launch the docker image here, too. if you do, be
# sure to end the command with ' &' (note the space) to return control of the shell
# back to you.

```

Then fire the docker image as usual. That should do it (note: I do not use Docker).

> **[GitHub - rfjakob/gocryptfs: Encrypted overlay filesystem written in Go](https://github.com/rfjakob/gocryptfs)**
>
> Encrypted overlay filesystem written in Go

---

<div class="post-metadata">

**Author:** ![97b4958b055b](https://avatars.discourse-cdn.com/v4/letter/9/47e85d/32.png) [@97b4958b055b](https://kopia.discourse.group/u/97b4958b055b)\
**Post date:** [March 29, 2025, 6:41pm UTC](https://kopia.discourse.group/t/use-the-webgui-server-without-running-a-backend-server/2632/4 "2025-03-29T18:41:42Z")

</div>

Clarification: Using `exit 0` as the last line to close out the script will ensure the `KOPIA-PASSWORD=myPasswordHere` variable is cleared. That may be necessary according to one’s goals if the intent is for more automation instead of manual intervention.
