Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Matrix (Synapse/Element)
  3. Cant find and login in to homeserver : URL does not appear to be a valid Matrix homeserver

Cant find and login in to homeserver : URL does not appear to be a valid Matrix homeserver

Scheduled Pinned Locked Moved Matrix (Synapse/Element)
5 Posts 4 Posters 2.2k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mgkmgk
    wrote on last edited by
    #1

    Hello, I set up a server on the local network, if I go through the web interface (https://matrix.test.rus), then I get to the server without problems, if the desktop client Element or some other is used, I get an error: URL does not appear to be a valid Matrix homeserver

    What could be the problem ?

    config:
    server {
    listen 80;
    listen [::]:80;
    server_name matrix.test.rus;

    location /.well-known/matrix/client {
    return 200 '{"m.homeserver": {"base_url": "https://matrix.test.rus"}}';
    default_type application/json;
    add_header Access-Control-Allow-Origin *;
    }
    
    # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
    

    return 301 https://$host$request_uri;

    }

    server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    listen 8448 ssl http2 default_server;
    listen [::]:8448 ssl http2 default_server;
    
    server_name matrix.test.rus;
    
    ssl_certificate /etc/ssl/private/matrix.crt;
    ssl_certificate_key /etc/ssl/private/matrix.key;
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets off;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;
    
    root /var/www/element;
    index index.html;
    
    location /.well-known/matrix/client {
    return 200 '{"m.homeserver": {"base_url": "https://matrix.test.rus"}}';
    default_type application/json;
    add_header Access-Control-Allow-Origin *;
    }  
    
    
    
    location /_matrix {
        proxy_pass http://localhost: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;
    
    
    } 
    

    }

    girishG 1 Reply Last reply
    0
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      Have you seen https://docs.cloudron.io/domains/#well-known-locations to setup the well-known location? On Cloudron it is not supported to change the nginx configs directly, as those will eventually be overwritten.

      1 Reply Last reply
      1
      • subvenS Offline
        subvenS Offline
        subven
        wrote on last edited by
        #3

        Test your server (base domain like test.rus, not matrix server location) with https://federationtester.matrix.org/ for configuration errors. I guess you forgot to set the well-known within Cloudrons domain configuration like @nebulon pointed out already. Should look like this:

        2022-11-07 16_51_3.png

        1 Reply Last reply
        0
        • M mgkmgk

          Hello, I set up a server on the local network, if I go through the web interface (https://matrix.test.rus), then I get to the server without problems, if the desktop client Element or some other is used, I get an error: URL does not appear to be a valid Matrix homeserver

          What could be the problem ?

          config:
          server {
          listen 80;
          listen [::]:80;
          server_name matrix.test.rus;

          location /.well-known/matrix/client {
          return 200 '{"m.homeserver": {"base_url": "https://matrix.test.rus"}}';
          default_type application/json;
          add_header Access-Control-Allow-Origin *;
          }
          
          # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
          

          return 301 https://$host$request_uri;

          }

          server {
          listen 443 ssl http2;
          listen [::]:443 ssl http2;

          listen 8448 ssl http2 default_server;
          listen [::]:8448 ssl http2 default_server;
          
          server_name matrix.test.rus;
          
          ssl_certificate /etc/ssl/private/matrix.crt;
          ssl_certificate_key /etc/ssl/private/matrix.key;
          ssl_session_timeout 1d;
          ssl_session_cache shared:SSL:50m;
          ssl_session_tickets off;
          ssl_protocols TLSv1.2 TLSv1.3;
          ssl_prefer_server_ciphers on;
          
          root /var/www/element;
          index index.html;
          
          location /.well-known/matrix/client {
          return 200 '{"m.homeserver": {"base_url": "https://matrix.test.rus"}}';
          default_type application/json;
          add_header Access-Control-Allow-Origin *;
          }  
          
          
          
          location /_matrix {
              proxy_pass http://localhost: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;
          
          
          } 
          

          }

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          @mgkmgk Just to double check.. are you actually using Cloudron to host Synapse ? This forum is for the Cloudron package of Synapse.

          M 1 Reply Last reply
          1
          • girishG girish

            @mgkmgk Just to double check.. are you actually using Cloudron to host Synapse ? This forum is for the Cloudron package of Synapse.

            M Offline
            M Offline
            mgkmgk
            wrote on last edited by
            #5

            @subven
            @girish Nope, dont use Cloud, but thx for answering, im trying fix my problem.

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search