Is it possible to start a server from a remote workstation?

Hello,

On the server workstation, I can start my server with

kopia server start
–tls-cert-file ~/my.cert --tls-key-file ~/my.key
–address https://0.0.0.0:51515
–server-control-username control --server-control-password my-password

After shutdown, on the server workstation, I changed 0.0.0.0 with 192.168.1.52 (which is the LAN address of the server workstation) and the server started. From a remote workstation, I then could create snapshots using “–address https://192.168.1.52:51515

I copied the certificate and the key files to the remote station and typed

kopia server start
–tls-cert-file ~/my.cert --tls-key-file ~/my.key
–address https://192.168.1.52:51515
–server-control-username control --server-control-password my-password

and I got the error "ERROR failed to open repository: unable to establish session for purpose=: error establishing session: Session(): rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 192.168.1.52:51515: connect: connection refused ».
Of course, connection to 192.168.1.52 is not refused as I can create snapshots.

Where is my mistake?

Christian

PS: and “kopia server shutdown … --address https://192.168.1.52:51515” works from the remote workstation.

You can’t connect to the remote Kopia server, if it hasn’t been started before. And what would be the reason to stop the remote Kopia server anyway, once its started? You are running a Kopia server for a reason, aren’t you?

What do you try to achieve here?

My aim is to start the server from the remote station, if it has not been started for any reason on the server side.

Well… why shouldn’t it? Also, that would a problem to be tackled on the system, where Kopia server runs on - not a remote one. If you can manage to have Kopia server being run at startup, you should be fine. If Kopia server, for whatever reason, crash - just trying to start it up remotely without investigating reason for its crash earlier, not a reasonable strategy.

That being said - my Kopia servers - are rock solid and the only issues we had with rather big repos with 25k+ snapshots, have been resolved with 0.17. I’d go out on a limb and say, other than personal fun, this endeavour does not warrant any of your time. :wink: