#Appwrite + DigitalOcean Setup

105 messages · Page 1 of 1 (latest)

craggy summit
#

I recently create a droplet and I added appwrite to it, but now I want to access it with my appwrite.savoro-app.ro subdomain, because at the moment i can access it only with the ipv4 address.

Next I want to add a SSL certificate to it, but the big problem is that the docs are not simple to reproduce..

All I managed to do is to create a Domain in DigitalOcean which has 5 records (check the image).

#

Appwrite + DigitalOcean Setup

#

I also added these 2 records in cPanel, i don't know if it helps..

hoary valley
hoary valley
craggy summit
#

I've also modified this lines

hoary valley
#

Then after that you need to set the following this env variable with your domain:
_APP_DOMAIN

For functions domain, you need to set:
_APP_DOMAIN_FUNCTIONS

And also
_APP_DOMAIN_TARGET

hoary valley
craggy summit
#

yes

#

But i still can access it through the ipv4, and when i try to access with my domain i get this

craggy summit
#

I don't event know what's that :))

hoary valley
#

I recommend not using IPV6 for your appwrite instance

hoary valley
craggy summit
#

Yes, I think so

hoary valley
craggy summit
#

For all these things I use cPanel

#

I'm a beginner when it comes to server management

hoary valley
craggy summit
hoary valley
#

It works for me 🤔

#

You're on windows?

craggy summit
#

Mac

#

but i'm using Chrome, not Safari

hoary valley
#

It's probably DNS cache

craggy summit
hoary valley
#

Because I can reach it correctly

hoary valley
craggy summit
#

hmm..okey..

hoary valley
#

You will need to flush DNS cache or wait a while until the cache expires

craggy summit
#

So complicated 🤯

hoary valley
#

I'm on the phone

#

Only TLS not loading properly

craggy summit
#

Hmm.. yes.. it seems it works for you

hoary valley
#

To solve that, try running this:
docker compose exec appwrite ssl domain="appwrite.savoro-app.ro"

craggy summit
hoary valley
#

Perfect

craggy summit
#

I tried to flush DNS as you said using sudo killall -HUP mDNSResponder but I still can't see the appwrite instance..

hoary valley
#

It could be that it's being cached in your ISP DNS. You will need to wait 24/48 hours or use a different DNS server such as https://one.one.one.one

craggy summit
#

Okey..

#

So, I will make a recap to be sure I covered all:

  1. In cPanel I should add 2 A Records pointing to droplet ipv4 address, one is appwrite.savoro-app.ro and www.appwrite.savoro-app.ro
  2. In DigitalOcean I have to add a Domain savoro-app.ro where I have to add the same A Records as above
  3. Then I have to change .env variables _APP_DOMAIN, _APP_DOMAIN_TARGET and _APP_DOMAIN_FUNCTIONS with my domain value appwrite.savoro-app.ro
  4. Run docker compose up -d

And that's all?

hoary valley
craggy summit
hoary valley
craggy summit
#

Ah, so it's same thing

hoary valley
#

From what I understand, yes

craggy summit
#

Now it works 🎉

#

The only thing is that the certificate is not valid

hoary valley
#

How did you have installed appwrite?

craggy summit
#

I have no ideea, i didn't do anything different..

#

I just deleted that Domain from digital ocean

hoary valley
#

Then probably cache expired

craggy summit
#

And then i tried to run again those commands for .env

hoary valley
#

Regarding the certificate issue, how did you have installed appwrite?

craggy summit
#

Using the MarketPlace

#

from DigitalOcean

hoary valley
#

Ok

craggy summit
#

Does this help?

hoary valley
#

The isntance conains some data or it's new?

craggy summit
#

it's new

#

I didnt even created my account in it

hoary valley
# craggy summit Does this help?

Try restarting with this command:

docker compose down && docker compose up -d

Then after that run:
docker compose exec appwrite ssl domain="appwrite.savoro-app.ro"

craggy summit
#

Sure, but firstly

#

I have to be inside appwrite folder?

hoary valley
#

Yes

craggy summit
#

ok

#

Done

#

Now it should happen instantly?

#

Also, if i run docker-compose logs

#

I still get that error Cannot renew domain (appwrite.savoro-app.ro) on attempt no. 7 certificate: Failed to issue a certificate with message: Saving debug log to /var/log/letsencrypt/letsencrypt.log

hoary valley
craggy summit
#

I do not even know where it's that file cause i do not find it

faint lily
craggy summit
#

Okay, I will try to figure it out how to do it

craggy summit
#

I do not understand why there's no proper docs for this..

#

And as I see appwrite uses port 80

#

@faint lily

#

Also, I should install NGINX and Certbot for this?

faint lily
craggy summit
#

...

#

Still not working..

#

I think i will start a new thread with my problem.. maybe someone can help me

hoary valley
#

Make sure you have the port 80 allowed

craggy summit
#

Yes.. it's allowed

craggy summit
#

And this is inside /var/log/letsencrypt/letsencrypt.log

hoary valley
craggy summit
#

They use sudo ufw allow 80

hoary valley
craggy summit
#

Yes.. but I don't have any firewall..

hoary valley