Hello. So I installed appwrite on my server and have been developing on it for about a month now. Been able to test my app from my local machine connecting to the online server (VPS running centos 8) and all was good. So when I decided to put the app online, on a different server, I got some error message about requesting an insecure resource. I have been accessing the appwrite server via its IP address. I then did some digging around and learnt that I need to set a custom domain, which I could not do because I did not set the _APP_DOMAIN and _APP_DOMAIN_TARGET. So I went on to try and set these. Given my minimal experience with docker and basic linux skills, it has been quite a challenge. So I managed to create an .env file and set the _APP_DOMAIN variable only, and then ran the docker compsoe command with the .env file option. The command ran for almost 20 minutes, which I found quite weird. All the while, it was giving all sorts of information, including some fatal errors that I wasn't really able to read. Eventually, I terminated the command (ctrl+c) since it would not stop. I figured I had done something wrong, so I deleted the .env file, and ran the docker compose command again. This time it ran for a few seconds and completed. When I tried to access the appwrite console from my browser, it returned a "bad gateway" error. I restarted the container, and even ran docker compose again. Now am getting a "404 page not found error". I cannot access the console from my browser, and am out of ideas on how to restore it, before I can even think of the custom domains. Can anybody bail me out?
Can you run
$#: docker compose ls
$#: docker ps
And share the results of both of those commands?
You can find based .env here : https://github.com/appwrite/appwrite/blob/master/.env
docker compose ls
docker ps
Good
Now can you run
cd /root/appwrite
ls -lah
Sorry, I've added it for clearity
Cool
I've edited the message try now
Okay, that's fine
Go to your main Appwrite folder, and take the compose down
Fetch the .env
file from Appwrite and edit only these values
$#: cd /root/appwrite
$#: docker compose down
$#: curl -fsSL https://appwrite.io/install/env -o .env
$#: nano .env
--- 👇 edit the .env file see below 👇 ---
$#: docker compose up -d
Then set and edit those values for now with your infromation.
# General
_APP_DOMAIN=yourdomain.com
_APP_DOMAIN_TARGET=yourdomain.com
_APP_OPENSSL_KEY_V1=Enter_Some_random_Long_key
# Database
_APP_DB_HOST=mariadb
_APP_DB_PORT=3306
_APP_DB_SCHEMA=appwrite
_APP_DB_USER=user
_APP_DB_PASS=password
_APP_DB_ROOT_PASS=rootsecretpassword
For the database details the last 4 values are upto you and you can write whatever suits you
for the app domain, should I enter the domain on which the appwrite is sitting on? Or can it be any other domain
You need to enter the domain the is A records points to your Appwrite server
finished editing
Now run docker compose up -d
And let me know what happened
Give it a couple of minutes and try to access the domain.
Ok
port number?
No port number Just the domain
cool
The index page for that website is load as it was before
Recommended threads
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...
- Create admin user?
I'm not really sure how this is supposed to work, I installed Appwrite through docker-compose and set it up. When I launched the app and went into it, I created...