Appwrite is an open-source backend-as-a-service that abstracts all the complexity involved in building a modern application by providing you with a set of REST APIs for your core backend needs. Appwrite handles user authentication and authorization, real-time databases, cloud functions, webhooks, and much more!
One of the core functionalities of Appwrite is Appwrite Storage. It permits you to upload, view, download, and query your project files. Appwrite Storage not only takes care of encryption, compression and antivirus scans, it’s also built on top of Appwrite’s flexible, yet simple permission system. Appwrite lets you store any files such as text documents, icons, images, videos, and more.
Recently, Appwrite introduced support for Wasabi as a storage adapter, allowing you to use Appwrite while not having to worry about your storage running out!
💻 Wasabi Cloud Storage Setup
To get started we’ll first need to set up our bucket and get our credentials before we can start using Wasabi Cloud storage with Appwrite.
1) Sign up for a Wasabi account and navigate to the Buckets menu in your Wasabi console to create a bucket.
2) Once you have your bucket created and configured, you can now go ahead and create your access key and secret. You will be able to do this by navigating to the Access Keys tab present in the left-side navigation.
This will give you your access key and secret which we will later use to connect Appwrite with Wasabi.
3) You will also need to get your region for the integration. You would have selected your region when you created your bucket. Here, The region for the bucket we created is eu-central-1
.
Hence, With this we conclude the initial setup 💪 and now we will proceed to connect Wasabi Cloud storage with Appwrite.
🚀 Appwrite + Wasabi Cloud Storage
Before you start, make sure that you have the Appwrite instance up and running. Installation of Appwrite is as simple as running one 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:latest
To learn more about the installation process, you can check out our installation guide.
We can now start configuring the .env
file to integrate Wasabi Cloud storage with Appwrite.
As a first step, navigate to _APP_STORAGE_DEVICE
in the .env
file and change it from Local
(default) to Wasabi
. This tells the Appwrite server to use Wasabi as the storage adapter and to expect Wasabi credentials in the other environment variables.
You will also need to edit the following .env variables to get Appwrite connected with Wasabi.
_APP_STORAGE_DEVICE=Wasabi
_APP_STORAGE_DEVICE_WASABI_BUCKET=your bucket name
_APP_STORAGE_DEVICE_WASABI_REGION=region
_APP_STORAGE_DEVICE_WASABI_SECRET=your secret
_APP_STORAGE_DEVICE_WASABI_ACCESS_KEY=your access key
After editing your .env
file, you will need to restart Appwrite. This can be easily done by running the following command.
docker-compose up -d
Once Appwrite has restarted, create a new account and a new project. In the left menu, select Storage and create a new bucket. Finally, upload a file into your bucket. You should see your uploaded files in the Wasabi console as well.
👨🎓 Conclusion
With the newly released provider system for Appwrite Storage service, you can now connect Appwrite with external storage providers instead of storing the files on your system. This prevents exhausting hard drive and bandwidth limits, as well as lets you use your favorite provider alongside Appwrite. And as you have seen in the tutorial above, you can easily connect Appwrite with Wasabi Cloud storage in just a few steps!
If you have a project to share, need help, or simply want to become a part of the Appwrite community, I would love for you to join the official Appwrite Discord server. I can’t wait to see what you build!
📚 Learn more
You can use the following resources to learn more and get help:
Top comments (0)