I have setup coturn reusing my already existing let’s encrypt certificate some weeks ago.
With one of the last let’s encrypt renewals the certbot got upgraded to certbot 1.1.0
(I assume)
It seems with this upgrade, the files within /etc/letsencrypt/live/mydomain/
where replaced with symlinks pointing to the archive directory instead of the actual files.
This breaks coturn in my setup, because it is unable to load the “symlinked” files. My workaround was to delete the symlink and copy back the files from /etc/letsencrypt/archive/mydomain/
into the live
directory.
But, I would like to fix this issue permanently and also understand how and when this was applied. I am using NextCloudPi on a standard x86-64 hardware. Perhaps this is also related to this, but I just don’t know (yet). I assume it is a simple permission problem in combination with coturn.
This is the error coturn
reports via journalctl
after the restart (which happens using hooks automatically after a let’s encrypt renewal).
Feb 04 11:27:53 cloud turnserver[14057]: 0: WARNING: cannot find certificate file: /etc/letsencrypt/live/mydomain/fullchain.pem (1)
Feb 04 11:27:53 cloud turnserver[14057]: 0: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly
Feb 04 11:27:53 cloud turnserver[14057]: 0: WARNING: cannot find private key file: /etc/letsencrypt/live/mydomain/privkey.pem (1)
Feb 04 11:27:53 cloud turnserver[14057]: 0: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly
Feb 04 11:27:53 cloud turnserver[14057]: 0: Relay address to use:
Feb 04 11:27:53 cloud turnserver[14058]: 0: pid file created: /run/turnserver/turnserver.pid
This is the content of the directory I am pointing turnserver.conf
for the certs
drwxr-xr-x 2 root root 4096 Feb 3 07:58 .
drwxr-xr-x 4 root root 4096 Jun 7 2019 ..
lrwxrwxrwx 1 root root 44 Feb 3 07:58 cert.pem -> ../../archive/mydomain/cert9.pem
lrwxrwxrwx 1 root root 45 Feb 3 07:58 chain.pem -> ../../archive/mydomain/chain9.pem
-rw-r--r-- 1 root root 769 Jan 20 21:03 dhparam.pem
lrwxrwxrwx 1 root root 49 Feb 3 07:58 fullchain.pem -> ../../archive/mydomain/fullchain9.pem
lrwxrwxrwx 1 root root 47 Feb 3 07:58 privkey.pem -> ../../archive/mydomain/privkey9.pem
-rw-r--r-- 1 root root 692 Feb 4 2019 README
After replacing the symlinks with the files itself it works
Feb 04 11:45:12 cloud turnserver[14731]: 0: SSL23: Certificate file found: /etc/letsencrypt/live/mydomain/fullchain.pem
Feb 04 11:45:12 cloud turnserver[14731]: 0: SSL23: Private key file found: /etc/letsencrypt/live/mydomain/privkey.pem
Feb 04 11:45:12 cloud turnserver[14731]: 0: TLS1.2: Certificate file found: /etc/letsencrypt/live/mydomain/fullchain.pem
Feb 04 11:45:12 cloud turnserver[14731]: 0: TLS1.2: Private key file found: /etc/letsencrypt/live/mydomain/privkey.pem
Feb 04 11:45:12 cloud turnserver[14731]: 0: TLS cipher suite: ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:!ADH:!AECDH:!MD5
Feb 04 11:45:12 cloud turnserver[14731]: 0: DTLS: Certificate file found: /etc/letsencrypt/live/mydomain/fullchain.pem
Feb 04 11:45:12 cloud turnserver[14731]: 0: DTLS: Private key file found: /etc/letsencrypt/live/mydomain/privkey.pem
Feb 04 11:45:12 cloud turnserver[14731]: 0: DTLS1.2: Certificate file found: /etc/letsencrypt/live/mydomain/fullchain.pem
Feb 04 11:45:12 cloud turnserver[14731]: 0: DTLS1.2: Private key file found: /etc/letsencrypt/live/mydomain/privkey.pem
Feb 04 11:45:12 cloud turnserver[14731]: 0: DTLS cipher suite: ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:!ADH:!AECDH:!MD5
Feb 04 11:45:12 cloud turnserver[14731]: 0: Relay address to use:
Feb 04 11:45:12 cloud turnserver[14732]: 0: pid file created: /run/turnserver/turnserver.pid
I also tried to extend the permissions for the archive
folder by adding read rights for everyone, but this did not really work - but perhaps I just missed something.
Thanks for any tip