Back

[SOLVED] 127.0.0.1 no longer accessible on self hosted appwrite 1.4

  • 1
  • General
  • Flutter
zjjt
31 Aug, 2023, 09:53

Since i upgraded to 1.4.0 and then 1.4.1 , i can no longer access the console using http://127.0.0.1 instead i have to use http://localhost instead. Also since i am writing a mobile app and the appwrite runs on docker and the ip is NAT ed to the host machine , i can no longer use http://MY_HOST_IP/v1 to access the api from my client app. All the above was previously working on 1.3.8.

How can i fix this ?

TL;DR
[SOLVED] In Appwrite 1.4, accessing the console using 127.0.0.1 is no longer possible. You should use localhost instead. If you need to use an IP address for your client app, update the domain environment variables with that IP address.
Joshi
31 Aug, 2023, 09:55

Can you not use localhost instead?

zjjt
31 Aug, 2023, 12:21

@Joshi yes i could but what about the client app i am developping? normally there is a natural NAT from localhost to the host machine's ip but in the new version this is no longer working. i can do with using localhost for accessing the console.But for my frontend it is a huge problem

Joshi
31 Aug, 2023, 12:23

I'm surprised 127.0.0.1 and localhost are considered interchangeably

Joshi
31 Aug, 2023, 12:23

They are considered the same thing

zjjt
31 Aug, 2023, 12:49

@Joshi indeed they are the same but unfortunately for me that is how i described above let me show you with some screenshots

zjjt
31 Aug, 2023, 12:50

@Joshi when accessing http://127.0.0.1 in the browser

zjjt
31 Aug, 2023, 12:52

@Joshihere is a shot with using localhost instead

zjjt
31 Aug, 2023, 12:52
zjjt
31 Aug, 2023, 12:54

here is the error message when trying to call the endpoint <h1 class="heading-level-4 u-trim-1">Error 500</h1> <p class="text">Domain environment variables not configured. Please configure domain environment variables before using Appwrite outside of localhost.</p>

hamed
31 Aug, 2023, 15:33

I have the same issue as you

zjjt
31 Aug, 2023, 19:33

@Steven Hi Steven pls can you see the above screenshots for this issue I have

Drake
31 Aug, 2023, 19:38

yep. this is as expected. you should be using localhost. if you need to use an IP, you'll have to update the domain env vars with that IP address

zjjt
31 Aug, 2023, 19:40

@Steven but is this an intended change? I mean I could use either 127.0.0.1 or localhost regardless with 1.3.8...Also when calling the endpoint even with localhost instead of the ip I get the error listed above

zjjt
31 Aug, 2023, 19:41

This one here is the error message when trying to call the endpoint <h1 class="heading-level-4 u-trim-1">Error 500</h1> <p class="text">Domain environment variables not configured. Please configure domain environment variables before using Appwrite outside of localhost.</p> ``

Drake
31 Aug, 2023, 19:48

previously, you could use ip address to access the console. in 1.4, that's been limited because of routing and to help prevent spoofing/phishing

Drake
31 Aug, 2023, 19:48

yep, do as it says

zjjt
31 Aug, 2023, 19:51

@Steven ok I understand better now. I'll do it and hopefully be able to access the Api...I'll revert here 🙏. Great work and congrats for the awesome work you guys do and for the 1.4 release

D5
31 Aug, 2023, 21:29

[SOLVED] 127.0.0.1 no longer accessible on self hosted appwrite 1.4

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