Hello,
Here you go my setup. Hope this will be enough to reproduce issue
docker-compose.yml
volumes:
mongodb:
driver: local
driver_opts:
o: bind
type: none
device: ./mongodb
networks:
app:
name: app
db:
name: db
services:
rocketchat1:
container_name: rocketchat1
image: registry.rocket.chat/rocketchat/rocket.chat:6.12.0
restart: always
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ./rocketchat/uploads:/app/uploads
environment:
MONGO_URL: "mongodb://mongodb:27017/rocketchat?replicaSet=rs0"
MONGO_OPLOG_URL: "mongodb://mongodb:27017/local?replicaSet=rs0"
ROOT_URL: http://localhost:3000
DEPLOY_METHOD: docker
depends_on:
- mongodb
networks:
- app
- db
ports:
- 3000:3000
- 3300:3300
expose:
- 3300
synapse1:
image: matrixdotorg/synapse:latest
container_name: synapse1
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ./synapse_data1:/data:rw
environment:
- SYNAPSE_SERVER_NAME=<SERVERNAME>
- SYNAPSE_REPORT_STATS=no
restart: always
depends_on:
- postgres
networks:
- app
- db
ports:
- 8008:8008
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
mongodb:
image: docker.io/bitnami/mongodb:6.0.13
container_name: mongodb
restart: always
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- mongodb:/bitnami/mongodb:rw
environment:
MONGODB_REPLICA_SET_MODE: primary
MONGODB_REPLICA_SET_NAME: rs0
MONGODB_PORT_NUMBER: 27017
MONGODB_INITIAL_PRIMARY_HOST: mongodb
MONGODB_INITIAL_PRIMARY_PORT_NUMBER: 27017
MONGODB_ADVERTISED_HOSTNAME: mongodb
MONGODB_ENABLE_JOURNAL: true
ALLOW_EMPTY_PASSWORD: yes
networks:
- db
postgres:
image: docker.io/postgres:16-alpine
container_name: postgres
restart: always
environment:
- POSTGRES_USER=<PG_USERNAME>
- POSTGRES_PASSWORD=<PG_PASSWORD>
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
volumes:
- ./postgres:/var/lib/postgresql/data
networks:
- db
server_name: "<SERVERNAME>"
pid_file: /data/homeserver.pid
listeners:
- port: 8008
tls: false
type: http
x_forwarded: true
resources:
- names: [client, federation]
compress: false
database:
name: psycopg2
txn_limit: 10000
args:
user: <PG_USERNAME>
password: <PG_PASSWORD>
database: synapse
host: postgres
port: 5432
cp_min: 5
cp_max: 10
log_config: "/data/<SERVERNAME>.log.config"
media_store_path: /data/media_store
registration_shared_secret: "<registration_shared_secret>"
report_stats: false
macaroon_secret_key: "<macaroon_secret_key>"
signing_key_path: "/data/<SERVERNAME>.signing.key"
trusted_key_servers:
- server_name: "matrix.org"
app_service_config_files:
- /data/rocketchat.yaml
rocketchat.yaml - copied from RocketChat UI
NGINX
server {
listen 80 default_server;
location / {
rewrite ^ https://$host$request_uri? permanent;
}
include include/certbot.location;
}
server {
listen 443 ssl;
server_name <rocketchat>;
client_max_body_size 10m;
location / {
proxy_pass http://<docker>:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /.well-known/matrix/server {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.server": "<matrix>"}';
}
location /.well-known/matrix/client {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.homeserver": {"base_url": "https://<matrix>"}}';
}
access_log /var/log/nginx/<rocketchat>.log ;
error_log /var/log/nginx/<rocketchat>.log ;
ssl_certificate /etc/nginx/ssl/live/<rocketchat>/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/<rocketchat>/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
listen 443 ssl;
listen 8448 ssl;
server_name <matrix>;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
location ~ ^(/_matrix|/_synapse/client) {
proxy_pass http://<docker>:8008;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
client_max_body_size 50M;
proxy_http_version 1.1;
}
access_log /var/log/nginx/<matrix>.log ;
error_log /var/log/nginx/<matrix>.log ;
ssl_certificate /etc/nginx/ssl/live/<matrix>/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/<matrix>/privkey.pem;
}
NS Records
<rocketchat> IN A <Public IP>
<matrix> IN A <Public IP>
Port Forwarding
ANY to <Public IP> port 80,443,8448 DST-NAT DST-PORT Original
Test Results:
https://federationtester.matrix.org/api/report?server_name= <rocketchat>
{
"WellKnownResult": {
"m.server": "<matrix>",
"CacheExpiresAt": 0
},
"DNSResult": {
"SRVSkipped": false,
"SRVCName": "",
"SRVRecords": null,
"SRVError": {
"Message": "lookup _matrix._tcp.<matrix> on 8.8.8.8:53: no such host"
},
"Hosts": {
"<matrix>": {
"CName": "<matrix>.",
"Addrs": [
"<Public IP>"
],
"Error": null
}
},
"Addrs": [
"<Public IP>:8448"
]
},
"ConnectionReports": {
"<Public IP>:8448": {
"Certificates": [
{
"SubjectCommonName": "<matrix>",
"IssuerCommonName": "E5",
"SHA256Fingerprint": "<Fingerprin>",
"DNSNames": [
"<matrix>"
]
},
{
"SubjectCommonName": "E5",
"IssuerCommonName": "ISRG Root X1",
"SHA256Fingerprint": "Xf2zzzGybyPYfAnzoM72QvZAaan7fP4pJwu13A8eFrs",
"DNSNames": null
}
],
"Cipher": {
"Version": "TLS 1.3",
"CipherSuite": "TLS_AES_128_GCM_SHA256"
},
"Checks": {
"AllChecksOK": true,
"MatchingServerName": true,
"FutureValidUntilTS": true,
"HasEd25519Key": true,
"AllEd25519ChecksOK": true,
"Ed25519Checks": {
"ed25519:a_Adoq": {
"ValidEd25519": true,
"MatchingSignature": true
}
},
"ValidCertificates": true
},
"Errors": [],
"Ed25519VerifyKeys": {
"ed25519:a_Adoq": "<ED_Key1>"
},
"Info": {},
"Keys": {
"old_verify_keys": {},
"server_name": "<rocketchat>",
"signatures": {
"<rocketchat>": {
"ed25519:a_Adoq": "<ED_Key2>"
}
},
"valid_until_ts": 1726051527513,
"verify_keys": {
"ed25519:a_Adoq": {
"key": "<ED_Key1>"
}
}
}
}
},
"ConnectionErrors": {},
"Version": {
"name": "Synapse",
"version": "1.114.0"
},
"FederationOK": true
}