Things to do after Setup Appwrite on Digital Ocean

I found that many articles talk about how easy to set up Appwrite on Digital Ocean because of the one-click installer, but none of these articles shares the things to do after you install Appwrite. So I am going to share some of my findings today.

Setup domain for your Appwrite instance and configure SSL for it.

After you complete the quick install Appwrite through Digital Ocean Marketplace, you can access your Appwrite instance through IP without SSL. You should first set up a domain for your Appwrite instance.

  1. Point your Domain A record to your Appwrite instance IP.
  2. SSH into your Appwrite instance; you should be able to log in to your instance with your SSH key.
  3. Once you log in, there will be two folders ( Appwrite and Snap )
  4. Go into the Appwrite folder and edit the .env file
  5. Search for _APP_DOMAIN, update the domain and save it.
  6. Restart your docker with
    docker compose up -d
    
  7. Trigger the SSL creation
    docker-compose exec appwrite ssl
    
  8. Wait for a while; you should be able to access your Appwrite instance with the domain + SSL.

Upgrade your Appwrite instance

Once you log in to your Appwrite instance, you will see an upgrade notification telling you there is a new release. Digital Ocean Marketplace installs Appwrite 1.0.15 by default, and the latest release is 1.0.3.

CleanShot 2022-10-20 at 22.08.23@2x.png

  1. SSH into your Appwrite instance.
  2. Run the Docker command
    docker run -it --rm \
     --volume /var/run/docker.sock:/var/run/docker.sock \
     --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
     --entrypoint="install" \
     appwrite/appwrite:1.0.3
    
  3. Enter the Appwrite folder and run the migration
    docker compose exec appwrite migrate
    
  4. Refresh your dashboard; the upgrade notification should be gone.

Configure Digital Ocean Spaces for Storage

Appwrite, by default, uses the local file system for the upload; since we are already using Digital Ocean to set up the instance, we might as well use Digital Ocean Space for the storage.

CleanShot 2022-10-20 at 23.34.49@2x.png

  1. SSH into your Appwrite instance and enter the Appwrite folder.
  2. Edit the .env file, change the _APP_STORAGE_DEVICE to DOSpaces
  3. Fill in all the DO_SPACES related storage settings, including access key, secret, region and bucket. You should have all these settings after you enable Digital Ocean Spaces.
  4. Restart your docker for the new settings apply
    docker compose up -d
    
  5. Try uploading files through your Appwrite instance, and you should be able to find the files in your Digital Ocean Spaces.
  6. Take note that it will use some ID as folders on Digital Ocean Spaces if you can't find the folder.

CleanShot 2022-10-20 at 23.33.33@2x.png

These are the things that I configure after setup my Appwrite instance; let me know what other settings are required after you set up your Appwrite instance.