Hello,
I am a new user of prosody and english isnt my main language so my appologies by advance if i'm telling newbie or not understandable things…
With a self-signed key and certificate prosody and xmpp works fine on my gnu/linux debian9 laptop and on android with xabber.
But I am willing to use letsencrypt to avoid the risk of being blocked or difficulties (ie on IOS file transfert wont work due to ssl issue when its working perfectly well with xabber on android…).
I am running prosody on a raspberry pi 3 with raspbian strech (i am familiar with debian)
Prosody's version is 9.12-2
#apt-cache policy prosody
prosody:
Installé : 0.9.12-2
I installed and launched the certbot script on my server ( #certbot --apache ) and it worked fine, my certificate is ok with firefox.
I change the key in my config file /etc/prosody/prosody.cfg.lua
and wrote the next two lines everywhere it is about ssl:
/etc/letsencrypt/live/mywebsite/privkey.pem
/etc/letsencrypt/live/mywebsite/cert.pem
when i reboot prosody I have an error my log
Nov 27 11:16:45 localhost:tls error Unable to initialize TLS: error loading private key (Permission denied)
Nov 27 11:16:45 certmanager error SSL/TLS: Failed to load '/etc/letsencrypt/live/
etboum.fr/privkey.pem': Check that the permissions allow Prosody to read this file. (for localhost)
I understand that prosody is not allowed to read the private key due to the fact that prosody is running as a no-root user and therefore hasn't the permission to use the key.
I saw on a forum that the solution would be to include prosody in a group that owns the keys, this way prosody would still be non root but could use the key.
(
https://community.letsencrypt.org/t/how-to-use-certs-in-non-root-services/2690)
My problem is that I don't know how to do that in practice, and the official tuto commands are not working on my server (
https://prosody.im/doc/certificates)
in the § permission:
pi@raspberrypi:~ $ sudo chmod 600 /etc/letsencrypt/live/
etboum.fr/privkey.pempi@raspberrypi:~ $ sudo chown prosody:prosody /etc/letsencrypt/live/
etboum.fr/privkey.pempi@raspberrypi:~ $ sudo -u prosody cat /etc/letsencrypt/live/
etboum.fr/privkey.pemcat: /etc/letsencrypt/live/
etboum.fr/privkey.pem: Permission non accordée
I think that my problem is not a complicated one, but I spent a lot of time to try and I failed to fix it.
I really tried to do what those forum said but I'm affraid my technical skyll are too low to fix it.
I need the precise and exact commands to succeed……
So if someone here knows how to do that, do not hesitate to answer.
Have a nice day,
Lucas
PS: en français aussi c'est bien :)