Getting Started for Web

Appwrite is a development platform providing you easy yet powerful API and management console to get your next project up and running quickly.

This tutorial will help you start using Appwrite products and build your next project.

Set Up a Self Hosted Environment

Appwrite backend server is designed to run in a container environment. Running your server is as easy as running one command from your terminal. You can run Appwrite on your localhost using docker-compose or on any other container orchestration tool like Kubernetes, Docker Swarm or Rancher.

The easiest way to start running your Appwrite server is by running our docker-compose file. Before running the installation command make sure you have Docker installed on your machine:

mkdir appwrite-ce && \
cd appwrite-ce && \
curl -o docker-compose.yml && \
docker-compose up -d --remove-orphans

Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please notice that on non-linux native hosts the server might take a few minutes to start after installation completes.

Create Your First Appwrite Project

Go to your new Appwrite console and once inside click the icon in the top navigation header or on the 'Create Project' button on your console homepage. Choose a name for your project and click create to get started.

Add your Web Platform

For you to init your SDK and interact with Appwrite services you need to add a web platform to your project. To add a new platform, go to your Appwrite console, choose the project you created in the step before and click the 'Add Platform' button.

From the options, choose to add a web platform and add your project production and development domains in the form clients field. By adding your domain to your project platform you are allowing cross-domain communication between your project and Appwrite servers

Get Appwrite JS SDK


Use JS package manager, NPM from your command line to add Appwrite SDK to your project.

npm install appwrite

If you're using a bundler (like Browserify or webpack), you can import the Appwrite module when you need it:

import * as Appwrite from "appwrite";


To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services:

<script src=""></script>

Init your SDK

Initialize your SDK code with your project ID which can be found in your project settings page.

// Init your JS SDK
var appwrite = new Appwrite();

    .setEndpoint('http://localhost/v1') // Set only when using self-hosted solution

A Word About API Keys

Do not pass an API Key when initializing your client SDK. This will expose your users to any data your API Key has been granted access to, even if your users do not own it! The API keys are meant to be used from server-side integration only!

Make Your First Request

Once your SDK object is set, access any of the Appwrite services and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the API References section.

// Login User
appwrite.auth.login('', 'password',
    '', '');

Full Example

// Init your JS SDK
var appwrite = new Appwrite();


// Login User
appwrite.auth.login('', 'password',
    '', '');

Next Steps

Appwrite has many services and tools to help improve your app and speed up your development. The best way to learn how you can take advantage of them is to explore the different API references docs.