This content originally appeared on DEV Community and was authored by Anamika
Setting up Appwrite on any Operating System, or Kernel is pretty easy. Here we are going to go through an easy and simple method to setup Appwrite on a Linux Kernel.
Well I use Ubuntu Operating System, so let's get started with setting up Appwrite on Ubuntu.
Before getting started, I would like to give a brief intro to What is Appwrite.
So, Appwrite is a self-hosted solution that provides developers with a set of easy-to-use and integrate REST APIs to manage their core backend needs. Basically, it is a new open-source, end-to-end, back end server for front-end and mobile developers that allows to build apps much faster. Its main goal is to abstract and simplify common development tasks behind REST APIs and tools, helping developers build advanced apps faster.
Requirements
The only System Requirements to install Appwrite is- a small CPU core and 2GB of RAM, and an operating system that supports Docker.
If you have these in place, let us start then!
Note:
If you are migrating from an older version of Appwrite, you need to follow the migration instructions, steps of which, are provided as the last part of this article. (Upgrading from Older Versions)
So feel free to jump on to the last part if you already have a version on Appwrite installed and are planning to migrate to another version.
How to setup Appwrite on Ubuntu
Now, there can be multiple ways to install Appwrite, but the easiest way to start running an Appwrite server is by running Docker installer tool from the terminal. Before running the installation command, make sure you have Docker CLI installed.
If you don't have it installed, here's how you can do it. Refer to it and you are good to go!
After that, the process is very simple-
You just need to open your terminal and run the following bash commands:
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:0.10.4
You may change the Appwrite version accordingly
I followed the same procedure and the results were like so-
Basically, here we are making use of Docker, to install application on our local machine. It is simple, fast, and easy to run and use. If you are confused as to What is Docker then you may want to refer here
Well, the entire process took me around 5 minutes, when I did everything from scratch after installing a Docker CLI. (my net was also slow then :')
Upgrading From Older Versions
If you are migrating from an older version of Appwrite, you need to follow these steps.
In order to upgrade your Appwrite server from an older version, you should use the Appwrite migration tool after you have installed the new version. The migration tool will adjust your Appwrite data to the new version's structure to make sure your Appwrite data is compatible with any internal changes.
The first step is to install the latest version of Appwrite.
Go to the directory where you first installed Appwrite and find the appwrite directory. Inside the directory there will be a docker-compose.yml file. Now, we need to execute the following command from the same appwrite directory:
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:0.10.4
What this command will do is pull the docker-compose.yml file for the new version of Appwrite and after that it will perform the installation.
After the command is successfully executed, and the setup is completed, we can verify that we have the latest version of Appwrite. We can make use of the following command to do so
docker ps | grep appwrite/appwrite
Make sure that the STATUS
doesn't have any errors and all the appwrite/appwrite containers have the same latest version.
We can now start with the migration part.
For that, we will again have to navigate to the appwrite directory where our docker-compose.yml is present and run the following command:
cd appwrite/
docker-compose exec appwrite migrate
Once the migration process has completed successfully, we are all set to use the latest version of Appwrite!
You can also have a look at the official migration instructions present in the official documentation page of Appwrite
All Done!
Now you are all set to make your first api call!
Thanks for reading :)
All reviews and feedbacks are welcomed :hug:
This content originally appeared on DEV Community and was authored by Anamika
Anamika | Sciencx (2021-10-08T17:23:28+00:00) How to setup Appwrite on Ubuntu. Retrieved from https://www.scien.cx/2021/10/08/how-to-setup-appwrite-on-ubuntu/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.