Closed silversword411 closed 1 year ago
Hi,
is the certificate correct? It seems that it has trouble with the certificate. Maybe the path is wrong? From the command it looks like you have not specified a correct certification. Is my.key and my.cert available in your home directory?
You have to specify the path and the name of the files correctly in order to run a repository server.
Cheers,
is the certificate correct?
Yes, the certs were built by kopia itself when I ran the initial command per the docs
kb1@kb1:/disk2$ kopia server start \
--tls-generate-cert \
--tls-cert-file ~/my.cert \
--tls-key-file ~/my.key \
--address 0.0.0.0:51515 \
--server-control-username username \
--server-control-password password
I couldn't get it to login using the username and pass given at the commandline lauch:
ID: username
Pass: password
It would give me the error: UI Access denied. See https://github.com/kopia/kopia/issues/880#issuecomment-798421751 for more information.
which I'm not understanding. I thought the .htaccess password file was replaced with the new add username@hostname format
...so I ended up using the extra flags to bypass that: --without-password --insecure
Looks like this crash is caused when a kopiaui client connects to the repo when it's launched in insecure mode.
After reading the entire issue 880 issue several times, I finally found/realized the only place I've been able to find so far that explains how to run a kopia repository server and have a login ID/pass you can use: https://github.com/kopia/kopia/issues/880#issuecomment-855291217
kopia server start --tls-cert-file ~/my.cert --tls-key-file ~/my.key --address 0.0.0.0:51515 --server-username=X --server-password=Y
Will let you log into the server with ID: X and Pass: Y
And not crash the server
Hi @silversword411,
it is mentioned in the docs, that you can not start a repo server with flag "insecure":
Make sure you use a recent nginx version (>=1.16) and you start your kopia server with a certificate (--insecure does not work), e.g. https://kopia.io/docs/repository-server/
We may need to extend the doc to make things clearer. Can we close the issue?
Cheers,
Yeah, it's by design. Kopia repository server needs proper user authentication for its clients. PR to fix the panic are welcome.
We may need to extend the doc to make things clearer.
@lupusA I've been trying to get a kopia test system operational for months now in my free time, and there's lots of holes in the docs I'm trying to slowly fill. I'll PR when I get to a good spot
Trying to get a Kopia Repository server running on Deb11.
It runs for a couple mins, and then crashes. No admin login even connected, just one kopiaui agent using as repo.
This is the crash info on the server.
Let me know if there's other logs/info you need.