girlbossceo / conduwuit

a very cool, featureful fork of conduit
https://conduwuit.puppyirl.gay/
Apache License 2.0
184 stars 27 forks source link

Connection issue with select clients - M_NOT_FOUND: Not found #489

Closed rattencreep closed 1 day ago

rattencreep commented 4 days ago

I am new to conduwuit and matrix in general, and I tried to get a basic server running yesterday. No federation, just a private server to familiarize myself with conduwuit. So the issue may be in my config.

As far as I can say, the server runs fine using docker compose and traefik. I can connect to the server using webapps https://app.schildi.chat and the like, as well as desktop apps (https://fluffychat.im). However, trying Element and SchildiChat for Android I get the error message 'M_NOT_FOUND: Not found' right after entering the server URL.

Using the FluffyChat Android app works fine.

Is this a configuration issue?

My docker compose:

---
networks:
  proxy:
    external: true

volumes:
  database:

services:
  conduwuit:
    image: girlbossceo/conduwuit:latest
    restart: always
    volumes:
      - database:/var/lib/conduwuit
    container_name: conduwuit
    environment:
      CONDUWUIT_SERVER_NAME: sub.domain.tld
      CONDUWUIT_DATABASE_PATH: /var/lib/conduwuit
      CONDUWUIT_DATABASE_BACKEND: rocksdb
      CONDUWUIT_PORT: 6167
      CONDUWUIT_MAX_REQUEST_SIZE: 20_000_000
      CONDUWUIT_ALLOW_REGISTRATION: 'true'
      CONDUWUIT_REGISTRATION_TOKEN: redacted
      CONDUWUIT_ALLOW_FEDERATION: 'false'
      CONDUWUIT_ALLOW_CHECK_FOR_UPDATES: 'false'
      CONDUWUIT_TRUSTED_SERVERS: '["matrix.org"]'
      CONDUWUIT_ADDRESS: 0.0.0.0
    networks:
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.conduwuit.rule=Host(`sub.domain.tld`)"
      - "traefik.http.services.conduwuit.loadbalancer.server.port=6167"
      - "traefik.http.routers.conduwuit.tls=true"
      - "traefik.http.routers.conduwuit.tls.certresolver=production"
      - "traefik.http.routers.conduwuit.middlewares=cors-headers@docker"
      - "traefik.http.middlewares.cors-headers.headers.accessControlAllowOriginList=*"
      - "traefik.http.middlewares.cors-headers.headers.accessControlAllowHeaders=Origin, X-Requested-With, Content-Type, Accept, Authorization"
      - "traefik.http.middlewares.cors-headers.headers.accessControlAllowMethods=GET, POST, PUT, DELETE, OPTIONS"
morguldir commented 4 days ago

Maybe they require a well known file? e.g.

   CONDUWUIT_WELL_KNOWN: |
   {
     client=https://<delegated>, 
     server=<delegated>:443,
     support_page=https://<domain>,
     support_role=m.role.admin,
     support_email=<email>,
     support_mxid=<mxid>
   }
AlexPewMaster commented 4 days ago

I also had this issue, but I fixed it by adding .well-known/matrix/client delegation to my web server. You would use a reverse proxy for something like that, but you can also tell conduwuit to serve its own .well-known/matrix files. I don't really know how to do this in a Docker setup, I only found this example config on the documentation (relevant configuration lines are at the bottom): https://conduwuit.puppyirl.gay/configuration.html

I hope that I could clear up some things!

Edit: This comment that was written by @morguldir seems to clearly display how to set this up in a Docker setup.

rattencreep commented 1 day ago

Indeed, serving a .well-known/matrix/client file did the trick. Thank you!