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

new Synapse requires tls certificate file #5671

Closed
cybermcm opened this issue Jul 11, 2019 · 2 comments
Closed

new Synapse requires tls certificate file #5671

cybermcm opened this issue Jul 11, 2019 · 2 comments

Comments

@cybermcm
Copy link

Description

creating new container requires a tls.key file although tls is set to false

Steps to reproduce

following the instructions on hub.docker.com, first generate config file and then startup results in
synapse.config._base.ConfigError: Error accessing file '/data/xxx.net.tls.key' (config for tls_private_key_path): No such file or directory

duplicate to #4554 but not solved in my point of view

Version information

If not matrix.org:

1.1.0

  • Install method:

docker-compose

  • Platform:

Debian with Docker version 18.09.7, build 2d0083d

@cybermcm
Copy link
Author

error message due to false environment vars (env vars for generating and running are different)
my fault

@alecdwm
Copy link

alecdwm commented Oct 3, 2019

Also ran into this problem.
For future reference, when running the official docker image, make sure you don't include the SYNAPSE_SERVER_NAME environment variable or your configuration will be shadowed by one based on environment variables:

Legacy dynamic configuration file support

For backwards-compatibility only, the docker image supports creating a dynamic configuration file based on environment variables. This is now deprecated, but is enabled when the SYNAPSE_SERVER_NAME variable is set (and generate is not given).

To migrate from a dynamic configuration file to a static one, run the docker container once with the environment variables set, and migrate_config commandline option. For example:

docker run -it --rm
--mount type=volume,src=synapse-data,dst=/data
-e SYNAPSE_SERVER_NAME=my.matrix.host
-e SYNAPSE_REPORT_STATS=yes
matrixdotorg/synapse:latest migrate_config

This will generate the same configuration file as the legacy mode used, but will store it in /data/homeserver.yaml instead of a temporary location. You can then use it as shown above at Running synapse.

From here

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

2 participants