Back

[SOLVED] env file is weird and WebsocketException

  • 2
  • Self Hosted
  • Flutter
  • Realtime
paulanerl
31 Oct, 2023, 09:00

Hi guys, I am having trouble by configuring my self hosted appwrite server. If I connect via flutter to my appwrite backend - I get this error: "Unhandled Exception: WebSocketException: Connection to 'MYAPI:0/v1/realtime/realtime?project="some_values"&channels%5B%5D=account' was not upgraded to websocket"

There must be something wrong on the server side, because with the appwrite cloud - everything works.

Also I am a little bit concerned about the .env file, because by default it looks like this - and in the Docs is written, that some of these values are not default. Also f.e. I found nothing about this in the docs: "_APP_OPTIONS_FUNCTIONS_FORCE_HTTPS"

.env file:

  • _APP_ENV=production
  • _APP_LOCALE=en
  • _APP_OPTIONS_ABUSE=enabled
  • _APP_OPTIONS_FORCE_HTTPS=disabled
  • _APP_OPTIONS_FUNCTIONS_FORCE_HTTPS=disabled
  • _APP_OPTIONS_ROUTER_PROTECTION=disabled
  • _APP_OPENSSL_KEY_V1=some_values
  • _APP_DOMAIN=localhost
  • _APP_DOMAIN_FUNCTIONS=functions.localhost

I have changed the env file - so it is looking now like this, but this do not work either:

  • _APP_ENV=development
  • _APP_LOCALE=en
  • _APP_OPTIONS_ABUSE=enabled
  • _APP_OPTIONS_FORCE_HTTPS=enabled
  • _APP_OPTIONS_FUNCTIONS_FORCE_HTTPS=enabled
  • _APP_OPTIONS_ROUTER_PROTECTION=disabled
  • _APP_OPENSSL_KEY_V1=some_values
  • _APP_DOMAIN=localhost
  • _APP_DOMAIN_FUNCTIONS=functions.localhost

I have installed Appwrite 1.4.8

Thanks for helping

TL;DR
User is having trouble configuring their self-hosted Appwrite server. When connecting via Flutter to the backend, they receive a WebSocketException error. The issue seems to be on the server side since it works fine with the Appwrite cloud. The user is also concerned about their .env file, as some values are not default according to the documentation. They provided two versions of their .env file, but neither of them resolved the issue. The user has Appwrite version 1.4.8 installed. The problem was solved in a separate support thread linked in the original message.
Drake
1 Nov, 2023, 15:01

how did you install Appwrite?

Drake
1 Nov, 2023, 15:02

what's your client code?

paulanerl
1 Nov, 2023, 18:22

I have no information about the installing process itself. I can say it runs on docker system in a Debian GNU/Linux 11 Server

I updated the system from 1.3.8 to 1.4.8 the last days, but I also cannot say if the system was running before correctly.

paulanerl
1 Nov, 2023, 18:23

I also think this one is related to my other support question: https://discord.com/channels/564160730845151244/1169251018350014494

paulanerl
3 Nov, 2023, 07:37
Drake
3 Nov, 2023, 22:04

[SOLVED] env file is weird and WebsocketException

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more