-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Cannot start Synapse through docker-compose: Permission denied: '/data/homeserver.yaml'
#15202
Comments
I have edited your post to try and correct the formatting of your docker-compose file.
It's really useful for us if you can try to produce a self-contained example compose file. This one seems to do the trick: version: '3'
services:
synapse-server:
image: matrixdotorg/synapse:latest
container_name: synapse
environment:
- SYNAPSE_SERVER_NAME=my.domain.com
- SYNAPSE_REPORT_STATS=no
restart: unless-stopped
networks:
- synapse
volumes:
- synapse:/data
ports:
- 8008:8008
volumes:
synapse:
networks:
synapse: |
I think you should probably mark the volume as external so that docker-compose doesn't try to create one for you. volumes:
synapse:
external: true Let us know if that solves your problem (or at least gets your further). Also, if you find any of our instructions or examples are out of date, do let us know. |
Still not working. This is my full docker-compose file. It includes Postgres DBs and a Gitea instance which also isn't working. This is my first time really trying to use Docker for something so all of this is probably wrong.
|
Just to be clear, when you say it's still not working are you receiving the same |
Yes, it is the same error verbatim as in the OP. |
Permission denied: '/data/homeserver.yaml'
Permission denied: '/data/homeserver.yaml'
Permission denied: '/data/homeserver.yaml'
A couple of things for you to try, based on the setup we use in the Element Web automated tests. If you're using actual Docker, try adding this to the
(Assuming your user ID is 1000.) If you're using podman, try:
and inside
These are just guesses based on what I got working here, but might be worth a try. |
Added those and now I'm running into an issue I had previously, where it doesn't see the
Current
|
Description
Every time I attempt to start a new synapse server from docker-compose I receive the below error.
Steps to reproduce
synapse
):sudo docker-compose up
Homeserver
Custom hostserver
Synapse Version
Latest from matrixdotorg/synapse
Installation Method
Docker (matrixdotorg/synapse)
Database
SQLite
Workers
Single process
Platform
Debian 11 Bullseye
Docker (docker-compose)
Configuration
Stock/vanilla config
Relevant log output
Anything else that would be useful to know?
I have created the volume from scratch multiple times, manually set permissions on the directory in the volume as suggested by ma-fl in #6303, and generated a new config by manually running the docker container with
generate
ormigrate_config
commands.The text was updated successfully, but these errors were encountered: