Skip to content
On this page


This chapter assume you've a running Ubuntu server, and you've access to the root account.

These instructions should work for any Debian based distro

Create Swap file

This part was taken from Appwrite DigitalOcean script.

It's vital to create a swap file when using a low-budget servers, it also will benefit the high-budget ones.

Run this commands as root

fallocate -l 2G /swapfile
ls -lh /swapfile

chmod 600 /swapfile
ls -lh /swapfile

mkswap /swapfile
swapon /swapfile
swapon --show

echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Install Docker

You will install Docker using the Docker installation script. For more advance and specific installation, check Docker install instructions.

First, You need to fetch the "installation script."

curl -fsSL -o

Best practice

When downloading any script from an outside source, it's always best examining the file before executing it. To see all the steps for that file you can run

sudo sh ./ --dry-run

This command will print all the command this script is about the run.

To install Docker run the script:

sudo sh

You can choose one of two methods to install Appwrite

Install Appwrite automatically

It's best to cd to the current user home directory, so, later it will be easy to find Appwrite Docker file.

cd ~

Install Appwrite using Appwrite's one-liner, and follow the instructions.

docker run -it --rm \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
    --entrypoint="install" \

Install Appwrite manually

You can install Appwrite manually, and this is usually what I prefer.

To install Appwrite create a folder in the current user home directory, and cd into it.

cd ~
mkdir appwrite
cd appwrite

Any Appwrite instance is required to have these two files.

  • docker-compose.yml - This file contains all the necessary containers, volumes and networks requires to run an instance of Appwrite
  • .env - This file contains all environment variable information. Those variables that are being past to one or more containers and let you modify Docker containers without having the need to change the container itself.

You won't create those file line by line, rather you will download them from Appwrite permanent endpoint for these two files. To download these, run:

curl -o docker-compose.yml
curl -o .env

Run this command 👇 to start and create your Appwrite installation.

docker compose up -d

You can go to Post installation page to finish your installation.