Back

[Solved] Setup custom domain issue (digital ocean)

  • 0
  • Self Hosted
DennisLBC
2 Jan, 2024, 22:08

I reviewed this support post https://discord.com/channels/564160730845151244/1125405273507504228 and they're encountering the same thing I am but I need some additional clarity.

Currently my digital ocean is just an IP address. I assigned a sub for my domain to the digital ocean droplet (api.mydomain.com).

I want my appwrite endpoint to be api.mydomain.com. My app frontend is on vercel at mydomain.com.

So to be clear, I just need to set the envs to api.mydomain.com? At what point will my "API ENDPOINT" in appwrite settings change from the IP based one of the droplet, to the custom domain? As I have already set the envs and it still shows the IP.

TL;DR
Issue: The user is experiencing difficulties setting up a custom domain (api.mydomain.com) for their Appwrite endpoint on Digital Ocean. They have set the environment variables correctly but the API endpoint still shows the droplet IP instead of the custom domain. Solution: 1. Confirm that the domain and target are correctly implemented in the Appwrite Console, and verify that the settings show the correct domain in Incognito mode. 2. Check if the command `docker compose exec appwrite vars | grep DOMAIN` shows the correct domain. 3. Run `docker compose up -d` after changing the environment variables to ensure the changes take effect.
ideclon
2 Jan, 2024, 22:09

Did you run docker compose up -d after changing the envvars?

DennisLBC
2 Jan, 2024, 22:13

No I had not, just ran it now but still shows same

DennisLBC
2 Jan, 2024, 22:13

I think part of the problem may be that the droplet domain ns changes might not have propogated?

ideclon
2 Jan, 2024, 22:14

The Appwrite dashboard wouldn't care if the domain is actually pointed at it.

ideclon
2 Jan, 2024, 22:15

Does docker compose exec appwrite vars | grep DOMAIN show your correct domain?

DennisLBC
2 Jan, 2024, 22:16

yes it shows them all correct

DennisLBC
2 Jan, 2024, 22:17

except I dont know what to do for functions, I haven't actually started using them yet but I will in the future

ideclon
2 Jan, 2024, 22:17

That's fine for now.

DennisLBC
2 Jan, 2024, 22:17

but domain and target are showing as i implemented

ideclon
2 Jan, 2024, 22:17

Do you see the correct domain in the Console in Incognito?

DennisLBC
2 Jan, 2024, 22:18

What do you mean by that?

ideclon
2 Jan, 2024, 22:20

If you open the Appwrite Console in Incognito, do you see the domain showing up in settings correctly?

DennisLBC
2 Jan, 2024, 22:21

No. I was curious about the ns changes because I cannot actually access the console using api.mydomain.com yet, I must still access it using the droplet IP. But regardless of browser/cache it still shows the same droplet ip as the endpoint which is why I was initially concerned about propogation

ideclon
2 Jan, 2024, 22:26

I'm trying to find the code for that, but I have a suspicion that it just shows whatever the domain is you're accessing the page with.

DennisLBC
2 Jan, 2024, 23:46

Just got propagation and it is now showing correctly when I access from api

DennisLBC
2 Jan, 2024, 23:46

[Solved] Setup custom domain issue (digital ocean)

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