0

I am trying to get a Matrix Synapse server running on my Synology NAS through docker.

When I run the generate command to get the intial homeserver.yaml, it does get generated :

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

Creating log config /data/my.matrix.host.log.config
Generating config file /data/homeserver.yaml
Generating signing key file /data/my.matrix.host.signing.key
A config file has been generated in '/data/homeserver.yaml' for server name 'my.matrix.host'. Please review this file and customise it to your needs.

So the file is generated in /volume1/@docker/volumes/synapse-config/_data but I don't know how to actually access this folder.

How can I specify within the docker generate command where I would like the /data data to reside ? I have created a folder (/volume1/synapse/data) to that effect but I don't know how to make sure the output of the docker generate actually goes there.

Chapo
  • 2,563
  • 3
  • 30
  • 60

2 Answers2

1

With your --mount you sepcify what should be mapped to /data within the container.

Use e.g. -v /volume1/synapse/data:/data instead to map it to some directory on the host filesystem.

lub
  • 136
  • 2
0

The image you are trying to use supports this environment variable, according to the documentation:

`SYNAPSE_CONFIG_PATH`: path to the file to be generated. Defaults to <SYNAPSE_CONFIG_DIR>/homeserver.yaml

To inject this ENV, add -e SYNAPSE_SERVER_NAME=<desired-path> in your docker run command

Neo Anderson
  • 5,957
  • 2
  • 12
  • 29
  • 1
    Yes I tried that but for some reaon it does not recognize my folder `FileNotFoundError: [Errno 2] No such file or directory: '/volume1/Matrix/synapse/config'`. I am positive this folder exists – Chapo Jul 26 '20 at 13:46