Skip to content

Commit d67a425

Browse files
authored
Update README.md
1 parent 6990f2f commit d67a425

1 file changed

Lines changed: 14 additions & 23 deletions

File tree

README.md

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@ This example starts a WebDAV server on port 80. It can only be accessed with a s
66

77
When using unencrypted HTTP, use `Digest` authentication (instead of `Basic`) to avoid sending plaintext passwords in the clear.
88

9-
To make sure your data doesn't get deleted, you'll probably want to create a persistent storage volume (`-v vol-webdav:/var/lib/dav`) or bind mount a directory (`-v /path/to/directory:/var/lib/dav`):
10-
119
```
12-
docker run --restart always -v /srv/dav:/var/lib/dav \
13-
-e AUTH_TYPE=Digest -e USERNAME=alice -e PASSWORD=secret1234 \
14-
--publish 80:80 -d apachewebdav/apachewebdav
15-
10+
docker run -d --restart always -e 'AUTH_TYPE'='Digest' -e 'USERNAME'='alice' -e 'PASSWORD'='mypassword' \
11+
-v '/mnt/webdav':'/var/lib/dav/data':'rw' -v '/mnt/appdata':'/var/lib/dav':'rw' \
12+
-p '80:80' 'apachewebdav/apachewebdav'
1613
```
1714

1815
#### Via Docker Compose:
@@ -28,24 +25,20 @@ services:
2825
environment:
2926
AUTH_TYPE: Digest
3027
USERNAME: alice
31-
PASSWORD: secret1234
32-
PUID: 1000
33-
GUID: 1000
28+
PASSWORD: mypassword
3429
volumes:
35-
- /srv/dav:/var/lib/dav
30+
- /mnt/appdata:/var/lib/dav
31+
- /mnt/webdav:/var/lib/dav/data
3632
3733
```
3834
### Secure WebDAV with SSL
3935

40-
We recommend you use a reverse proxy (eg, Traefik) to handle SSL certificates. You can see an example of how to do that [here](https://github.com/BytemarkHosting/configs-webdav-docker).
41-
42-
If you're happy with a self-signed SSL certificate, specify `-e SSL_CERT=selfsigned` and the container will generate one for you.
36+
We recommend you use a reverse proxy (eg, Nginx Proxy Manager) to handle SSL certificates. If you're happy with a self-signed SSL certificate, specify `-e SSL_CERT=selfsigned` and the container will generate one for you.
4337

4438
```
45-
docker run --restart always -v /srv/dav:/var/lib/dav \
46-
-e AUTH_TYPE=Basic -e USERNAME=test -e PASSWORD=test \
47-
-e SSL_CERT=selfsigned --publish 443:443 -d bytemark/webdav
48-
39+
docker run -d --restart always -e 'AUTH_TYPE'='Digest' -e 'USERNAME'='alice' -e 'PASSWORD'='mypassword' \
40+
-v '/mnt/webdav':'/var/lib/dav/data':'rw' -v '/mnt/appdata':'/var/lib/dav':'rw' \
41+
-e SSL_CERT=selfsigned -p '80:80' 'apachewebdav/apachewebdav'
4942
```
5043

5144
If you bind mount a certificate chain to `/cert.pem` and a private key to `/privkey.pem`, the container will use that instead!
@@ -54,7 +47,7 @@ If you bind mount a certificate chain to `/cert.pem` and a private key to `/priv
5447

5548
Specifying `USERNAME` and `PASSWORD` only supports a single user. If you want to have lots of different logins for various users, bind mount your own file to `/user.passwd` and the container will use that instead.
5649

57-
If using `Basic` authentication, run the following commands:
50+
If using `Basic` authentication, run the following commands through the Containers Console:
5851

5952
```
6053
touch user.passwd
@@ -65,7 +58,6 @@ htpasswd -B user.passwd bob
6558

6659
If using `Digest` authentication, run the following commands. (NB: The default `REALM` is `WebDAV`. If you specify your own `REALM`, you'll need to run `htdigest` again with the new name.)
6760

68-
6961
```
7062
touch user.passwd
7163
htdigest user.passwd WebDAV alice
@@ -87,7 +79,6 @@ All environment variables are optional. You probably want to at least specify `U
8779
* **`PASSWORD`**: Authenticate with this password (and the username above). This is ignored if you bind mount your own authentication file to `/user.passwd`.
8880
* **`ANONYMOUS_METHODS`**: Comma-separated list of HTTP request methods (eg, `GET,POST,OPTIONS,PROPFIND`). Clients can use any method you specify here without authentication. Set to `ALL` to disable authentication. The default is to disallow any anonymous access.
8981
* **`SSL_CERT`**: Set to `selfsigned` to generate a self-signed certificate and enable Apache's SSL module. If you specify `SERVER_NAMES`, the first domain is set as the Common Name.
90-
* **`PUID`**: file owner's UID of `/var/lib/dav`
91-
* **`PGID`**: file owner's GID of `/var/lib/dav`
92-
93-
82+
* **`PUID`**: file owner's UID of `/var/lib/dav/data`
83+
* **`PGID`**: file owner's GID of `/var/lib/dav/data`
84+
* **`PUMASK`**: umask of `/var/lib/dav/data`

0 commit comments

Comments
 (0)