# Which is better: WebDAV or kopia server on remote NAS?

**URL:** <https://kopia.discourse.group/t/which-is-better-webdav-or-kopia-server-on-remote-nas/3248>\
**Category:** Support\
**Created:** [September 6, 2024, 10:04am UTC](https://kopia.discourse.group/t/which-is-better-webdav-or-kopia-server-on-remote-nas/3248 "2024-09-06T10:04:23Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![97b4958b055b](https://avatars.discourse-cdn.com/v4/letter/9/47e85d/32.png) [@97b4958b055b](https://kopia.discourse.group/u/97b4958b055b)\
**Post date:** [March 29, 2025, 6:43pm UTC](https://kopia.discourse.group/t/which-is-better-webdav-or-kopia-server-on-remote-nas/3248/18 "2025-03-29T18:43:59Z")

</div>

> [@kopund](#):
>
> I was thinking more along the line of whether it could be possible to run kopia server without putting the repo password into the docker compose, but the client supplying it.
> 
> Wouldn’t it make sense if that option existed?

It does exist and can be done. The capabilities are already built into the OS (ie: \*nix). I presume both endpoints have `bash`. You’ll need to first set up ssh keys between the endpoints for password-less logins. Then strip the `KOPIA_PASSWORD` from the docker compose file.

**Tip** : Prefixing a single ‘ ’ (nbsp/space) before a shell command will keep it from [appearing in the bash history](https://www.baeldung.com/linux/execute-command-without-history) provided `HISTCONTROL=ignoreboth` is in `$HOME/.bashrc`.

Then you can remote exec something like `ssh docker-user@remote-endpoint ' KOPIA_PASSWORD=myPassword; docker up --whatever-is-the-rest-of-the-command-string-here'`. Again, note the single space before `KOPIA_PASSWORD`.

Note I do not use docker but this about executing a command on a remote machine. In this case would be whatever is your `docker up` string or equivalent.

Combine with Kopia’s `actions` to do this automatically/on-demand, per snapshot job… or a cronjob.

If you want to add an _additional_ layer of security **but** with the requirement of manual intervention before sending the password, try adapting the following script by adding the remote ssh exec command to the end of:

> [@Use the webgui server without running a backend server?](https://kopia.discourse.group/t/use-the-webgui-server-without-running-a-backend-server/2632/3):
>
> I don’t see why not. It’d require manual intervention before you booted the docker image, however. I’d use gocryptfs for this. It’s nice & lightweight. It also happens to use the same cryptography as Kopia. After you remove whatever is hard coded for KOPIA\_PASSWORD from the docker compose file, subsequent launches should just be fired via $HOME/bin/get-creds-kopia.sh (you might want to set a bash alias). #!/usr/bin/env bash # the path to the encrypted gocryptfs dir CRED\_ENC="/path/cred.enc" …

This way the password never leaves your possession.

_(posted for future discoverability)_

> **[SSH: Execute Remote Command or Script - Linux - ShellHacks](https://www.shellhacks.com/ssh-execute-remote-command-script-linux/)**
>
> How to execute remote command, multiple commands or shell (Bash) script over SSH (Secure Shell). Examples of SSH command in Linux terminal. How to use SSH.

> **[3 Steps to Perform SSH Login Without Password - ShellHacks](https://www.shellhacks.com/ssh-login-without-password/)**
>
> It is very easy to perform SSH login to the remote server without prompting a password. With a help of utilities from OpenSSH package, you can generate authentication keys on your local machine, copy public key to the remote server and add identities...

> **[Actions](https://kopia.io/docs/advanced/actions/)**
>
> Fast and Secure Open-Source Backup Software for Windows, Mac, and Linux

---

_[View the full topic](https://kopia.discourse.group/t/which-is-better-webdav-or-kopia-server-on-remote-nas/3248)._
