# Self-host Appwrite

> An open-source backend-as-a-service with auth, databases, storage, and functions behind one API.

- Page: https://levelrail.com/templates/appwrite/
- JSON: https://levelrail.com/templates/appwrite.json
- Category: Developer Tools
- Licence: BSD-3-Clause (Permissive license)
- Source: https://github.com/appwrite/appwrite
- Upstream docs: https://appwrite.io/docs

## Requirements
- Memory: about 2 GiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 1.7.4

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| appwrite | appwrite/appwrite | 1.7.4 | 80 | appwrite_uploads -> /storage/uploads; appwrite_cache -> /storage/cache; appwrite_config -> /storage/config; appwrite_certificates -> /storage/certificates |
| appwrite-console | appwrite/console | 6.1.28 | 80 | none |
| db | mariadb | 10.11 | none | appwrite_db_data -> /var/lib/mysql |
| redis | redis | 7.2.4-alpine | none | appwrite_redis_data -> /data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| appwrite | _APP_CONSOLE_WHITELIST_ROOT | preset |
| appwrite | _APP_DB_HOST | preset |
| appwrite | _APP_DB_PASS | generated |
| appwrite | _APP_DB_PORT | preset |
| appwrite | _APP_DB_SCHEMA | preset |
| appwrite | _APP_DB_USER | generated |
| appwrite | _APP_DOMAIN | preset |
| appwrite | _APP_ENV | preset |
| appwrite | _APP_OPENSSL_KEY_V1 | generated |
| appwrite | _APP_REDIS_HOST | preset |
| appwrite | _APP_REDIS_PORT | preset |
| db | MYSQL_DATABASE | preset |
| db | MYSQL_PASSWORD | generated |
| db | MYSQL_ROOT_PASSWORD | generated |
| db | MYSQL_USER | generated |

## Deploy

### CLI

```bash
levelrail-cli templates deploy appwrite --name my-appwrite
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/appwrite/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy Appwrite on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id appwrite for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image appwrite/appwrite:1.7.4, appwrite/console:6.1.28, mariadb:10.11, redis:7.2.4-alpine is what you deploy there.

Self-host Appwrite, Appwrite docker compose file, deploy Appwrite on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
