In the swag configuration nginx/proxy-confs I have renamed the synapse.subdomain.conf.sample to synapse.subdomain.conf without change the configuration file.
When I try to connect to https://matrix.my.duckdns.org/ I get a 502 Bad Gateway error.
In the swag configuration nginx/proxy-confs I have renamed the synapse.subdomain.conf.sample to synapse.subdomain.conf without changes. After that I restarted swag.
I did the initial configuration of synapse with the following command. docker-compose run --rm synapse generate
In the homeserver.yaml I verified that the server name is stored correctly and that TLS is deactivated.
Finally, I started the synapse server with the docker-compose up -d command.
If the following image appears after calling https://matrix.my_own.duckdns.org in the browser, everything works.
Depending on the setting of the homserver.yaml file, new USERs must be created manually, this can be done by using the command docker exec -it synapse register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml.