How to install/configure via Docker?

How do I install/configure the Kopia Docker container?

I got this far:

Kopia Docker Container Info

Log:

# docker start kopia -i
usage: kopia [<flags>] <command> [<args> ...]

Kopia - Fast And Secure Open-Source Backup
...

Troubleshooting ideas?

Take a look here: Download & Installation | Kopia

I followed the docker install steps in the documentationā€¦

root # docker pull kopia/kopia
Using default tag: latest
latest: Pulling from kopia/kopia
Digest: sha256:47a1a799f045d625be96509d6c9c0b93cb02ee0eb9d22549a0dea0f94089c6e5
Status: Image is up to date for kopia/kopia:latest
docker.io/kopia/kopia:latest

root # docker run -e KOPIA_PASSWORD=password \
> -v /path/to/config/dir:/app/config \
> -v /path/to/cache/dir:/app/cache \
> -v ~/.config/rclone:/app/rclone \
> kopia/kopia snapshot list
ERROR open repository: repository is not connected. See https://kopia.io/docs/repositories/

It is my understanding this would give me a container of the Kopia server, and I can do the remaining configurations through Kopiaā€™s web UI.

kopia/kopia snapshot list

This command has asked Kopia to list snapshots, so youā€™re being told that there is no repository connected ā€“ not a surprise since itā€™s your first time running!

TBH, I am not sure how feature-rich the webUI is. It may, or may not give you all of the control of setting up a repo you need. Itā€™d be my advice that you consider setting up the repo via the CLI. However, to answer your question, you need to change the command I listed above to run the webUI:

kopia/kopia:testing server --insecure --address=0.0.0.0:51515 --server-username=kopia --server-password=kopia --override-hostname=kopia-server

So, I am using the testing branch (which can be removed if you want stable), then we invoke the webUI with ā€˜serverā€™, the ā€˜insecureā€™ flag allows the server to operate without TLS, the ā€˜addressā€™ field is set to listen on all IP addresses, and we then set web username and password. The final field allows a consistent hostname for your backups as each time you spawn a Docker container, youā€™ll have differing names.

The above should get you up & running.

However, as I said at the beginning, you should consider setting the repo via the CLI.

Just start with kopia/kopia repository create and follow the instructions.

Thanks for the reply. I finally got the container up and running a few days ago by not following the published docker instructions (removed the line ā€œkopia/kopia snapshot listā€ like you mentioned).

Things going good, and I was able to create my first repository and had my first backup.

Now, for whatever reason, my container will no longer run. I also created a 2nd container, but cannot access the repository.

Iā€™m also not sure I can get to a command prompt with the 2nd container because thereā€™s no ā€œshā€ for the docker container.

Frustrated because I have a data backup, but cannot access the backup!

Why do you complicated your live by trying to run kopia from docker ?
Is it a public host that you want to secure with docker, or you have a bunch programs that you donā€™t trust and want to isolated them from each other?

Just use kopia directly, it is just one single executable file

I use Kopia Docker with Unraid NAS.

There is ā€œCA User Scriptsā€ in the community applications, that you can use to run programs directly, without messing with docker. One of the best thing in kopia is that it is single executable file, so put it in some bash script and run without overhead.

Iā€™m running my kopia instance in Docker and itā€™s working perfectly. What errors are you getting? Can you post the output of snapshot list ?

I was eventually able to get the Docker to run, but not having a different issue (after successfully creating my first backup):

This backup is particularly important right now because I encountered some sort of ā€œbitrotā€ on one of my files, and I want to check my backup to see if the bitrot happened before or after a certain date.

In my case two reasons:

  1. I have a program (ā€œHomepageā€) that letā€™s me view all my Docker Containers and their status (running, health, not running, not healthy etc) remotely. It also gives me specific details of Kopia via a custom widget:
    ksnip_20230320-190249

  2. The Docker version of Kopia has a web server that lets me control it remotely. Iā€™m not sure the GUI version for Linux does that. Iā€™m running it on a headless machine.

Then simply run an instance of Kopia Server on your headless client. This one does also run a web UI, where you can check up on your snapshots and even download single files.

1 Like