I self hosted my appwrite server on a linux vps, it is acitvely running on docker and I am connecting it using http://ip/v1 etc, how can I activate the graphql explorer? I tried the script that activates on the port 3000 but going to http://ip:3000/v1/graphql gives 404 error
Bash
APPWRITE_ENDPOINT=http://ip/v1
if [ ! -z "$1" ]; then
APPWRITE_ENDPOINT=$1
fi
docker run --rm -p "3000:3000" -e "SERVER_URL=$APPWRITE_ENDPOINT/graphql" appwrite/altair:0.3.0
Summary
The user was having trouble running GraphQL Explorer on a self-hosted server. They initially resolved the issue by going to "https://ip:3000" instead of "http://ip:3000/v1/graphql". However, they encountered a new problem where port 3000 was already allocated when running the GraphQL Explorer script. The solution given by another user was to add port mapping for the GraphQL Explorer in the Docker Compose file of the self-hosted Appwrite server. The instructions for this were provided. Restarting the Appwrite Docker containers should apply the changes.
joeyouss
Aug 9, 2023, 07:19
Hi, have you tried the following:
SSH into your Linux VPS where the self-hosted Appwrite server is runnin
Locate the Docker Compose file you used to set up your self-hosted Appwrite server. docker-compose.yml or something similar
In the Docker Compose file, you need to add port mapping for the GraphQL explorer.
YAML
appwrite:
...
ports:
-"80:80"
-"443:443"
-"3000:3000"
...
Save the changes to the Docker Compose file and exit the editor. Then, restart your Appwrite Docker containers to apply the changes.
Bash
docker-compose down
docker-compose up -d
http://ip:3000/v1/graphql in your web browser. Replace ip with the actual IP address of your VPS.
burakcbdn
Rank 1: Thread
Aug 9, 2023, 07:31
@joeyouss now it says port 3000 is already allocated when I run graphql explorer script