# Matrix chat first login: 504 timeout

**URL:** https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835
**Category:** Element/Matrix Chat
**Created:** [June 19, 2021, 12:01pm UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835 "2021-06-19T12:01:32Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![aa13q](https://forum.opendesktop.org/user_avatar/forum.opendesktop.org/aa13q/32/56856_2.png) [@aa13q](https://forum.opendesktop.org/u/aa13q)
#### Post date: [June 19, 2021, 12:01pm UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835/1 "2021-06-19T12:01:32Z")

</div>

Hello! Trying to log into chat in for the first time: `@aa13q:chat.opendesktop.org`.  
No luck: Request URL: [https://chat.opendesktop.org/\_matrix/client/r0/login](https://chat.opendesktop.org/_matrix/client/r0/login)  
504 error (gateway timeout).  
Riot web error message:

> Error: Problem communicating with the given homeserver. (HTTP 504)

Any hints on what to check twice? 🤔

---

<div class="post-metadata">

### Author: ![justinz](https://forum.opendesktop.org/user_avatar/forum.opendesktop.org/justinz/32/118829_2.png) [@justinz](https://forum.opendesktop.org/u/justinz)
#### Post date: [June 19, 2021, 12:36pm UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835/2 "2021-06-19T12:36:38Z")

</div>

What client are you using? I just tried the web interface and had no issue.

---

<div class="post-metadata">

### Author: ![justinz](https://forum.opendesktop.org/user_avatar/forum.opendesktop.org/justinz/32/118829_2.png) [@justinz](https://forum.opendesktop.org/u/justinz)
#### Post date: [June 19, 2021, 12:47pm UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835/3 "2021-06-19T12:47:29Z")

</div>

I also tried the official Matrix client Element with no issues.

---

<div class="post-metadata">

### Author: ![aa13q](https://forum.opendesktop.org/user_avatar/forum.opendesktop.org/aa13q/32/56856_2.png) [@aa13q](https://forum.opendesktop.org/u/aa13q)
#### Post date: [June 20, 2021, 12:11pm UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835/4 "2021-06-20T12:11:53Z")

</div>

Thank you for the reply!

No luck still ☹ As mentioned, I’ve tried riot web deployed at [chat.opendesktop.org](http://chat.opendesktop.org).

Also tried KDE NeoChat and element-io clients. Same 504 error (both with chrome and firefox in case of web clients) and tried two local ISPs (mobile and wired).

I’ve created new opendesktop account right now (`@alexey-a:chat.opendesktop.org`), got email confirmation. I’m able to log in into forum, but not able to login into matrix chat, same 504 error at the first login.  
Different homeservers (like matrix-org) are working fine with the same conditions though.

---

<div class="post-metadata">

### Author: ![justinz](https://forum.opendesktop.org/user_avatar/forum.opendesktop.org/justinz/32/118829_2.png) [@justinz](https://forum.opendesktop.org/u/justinz)
#### Post date: [June 21, 2021, 1:43am UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835/5 "2021-06-21T01:43:45Z")

</div>

I’ve just tried Neochat logging out and re-adding the account, same in Element and the Riot web interface… 🤔 Maybe there is some issue with your account. I’ll get Alexander to check your account and see if something is wrong.

---

<div class="post-metadata">

### Author: ![jameshiebert](https://forum.opendesktop.org/user_avatar/forum.opendesktop.org/jameshiebert/32/57368_2.png) [@jameshiebert](https://forum.opendesktop.org/u/jameshiebert)
#### Post date: [June 30, 2021, 10:56am UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835/6 "2021-06-30T10:56:20Z")

</div>

Must be a server’s problem, i have the same

---

<div class="post-metadata">

### Author: ![justinz](https://forum.opendesktop.org/user_avatar/forum.opendesktop.org/justinz/32/118829_2.png) [@justinz](https://forum.opendesktop.org/u/justinz)
#### Post date: [July 1, 2021, 5:35am UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835/7 "2021-07-01T05:35:16Z")

</div>

I’m working on this issue. Will hopefully have it resolved very soon. Thank you all for your patience.

---

<div class="post-metadata">

### Author: ![justinz](https://forum.opendesktop.org/user_avatar/forum.opendesktop.org/justinz/32/118829_2.png) [@justinz](https://forum.opendesktop.org/u/justinz)
#### Post date: [July 3, 2021, 12:27am UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835/8 "2021-07-03T00:27:45Z")

</div>

I will be doing server maintenance on Monday at 00:30 UTC which will likely resolve this issue.

---

<div class="post-metadata">

### Author: ![buntewolke](https://forum.opendesktop.org/user_avatar/forum.opendesktop.org/buntewolke/32/57498_2.png) [@buntewolke](https://forum.opendesktop.org/u/buntewolke)
#### Post date: [July 3, 2021, 4:26am UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835/9 "2021-07-03T04:26:43Z")

</div>

Can you reveal what kind of server problems cause this malfunction? Have you identified the cause?

---

<div class="post-metadata">

### Author: ![justinz](https://forum.opendesktop.org/user_avatar/forum.opendesktop.org/justinz/32/118829_2.png) [@justinz](https://forum.opendesktop.org/u/justinz)
#### Post date: [July 3, 2021, 5:58am UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835/10 "2021-07-03T05:58:31Z")

</div>

It’s to do with cross-site scripting, the current config is a little off. We are building a new server to resolve the issue. This will also make it easier for us to do maintenance on the server and keep it running nicely.

---

<div class="post-metadata">

### Author: ![buntewolke](https://forum.opendesktop.org/user_avatar/forum.opendesktop.org/buntewolke/32/57498_2.png) [@buntewolke](https://forum.opendesktop.org/u/buntewolke)
#### Post date: [July 3, 2021, 3:15pm UTC](https://forum.opendesktop.org/t/matrix-chat-first-login-504-timeout/19835/11 "2021-07-03T15:15:56Z")

</div>

@justinz  
Is this solution, solution approach also sustainable? I see that there were problems with login in Matrix already in 2019 - s. [1] [Can't login to Matrix chat (solved)](https://forum.opendesktop.org/t/cant-login-to-matrix-chat-solved/17407). I am in Fediverse as a user since 2016 - see Hubzilla [2]. Hubzilla is implemented as a decentralized network. An excerpt from the Hubzilla help:  
[_start of quote_=“[Hilfe: About (realtime.fyi)](https://realtime.fyi/help/de/about/about#Right_so_what_is_Hubzilla_)”]  
**Single Sign-on**

Access Control Lists work for all channels in the grid due to our unique single sign-on technology. Most internal links provide an **identity token which can be verified on other Hubzilla sites** and used to control access to private resources. You login once to your home hub. After that, authentication to all Hubzilla resources is “magic”  
_[/end of quote]_

As a Hubzilla beginner “Single Sign-on made in Hubzilla” [3] this feels unusual to get used to, but it’s actually like this - I register an account (strictly speaking an **identity** _login-X@hub-Y.tld_ on ONE Hubzilla node(Hub Y)) and with the identity _login-X@hub-Y.tld_ I can sign-on myself on all participating Hubs - _ **without registration** _. Provided another hub _Z_ allows me to log in. Which permissions I have after logging in on hub _Z_ is determined by the provider of hub _Z_.

This “single sign-on made in Hubzilla” is one of the special features of Hubzilla and works flawlessly all the time. That’s why I describe this in such detail as a suggestion. Maybe it is worth to consider in the medium or longer term to apply the solution based on the magic “Single Sign-on made in Hubzilla” functionality also for the “Single Sign-on @ opendesktop.org-services”?

“Single Sign-on made in Hubzilla” is a mature, low-maintenance solution that has been in use for years and does not cause any additional effort for hub admins. Not unimportant - “Single sign-on made in Hubzilla” also feels very pleasant for a user, provides positive user experience.

[1] Can’t login to Matrix chat, 08.04.2019 - [Can't login to Matrix chat (solved)](https://forum.opendesktop.org/t/cant-login-to-matrix-chat-solved/17407)  
[2] Hubzilla - [https://hubzilla.org](https://hubzilla.org)  
[3] Single Sign-on in Hubzilla-Grid -[https://realtime.fyi/help/de/about/about#Glossary](https://realtime.fyi/help/de/about/about#Glossary)
