Photo by Christina @ wocintechchat.com on Unsplash
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.
- Point your Domain A record to your Appwrite instance IP.
- SSH into your Appwrite instance; you should be able to log in to your instance with your SSH key.
- Once you log in, there will be two folders ( Appwrite and Snap )
- Go into the Appwrite folder and edit the .env file
- Search for _APP_DOMAIN, update the domain and save it.
- Restart your docker with
docker compose up -d
- Trigger the SSL creation
docker-compose exec appwrite ssl
- 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.
- SSH into your Appwrite instance.
- 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
- Enter the Appwrite folder and run the migration
docker compose exec appwrite migrate
- 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.
- SSH into your Appwrite instance and enter the Appwrite folder.
- Edit the .env file, change the _APP_STORAGE_DEVICE to DOSpaces
- 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.
- Restart your docker for the new settings apply
docker compose up -d
- Try uploading files through your Appwrite instance, and you should be able to find the files in your Digital Ocean Spaces.
- Take note that it will use some ID as folders on Digital Ocean Spaces if you can't find the folder.
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.