Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

synapse exits if it can't read the ssl certificates #7904

Closed
mgrant0 opened this issue Jul 19, 2020 · 2 comments
Closed

synapse exits if it can't read the ssl certificates #7904

mgrant0 opened this issue Jul 19, 2020 · 2 comments

Comments

@mgrant0
Copy link

mgrant0 commented Jul 19, 2020

Description

If you configure ssl certs in a directory that is unreadable, synapse exits with no error in the logs.

May be related to

Steps to reproduce

I already use certbot on my server to get a cert for something else so I wanted to re-use the cert in /etc/letsencrypt/live.

  • edit homeserver.yaml and set:
tls_certificate_path: "/etc/letsencrypt/live/matrix.example.org/fullchain.pem"
tls_private_key_path: "/etc/letsencrypt/live/matrix.example.org/privkey.pem"
  • start the server using systemctl start matrix-synapse

The server starts briefly and then exits with no useful error in homeserver.log

It should log a permission-denied error when it can't open the cert/key files.

To fix the permission problem with letsencrypt, I did:

chmod g+rx /etc/letsencrypt/archive
chmod g+rx /etc/letsencrypt/live
chgrp ssl-cert /etc/letsencrypt/live

and of course, I added matrix-ssl to the ssl-cert group in /etc/group:

ssl-cert:x:114:matrix-synapse

Version information

  • Homeserver: my own home server on my own domain

  • Version: 1.16.0

  • Install method: apt install matrix-synapse

  • Platform: debian testing

@clokep
Copy link
Member

clokep commented Jul 20, 2020

I suspect this is a duplicate of #4641.

@anoadragon453
Copy link
Member

@clokep Seems so.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants