Kopia UI as root

I am new to Kopia. Can someone let me know how to launch kopia UI as root on ubuntu 20.04? I am not sure if there is an issue wtih my OS or there is different way to launch it as root.

sudo kopia-ui also shows above error

What about: sudo kopia-ui?

I’m also running Ubuntu 20.04, I only get the “running as root” error with sudo or as root, not the other error. But with --no-sandbox the kopia-ui starts as root.

Instead of running as root, use linux capabilities.

setcap cap_dac_read_search=+ep /usr/bin/kopia

1 Like

I found this after trying to get Kopia to back up root folders. The problem is, setting the capability for Kopia isn’t enough; it must be set for Kopia-UI as well. But as soon as you do that, Kopia-UI can’t see libffmpeg.so. Apparently this is by design.

So we’ll need another solution for backing up folders only readable by root.

Try using kopia server instead of kopia-UI. The interface is the same, you just have to have a browser available to use with it, which I’m guessing you do.

It’ll give you the exact same experience, but you’ll be backing up all your root folders no problem!

2 Likes

Are you saying to run kopia server on the machine you want to backup? I’m trying to do that, but can’t figure that out, can’t find much on running a server from the docs. I have tried unsuccessfully to even start it in that mode.

Yeah.

This is the command I use, and the reason for the full path is because I call it on reboot from Cron so it starts automatically on boot.

/usr/bin/kopia server start --insecure --without-password

2 Likes

Thanks, that worked.

Just had the same issue.
The Kopia-UI has a command link on the Snapshots page:
/opt/KopiaUI/resources/server/kopia --config-file=/home/%USER%/.config/kopia/repository-#####
So, rather than running the cli kopia version in /usr/bin/, it runs another.

Running
sudo setcap cap_dac_read_search=+ep /opt/KopiaUI/resources/server/kopia
Seems to have addressed the issue for now… Yet to see if it breaks something

1 Like

As a noob who has run into this issue, I’ll just quickly lay out for other noobs how this solved the problem for me:

  1. Run sudo setcap cap_dac_read_search=+ep /opt/KopiaUI/resources/server/kopia

This does not provide any output.

  1. Launch Kopia UI the regular way via your Gnome launcher or any other way you do it.

Kopia UI can now back up root files.

2 Likes

it worked. If someone apply to kopia-ui it will not work. Just to help someone