Deployment guide

Hosting Appwrite on a VPS

Deploy on a VPS Cloud →

Databases9 min read

Hosting Appwrite on a VPS

Appwrite is an open source backend-as-a-service designed for web and mobile developers: document database, authentication, file storage, serverless functions, and messaging. Self-hosting it on a VPS gives you a complete self-hosted backend, with multi-platform SDKs and no usage-based billing.

Why self-host Appwrite on a VPS

Appwrite brings together in a single platform everything an application needs on the server side: authentication with more than 30 OAuth methods, a document database with granular permissions, file storage with image transformation, serverless functions in several languages, and messaging. Its cloud version bills per usage and per resources; by self-hosting on a VPS, you deploy the whole thing via Docker and drive it from an elegant web console, with no cap. It's particularly suited to Flutter, React Native, or web developers who want a ready-to-use backend with official SDKs, while keeping the data and logic on their own infrastructure. You control the functions, the API keys, and the permissions, and you scale at your own pace.

The concrete benefits of a self-hosted Appwrite

  • All-in-one backend: Auth, Databases, Storage, Functions, and Messaging in a single console.
  • Official SDKs for Flutter, React Native, Web, Android, iOS, Node, Python, and more.
  • More than 30 built-in OAuth providers (Google, GitHub, Apple...) with no code.
  • Self-hosted serverless functions: run your business logic without an external service.
  • Granular permissions at the document and collection level, managed from the console.
  • No billing per execution and no user quota: a fixed VPS plan.

Hardware and software prerequisites

Appwrite orchestrates several services (API, console, MariaDB, Redis, workers, and the functions runtime via Docker-in-Docker). For a development instance, 2 vCPU and 4 GB of RAM with 40 GB of SSD are enough. For production with active serverless functions and several apps, aim for 4 vCPU, 8 GB of RAM, and 80 GB of SSD, because each function runs in its own ephemeral container. On the software side: Ubuntu 22.04/24.04 LTS, Docker and Docker Compose v2 (Appwrite manages its own built-in Traefik for routing and SSL), and a domain name pointing to the VPS (e.g., api.myapp.com). Ports 80 and 443 must be free for Traefik to obtain the Let's Encrypt certificates.

Deploying self-hosted Appwrite with Docker

01

Prepare the VPS and the domain

Install Docker, point your domain to the VPS IP, and make sure ports 80 and 443 are open in ufw: Appwrite's built-in Traefik needs them for the Let's Encrypt ACME challenge.

02

Run the official installer

Run the installation command docker run ... appwrite/appwrite install: an interactive wizard asks you for the domain, the HTTP/HTTPS port, and generates the docker-compose.yml as well as the .env file with the secrets. This is the recommended method rather than a hand-written compose.

03

Configure the domain and SSL

Fill in _APP_DOMAIN and _APP_DOMAIN_TARGET with your domain name. Traefik then automatically generates the HTTPS certificate. Check console access at https://api.myapp.com and create your root administrator account.

04

Create a project and its first application

From the console, create a project, add a platform (Web, Flutter, Apple...) by declaring the allowed hostname, and retrieve the project ID. This information feeds the client-side SDK initialization.

05

Harden the production configuration

In .env, set _APP_OPTIONS_ABUSE and _APP_OPTIONS_FORCE_HTTPS to enabled, configure SMTP (_APP_SMTP_*) for verification emails, and restrict _APP_CONSOLE_WHITELIST_* if you want to limit console access.

06

Back up MariaDB and the Storage

Schedule a daily dump of Appwrite's MariaDB database and archive the Storage volume (uploads). Since Appwrite encrypts some data with _APP_OPENSSL_KEY_V1, back up this secret too: without it, the encrypted files are unrecoverable.

Appwrite vs Supabase: which one to self-host?

CriterionAppwriteSupabase
DatabaseMariaDB, document modelNative PostgreSQL, full SQL
ApproachSDK- and mobile-app-orientedSQL- and relational-app-oriented
Serverless functionsNative, multi-language built-inEdge Functions (Deno)
InstallationOfficial interactive installerCompose to configure manually
SSL / routingBuilt-in Traefik, automaticExternal reverse proxy to add
Vector / AI searchNot nativeNative via pgvector
Ideal forFlutter, React Native, mobile-firstAdvanced SQL, RAG, relational
Administration consoleRich, guided consoleStudio focused on SQL tables

Be sure to back up the _APP_OPENSSL_KEY_V1 variable from your .env in a separate vault: Appwrite uses it to encrypt files and some sensitive data, and a restore without this key makes the encrypted content unreadable. For serverless functions in production, monitor the disk consumption tied to the ephemeral runtime containers and schedule a regular docker system prune to avoid saturating the SSD with intermediate images.

Self-host your Appwrite backend

The ServOrbit Cloud VPS with a ready-to-use Docker template, NVMe SSD, and dedicated CPU hosts the entire Appwrite stack, serverless functions included, over HTTPS.

Need help?

Browse our help center and FAQ, or write to our team — support in French, English and Arabic.