Back

[SOLVED] Struggling to verify custom domain to set up self hosting AppWrite with SSL

  • 0
  • Self Hosted
  • Web
Rich
11 Dec, 2023, 15:36

I am running a self-hosted version of AppWrite on a Digital Ocean droplet.

I am trying to add a subdomain to this instance so I can have an SSL certificate on it.

The anchorvine.com domain current has a 2x A records on it and is used for my frontend application which is on a difference Digital Ocean droplet:

anchorvine.com and www.anchorvine.com

I am trying to use another subdomain (appwrite) of this to point to my AppWrite self-hosted instance.

In my AppWrite .env I have

_APP_DOMAIN=appwrite.anchorvine.com _APP_DOMAIN_TARGET=appwrite.anchorvine.com

I have added a custom domain in AppWrite but it is not verifying it (see image)

AppWrite asks me to add a CNAME to the IP of my AppWrite Digital Ocean droplet - however my Domain Hosting service has said this is not possible as CNAMEs need to be sub domains not IP addresses as the image instructs me to do.

I have tried adding a CNAME of Name: appwrite Content: appwrite.anchorvine.com but it still fails to verify.

TL;DR
Title: [SOLVED] Difficulty Verifying Custom Domain for SSL setup on Self-Hosted AppWrite Messages: - It seems like there may have been a caching issue with the SSL certificate. Try setting the domain in the .env file instead of creating a custom domain in the project. - Make sure you have restarted the docker instance. - Your understanding that the SSL certificate for anchorvine.com will be used for appwrite.anchorvine.com is correct. However, check that both domains are pointing to the same server. - Double-check the DNS settings and ensure that the type of record for the subdomain is A, not
Kenny
11 Dec, 2023, 16:01

I think the type should actually be A

Ernest
11 Dec, 2023, 16:04

Yes, it should be an A record

Rich
11 Dec, 2023, 16:11

Just waiting for it to propogate...

Drake
11 Dec, 2023, 16:11

custom domain? It doesn't seem like you need a custom domain if you only need 1 domain for Appwrite

Drake
11 Dec, 2023, 16:12

What URL are you accessing your Appwrite instance while on the page in this screenshot?

Rich
11 Dec, 2023, 17:05

@Steven I can actually access AppWrite on appwrite.anchorvine.com now but it is http and insecure.

For my DNS I now have:

anchorvine.com A 46.101.14.22 (my application server) www.anchorvine.com A 46.101.14.22 (my application server) appwrite.anchorvine.com A 134.122.110.167 (my AppWrite server)

And my .env points to:

_APP_DOMAIN=appwrite.anchorvine.com _APP_DOMAIN_TARGET=appwrite.anchorvine.com

My understanding is because anchorvine.com already has an SSL certificate then this should be used for appwrite.anchorvine.com - but this is not happening. Would this be because www. and appwrite. are on different servers?

Ernest
11 Dec, 2023, 17:08

Appwrite will generate a certificate for the domain in the .env. It's not because of your root domain i.e. anchorvine.com

Ernest
11 Dec, 2023, 17:09

Please, answer this question

Rich
11 Dec, 2023, 17:09

appwrite.anchorvine.com

Ernest
11 Dec, 2023, 17:09

Also, have you restarted the docker instance?

Rich
11 Dec, 2023, 17:09

yes

Ernest
11 Dec, 2023, 17:14

Appwrite has generated the SSL already

Ernest
11 Dec, 2023, 17:15
Rich
11 Dec, 2023, 17:31

Oh amazing!! Maybe there was just a delay or a caching issue? Thanks for letting me know @Ernest

Drake
11 Dec, 2023, 18:37

so if it's only 1, you only need to set the domain in the .env file. No need to create a custom domain in a project.

Drake
11 Dec, 2023, 18:38

Probably cache. Browsers may cache certificates

Rich
11 Dec, 2023, 19:05

Thanks 😊

Drake
11 Dec, 2023, 20:40

[SOLVED] Struggling to verify custom domain to set up self hosting AppWrite with SSL

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