How to setup Appwrite on Ubuntu

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 U…

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.

what

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.

go-below



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!

docker-whale

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-

screenshot-setup-appwrite-ubuntu

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

All Done!
Now you are all set to make your first api call!

Thanks for reading 🙂
All reviews and feedbacks are welcomed :hug:


Print Share Comment Cite Upload Translate
APA
Anamika | Sciencx (2024-03-29T13:57:46+00:00) » How to setup Appwrite on Ubuntu. Retrieved from https://www.scien.cx/2021/10/08/how-to-setup-appwrite-on-ubuntu/.
MLA
" » How to setup Appwrite on Ubuntu." Anamika | Sciencx - Friday October 8, 2021, https://www.scien.cx/2021/10/08/how-to-setup-appwrite-on-ubuntu/
HARVARD
Anamika | Sciencx Friday October 8, 2021 » How to setup Appwrite on Ubuntu., viewed 2024-03-29T13:57:46+00:00,<https://www.scien.cx/2021/10/08/how-to-setup-appwrite-on-ubuntu/>
VANCOUVER
Anamika | Sciencx - » How to setup Appwrite on Ubuntu. [Internet]. [Accessed 2024-03-29T13:57:46+00:00]. Available from: https://www.scien.cx/2021/10/08/how-to-setup-appwrite-on-ubuntu/
CHICAGO
" » How to setup Appwrite on Ubuntu." Anamika | Sciencx - Accessed 2024-03-29T13:57:46+00:00. https://www.scien.cx/2021/10/08/how-to-setup-appwrite-on-ubuntu/
IEEE
" » How to setup Appwrite on Ubuntu." Anamika | Sciencx [Online]. Available: https://www.scien.cx/2021/10/08/how-to-setup-appwrite-on-ubuntu/. [Accessed: 2024-03-29T13:57:46+00:00]
rf:citation
» How to setup Appwrite on Ubuntu | Anamika | Sciencx | https://www.scien.cx/2021/10/08/how-to-setup-appwrite-on-ubuntu/ | 2024-03-29T13:57:46+00:00
https://github.com/addpipe/simple-recorderjs-demo