Linuxserver / letsencrypt - Initial run

Hello, I would like to use this container to certify several sub-domains defined at OVH. Normally and according to the documentation, on first use example configuration files are created. I tried multiple configurations and each attempt failed with the error:

ERROR: Named volume “</path/to/appdata/config>:/etc/letsencrypt/docker/config:rw” is used in service “letsencrypt” but no declaration was found in the volumes section" and no file created!

What’s my error?
Here is my docker_file

version: “2.1”
services:
letsencrypt:
image: linuxserver/letsencrypt
container_name: letsencrypt
cap_add:
- NET_ADMIN
environment:
- PUID=0
- PGID=0
- TZ=Europe/Brussels
- URL=yy.eu
- SUBDOMAINS=www,jitsi,etherpad
- VALIDATION=dns
- DNSPLUGIN=ovh
- EMAIL=xx@
- DHLEVEL=2048 #optional
- ONLY_SUBDOMAINS=false #optional
- STAGING=false #optional
volumes:
- </path/to/appdata/config>:/etc/letsencrypt/docker/config
ports:
- 443:443
- 80:80 #optional
restart: unless-stopped

Thank you for your advice

Your volume mount for /config is wrong. You have changed the right side, which you should not do. You are supposed to change the left side where it says /path/to/appdata/config.

I would also advice you to not use root for PUID & PGID. Use a normal user. And there is no need to have the appdata stored in /etc/. Use the home folder of the user you mapped to the PUID & PGID.

1 Like