
Hey, I've hosted the apprwrite's docker container locally and I'm having trouble when I'm running the app on different devices...
- How can I make it work with different devices? I'm having trouble understanding the "For self hosted solutions" part on the website... The private IP thing...
- If I'm hosting it on Google cloud, do I need pass the GCP's external IP when appwrite asks for hostname.. What I'm supposed to enter there as idk how I'll access if it is hosted on VM's localhost

Hey there! I'll try answering both your questions.

For the first question, what the documentation is saying, is that if you're running your appwrite instance on your own computer (locally), instead of using http://localhost/v1
, use your private IP address.
To find out your private IP address, open command prompt
, and run ipconfig
. If you're connected to your network via WiFi, look for the Wireless LAN adapter Wi-Fi:
heading, and find the value of the IPv4 Address
entry. Mine says 192.168.100.5
. So instead of using localhost/v1
as my appwrite endpoint on apps, i'll use http://192.168.100.5/v1
.
Hope that makes sense

For second question.
You're right. One thing I'm not a 100% sure about, is if you're supposed to use a domain when hosting appwrite on a remote server. Using the server's IP address isn't necessarily the best thing to do. WHat I would recommend, is to get a domain, and use that domain as the Appwrite instance's main hostname
and Appwrite instance's DNS A record hostname
which is asked during installation.
Once you enter your domains, you will be instructed to add an A
record to your domain's DNS settings, which will make sure that yourdomain.com
points to your server's IP address

Hope I answered your questions! Feel free to ask any more

I can't afford to purchase a domain for my practice projects, which is basically for showcase

ah okay. then a locally hosted appwrite instance ahould be okay for you

Thank you for answering, I have another follow up question..
Assuming, I'm going with the first approach, do all the devices needs to be connected on the same network to access the server, By accessing, I mean, suppose I've hosted the db on the private IP, will i be able to access it after building the apk from another device?

if you host on something like GCP, you'll get a static public IP address, which can be accessed from anywhere.
if you host in your local network, only devices within your network will be able to access it. There's more to it, which I'm haopy to explain. give mena few minutes

Okay so to elaborate on local hosting.
If you host on your computer in your local network, you'll have a private IP, that can't be accessed from anywhere outside of the local network. If you plan on using that private IP for appwrite, I'd recommend assigning your computer a static IP. Most local networks use DHCP - which basically means that your private IP changes periodically. With static IP addresses, you can be sure that the host (your computer) will always have that IP address on the network.

Got it

Thank you

It is worth mentioning OP will have to also use port forwarding on their router for WAN access

I think it's very over my head now

Maybe you can use cloudflare tunnel to expose your server.

Hey, sorry if I'm bothering you, but after hosting it on my private IP, I'm not able to create a new account, the error is "The current project has exceeded the maximum number of users . Please check your user limit in the Appwrite console"
Neither I'm able to sign in with the email and pass used on localhost..
What should I do now to overcome this?

after hosting it on my private IP
What did you do exactly?

I ran the ifconfig
to get the IPv4 address and then I entered that IP address instead of localhost

entered that IP address instead of localhost
Can you explain in more detail? Did you run the install command again?

Yes

On the same server/machine that had a previous installation without uninstalling?

Yes

I see. First off, you don't need to change the domain from localhost to IP. You need to change it when you start using an actual domain.
Secondly, you can't install again without uninstalling because your new installation will be using the same data from your previous one. I suggest just running docker compose down
in your new folder, go to your old folder, and run docker compose up -d
go switch back to using your previous installation
Recommended threads
- Appwrite Education program
I have applied for the GitHub Student Developer Pack and it was approved so that i can be eligible for the Appwrite Education program in Appwrite BUT it is sh...
- SMTP Error: Could not connect to SMTP
My appwrite self-hosted instance on DigitalOcean cannot sennd emails. The following results were performed Log: ``` docker compose logs -f appwrite-worker-mail...
- Cannot create a user
Hi, I am using a lowcoder frontend and trying to create a user in Appwrite (python function). Unfortunately, all I got is an error: "Raw body: Error". It means...
