Hey, first, thank you for this tutorial. I've been looking for something similar for quite a while and never had the courage to tame the beast by myself.
I'm using portainer. I created manually the folders as required and copy pasted the .env and dockerfile in portainer. + the config file in the required folder. (i did not create the folder for webhooks as I had no use for that bridge yet.)
also I did not run "sudo docker run -it --rm
-v=${CONF_PATH}/homeserver:/data
-e SYNAPSE_SERVER_NAME=matrix.${DOMAIN}
-e SYNAPSE_REPORT_STATS=yes
matrixdotorg/synapse:latest generate
" before bringing the whole stack up as i'm not super confortable with docker CLI and dont want to create container that I can't manage from portainer
the stack start but "homerserver"/synapse stay stuck in a boot loop due to some permission issue...
Here is the full log :
Starting synapse with args -m synapse.app.homeserver --config-path /data/homeserver.yaml
This server is configured to use 'matrix.org' as its trusted key server via the
'trusted_key_servers' config option. 'matrix.org' is a good choice for a key
server since it is long-lived, stable and trusted. However, some admins may
wish to use another server for this purpose.
To suppress this warning and continue using 'matrix.org', admins should set
'suppress_key_server_warning' to 'true' in homeserver.yaml.
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.11/logging/config.py", line 573, in configure
handler = self.configure_handler(handlers[name])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/logging/config.py", line 757, in configure_handler
result = factory(**kwargs)
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/logging/handlers.py", line 214, in __init__
BaseRotatingHandler.__init__(self, filename, 'a', encoding=encoding,
File "/usr/local/lib/python3.11/logging/handlers.py", line 58, in __init__
logging.FileHandler.__init__(self, filename, mode=mode,
File "/usr/local/lib/python3.11/logging/__init__.py", line 1181, in __init__
StreamHandler.__init__(self, self._open())
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/logging/__init__.py", line 1213, in _open
return open_func(self.baseFilename, self.mode,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/homeserver.log'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/local/lib/python3.11/site-packages/synapse/app/homeserver.py", line 419, in <module>
main()
File "/usr/local/lib/python3.11/site-packages/synapse/app/homeserver.py", line 409, in main
hs = setup(sys.argv[1:])
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/synapse/app/homeserver.py", line 368, in setup
synapse.config.logger.setup_logging(hs, config, use_worker_options=False)
File "/usr/local/lib/python3.11/site-packages/synapse/config/logger.py", line 348, in setup_logging
_setup_stdlib_logging(config, log_config_path, logBeginner=logBeginner)
File "/usr/local/lib/python3.11/site-packages/synapse/config/logger.py", line 246, in _setup_stdlib_logging
_load_logging_config(log_config_path)
File "/usr/local/lib/python3.11/site-packages/synapse/config/logger.py", line 303, in _load_logging_config
logging.config.dictConfig(log_config)
File "/usr/local/lib/python3.11/logging/config.py", line 823, in dictConfig
dictConfigClass(config).configure()
File "/usr/local/lib/python3.11/logging/config.py", line 580, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'file'
and the folder structure
/pool/container/matrix-stack$ ls -al
total 87
drwxrwxrwx 13 user user 13 Sep 5 18:49 .
drwxr-xr-x 34 user user 34 Sep 5 17:27 ..
drwx------ 19 lxd user 26 Sep 5 19:49 db
drwxrwxrwx 3 user user 4 Sep 5 19:50 facebook-bridge
drwxrwxrwx 2 user user 5 Sep 5 19:50 homeserver
drwxrwxrwx 2 root root 2 Sep 5 18:49 homeserver-media_store
drwxrwxrwx 2 user user 2 Sep 5 17:28 homeserver_media-store
drwxrwxrwx 5 1337 1337 9 Sep 5 19:49 maubot
drwxrwxrwx 2 user user 3 Sep 5 18:21 proxy
drwxrwxrwx 3 user user 4 Sep 5 19:50 telegram-bridge
drwxrwxrwx 2 user user 2 Sep 5 17:28 turn
drwxrwxrwx 2 user user 2 Sep 5 17:27 webchat
drwxrwxrwx 3 root root 3 Sep 5 18:49 webhooks
(excuse the permission, I was loosing patience and chmod 777)
Would you happen to have an idea of why it's unable to create the logfile ? Especially since the crash dump seems to suggest that it's trying to create it at the root of the container, which is not mapped to the host file system if I understand correctly, so it should not have any permission problem.
Hey, first, thank you for this tutorial. I've been looking for something similar for quite a while and never had the courage to tame the beast by myself.
I'm using portainer. I created manually the folders as required and copy pasted the .env and dockerfile in portainer. + the config file in the required folder. (i did not create the folder for webhooks as I had no use for that bridge yet.)
also I did not run "sudo docker run -it --rm
-v=${CONF_PATH}/homeserver:/data
-e SYNAPSE_SERVER_NAME=matrix.${DOMAIN}
-e SYNAPSE_REPORT_STATS=yes
matrixdotorg/synapse:latest generate
" before bringing the whole stack up as i'm not super confortable with docker CLI and dont want to create container that I can't manage from portainer
the stack start but "homerserver"/synapse stay stuck in a boot loop due to some permission issue...
Here is the full log :
and the folder structure
(excuse the permission, I was loosing patience and chmod 777)
Would you happen to have an idea of why it's unable to create the logfile ? Especially since the crash dump seems to suggest that it's trying to create it at the root of the container, which is not mapped to the host file system if I understand correctly, so it should not have any permission problem.