Kopia server has been set up in Docker on Debian according to Download & Installation | Kopia. It is exposed on 443 using TLS certificate through Nginx Proxy Manager and I’ve been able to successfully setup and connect a Windows 10 client which is successfully obeying its snapshot policy.
I’m now setting up a client using Docker on Debian. The authentication and handshake appears to succeed but the session ends immediately and the container restarts without error.
I wasn’t able to determine from the documentation whether additional commands need to be specified for a Docker client in order for it to sustain a session and execute tasks after connection, but it doesn’t appear to get past that stage.
Docker logs
kopia | starting session for user "user@client" from 192.168.176.1:60086
kopia-client | Connected to repository API Server.
kopia | session ended for user "user@client" from 192.168.176.1:60086
kopia-client exited with code 0
kopia | starting session for user "user@client" from 192.168.176.1:53858
kopia-client | Connected to repository API Server.
kopia | session ended for user "user@client" from 192.168.176.1:53858
kopia-client exited with code 0
kopia | starting session for user "user@client" from 192.168.176.1:44040
kopia-client | Connected to repository API Server.
kopia | session ended for user "user@client" from 192.168.176.1:44040
kopia-client exited with code 0
kopia-client | Connecting to server 'https://backup.example.com:443' as 'user@client'...
kopia | starting session for user "user@client" from 192.168.176.1:59314
kopia-client | Connected to repository API Server.
kopia | session ended for user "user@client" from 192.168.176.1:59314
Docker Compose file (server)
kopia:
image: kopia/kopia:latest
container_name: kopia
restart: unless-stopped
environment:
- KOPIA_PASSWORD=${REPOSITORY_PWD}
- TZ=${TIMEZONE}
logging:
options:
max-size: 10m
volumes:
- ${DATA_ROOT}/kopia/config:/app/config
- ${DATA_ROOT}/kopia/cache:/app/cache
- ${DATA_ROOT}/kopia/logs:/app/logs
- qnap-backup-kopia:/mnt/nfs
- ${DATA_ROOT}/proxy/letsencrypt/live/npm-6/fullchain.pem:/certs/fullchain.pem:ro
- ${DATA_ROOT}/proxy/letsencrypt/live/npm-6/privkey.pem:/certs/privkey.pem:ro # from NPM
command:
- server
- start
- --disable-csrf-token-checks
- --tls-cert-file=/certs/fullchain.pem
- --tls-key-file=/certs/privkey.pem
- --address=0.0.0.0:51515
- --server-username=${SERVER_USR}
- --server-password=${SERVER_PWD}
- --server-control-username=${SERVER_CTRL_USER}
- --server-control-password=${SERVER_CTRL_PWD}
ports:
- 51515:51515
Docker compose file (client)
kopia-client:
image: kopia/kopia
container_name: kopia-client
restart: unless-stopped
environment:
- TZ=${TIMEZONE}
command: >
repository connect server --url=${SERVER_URL}
--override-username=${CLIENT_USR}
--override-hostname=${CLIENT_HOST}
--password=${CLIENT_PWD}
--enable-actions
&& snapshot create
logging:
options:
max-size: 10m
volumes:
- ${BACKUP_ROOT}:/backup_root
Any guidance around how to setup the client in Docker would be appreciated please.
I created an issue here Unable to proceed with commands after connecting from client to server · Issue #4091 · kopia/kopia · GitHub but my issue may be better as a discussion.