#1009773 matrix-synapse: updating the package rewrites /etc/matrix-synapse/conf.d/server_name.yaml with wrong domain name

Package:
matrix-synapse
Source:
matrix-synapse
Description:
Matrix reference homeserver
Submitter:
Alessandro Polverini
Date:
2022-04-20 14:45:02 UTC
Severity:
important
#1009773#5
Date:
2022-04-17 08:16:59 UTC
From:
To:
The installer on every update rewrites the content of the file
/etc/matrix-synapse/conf.d/server_name.yaml setting server_name with the
host name of the server it's running.

This can be right most of times, but not when we use server delegation,
i.e. when for example we run synapse on matrix.domain.ext for users of
domain.ext

In this case the file get created with the content:
server_name: matrix.domain.ext

while it should be:
server_name: domain.ext

So every time I upgrade the package I need to stop synapse (since it
restart with the wrong settings and gives error), manually modify the
file and restart it again.

I don't know what the right fix for this is, maybe just avoid
re-creating the file if it already exists?

Thanks for mantaining this package!

#1009773#10
Date:
2022-04-20 13:58:35 UTC
From:
To:
On Sun, 17 Apr 2022 10:16:59 +0200, Alessandro Polverini <alex@polverini.org> said:

That's not correct.  It sets server_name to the value set in debconf.
To change it, run "dpkg-reconfigure matrix-synapse" as root.