bug: Not reading from REVOLT_EXTERNAL_WS_URL #55

Closed
opened 2026-02-16 12:51:16 -05:00 by yindo · 7 comments
Owner

Originally created by @roboriaan on GitHub (Apr 18, 2024).

What happened?

Hi,

I have my external WS URL set to :

# URL to where the WebSocket server is publicly accessible
REVOLT_EXTERNAL_WS_URL=wss://myexampledomain.com/ws

I get passed the registration process and upon login when the socket connection is made I get a console error:

Session.tsx:157 Mixed Content: The page at 'https://myexampledomain.com/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://local.revolt.chat/ws'. This request has been blocked; this endpoint must be available over WSS.

It seems that the REVOLT_EXTERNAL_WS_URL variable doesn't get pulled in and still points to : ws://local.revolt.chat/ws
I couldn't find any other setting pointing to it within the configuration. I have re-cloned the repo, re-created the images and containers.

Any ideas?
Thanks

Originally created by @roboriaan on GitHub (Apr 18, 2024). ### What happened? Hi, I have my external WS URL set to : ``` # URL to where the WebSocket server is publicly accessible REVOLT_EXTERNAL_WS_URL=wss://myexampledomain.com/ws ``` I get passed the registration process and upon login when the socket connection is made I get a console error: > Session.tsx:157 Mixed Content: The page at 'https://myexampledomain.com/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint _**'ws://local.revolt.chat/ws'**_. This request has been blocked; this endpoint must be available over WSS. It seems that the REVOLT_EXTERNAL_WS_URL variable doesn't get pulled in and still points to : **_ws://local.revolt.chat/ws_** I couldn't find any other setting pointing to it within the configuration. I have re-cloned the repo, re-created the images and containers. Any ideas? Thanks
yindo added the bug label 2026-02-16 12:51:16 -05:00
yindo closed this issue 2026-02-16 12:51:16 -05:00
Author
Owner

@NoahMoyer commented on GitHub (Apr 21, 2024):

Hello, I want to add that I am seeing the same issue. I have the URL where the WebSocket server is publicly accessible set in the same way as mentioned and am seeing the same exact error in the console when trying to register/log in. Almost as if the variable has not been used the way I set it.

@NoahMoyer commented on GitHub (Apr 21, 2024): Hello, I want to add that I am seeing the same issue. I have the URL where the WebSocket server is publicly accessible set in the same way as mentioned and am seeing the same exact error in the console when trying to register/log in. Almost as if the variable has not been used the way I set it.
Author
Owner

@FunNoober commented on GitHub (Apr 21, 2024):

I was having this issue. In the readme of this project it says.

Important: configuration strategy has changed but this guide is out of date TL;DR mount Revolt.toml at /Revolt.toml for both api and events. Proper documentation will follow in due time.

So, to actually do this follow the steps below.

  1. Download the Revolt.toml file and place it into the same folder where your docker-compose.yml file is.
  2. Configure the Revolt.toml file the same way your .env file is configured
  3. In the docker-compose.yml file, add the following lines underneath the api: section and the events: section
volumes:
     - type: bind
       source: ./Revolt.toml
       target: /Revolt.toml

(replace the spaces with indentation)

  1. Start your container back up using Docker Compose
@FunNoober commented on GitHub (Apr 21, 2024): I was having this issue. In the readme of this project it says. > ❗ Important: configuration strategy has changed but this guide is out of date TL;DR mount [Revolt.toml](https://github.com/revoltchat/backend/blob/main/crates/core/config/Revolt.toml) at /Revolt.toml for both api and events. Proper documentation will follow in due time. So, to actually do this follow the steps below. 1. Download the `Revolt.toml` file and place it into the same folder where your `docker-compose.yml` file is. 2. Configure the `Revolt.toml` file the same way your `.env` file is configured 3. In the `docker-compose.yml` file, add the following lines underneath the `api:` section and the `events:` section ``` volumes: - type: bind source: ./Revolt.toml target: /Revolt.toml ``` (replace the spaces with indentation) 4. Start your container back up using Docker Compose
Author
Owner

@NoahMoyer commented on GitHub (Apr 21, 2024):

@FunNoober Thank you for pointing this out, I'll give this a try.

That was it, that resolved the issue I was seeing and I am able to log in now. Thank you!

@NoahMoyer commented on GitHub (Apr 21, 2024): @FunNoober Thank you for pointing this out, I'll give this a try. That was it, that resolved the issue I was seeing and I am able to log in now. Thank you!
Author
Owner

@roboriaan commented on GitHub (Apr 23, 2024):

Perfect! Thank you @FunNoober

@roboriaan commented on GitHub (Apr 23, 2024): Perfect! Thank you @FunNoober
Author
Owner

@ImVexed commented on GitHub (Apr 26, 2024):

@FunNoober this didn't fully work for me, events wasn't reading the redis url properly from the toml and I had to manually add back the REDIS_URI=redis://redis/ environment variable

@ImVexed commented on GitHub (Apr 26, 2024): @FunNoober this didn't fully work for me, events wasn't reading the redis url properly from the toml and I had to manually add back the `REDIS_URI=redis://redis/` environment variable
Author
Owner

@mojoaar commented on GitHub (Jun 12, 2024):

@FunNoober Thank you for the guidance.

Note to self: remember to correct ws:// to wss:/ when loading secure :P

@mojoaar commented on GitHub (Jun 12, 2024): @FunNoober Thank you for the guidance. Note to self: remember to correct ws:// to wss:/ when loading secure :P
Author
Owner

@jennso commented on GitHub (Feb 3, 2025):

I was able to make it work, by changing ws:// to wss:// in the .toml config file, and enabling websocket support in my reverse proxy, I'm using, nginx proxy manager as proxy server.

Image

though I'm still getting some websocket erros here and there like

Image
@jennso commented on GitHub (Feb 3, 2025): I was able to make it work, by changing ws:// to wss:// in the .toml config file, and enabling websocket support in my reverse proxy, I'm using, nginx proxy manager as proxy server. <img width="198" alt="Image" src="https://github.com/user-attachments/assets/1f69304c-7d4f-4ec3-9d10-7e6313e46cd0" /> though I'm still getting some websocket erros here and there like <img width="552" alt="Image" src="https://github.com/user-attachments/assets/4d2eb7c4-8b70-444f-b22e-55616b2f9954" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stoatchat/self-hosted#55