Docs

Configuration

Self-hosting allows you to customize Appwrite to meet your needs and preferences. Here's a list of things you will need to set up before developing with Appwrite. Before you start, back up your .env and docker-compose.yml files.

Local Development

Self-hosting Appwrite for development lets you quickly prototype on your local machine. Since localhost is only a loopback address that points back at your development machine, there are some caveats you should be aware of when working with localhost.

Appwrite generates a self-signed certificate for development on localhost, as connecting to unsecured HTTP is not allowed by default. If you're developing client apps on localhost, set setSelfSigned(true) while initializing your Appwrite client.

If you're using an Android emulator to test your Flutter or Android apps, you can access localhost of your machine using the special alias IP 10.0.2.2.

If you're testing your Flutter, Android, or iOS app on a mobile device, you will not be able to access the localhost of your PC or Mac. When testing with a physical device, you may use a service like ngrok to proxy the Appwrite instance.

Setup Email and SMS Delivery

Appwrite requires an SMTP service to deliver emails. Email delivery is required for features like password recovery, account verification, MagicURL authentication, and team invites. You can use a third-party SMTP service or host your own SMTP server.

Set up email delivery

Appwrite supports multiple third-party SMS delivery providers. SMS delivery is required for phone authentication.

Set up SMS delivery

Configure Function Runtimes

Not all function runtimes are enabled by default. Enable the runtimes that you need and disable unused runtimes to save disk space on your server. To enable a runtime, add it to the _APP_FUNCTIONS_RUNTIMES environment variable as a comma separated list.

The example below would enable Dart 2.15, .NET 6.0, and Java 18 runtimes.

_APP_FUNCTIONS_RUNTIMES=dart-2.15, dotnet-6.0, java-18.0

You can find a full list of supported runtimes on the environment variables page.

You can also configure the maximum timeout that can be set on individual Appwrite functions. The maximum configurable timeout can be increased by changing the _APP_FUNCTIONS_TIMEOUT environment variable. This environment variable changes the configurable maximum but does not alter existing individual configurations.

Storage Adaptors

Appwrite's Storage Service can be configured to store files locally, or with self-hosted and cloud storage services. By default, Appwrite's Storage Service stores files on your server's local storage. If you expect large volumes of data or the need to have scalable data storage, you may choose to use a separate storage service.

Appwrite supports AWS S3, Digital Ocean Spaces, Backblaze, Linode, and Wasabi as storage adaptors. Some of these services can be self-hosted, just like Appwrite.

You can select which storage adaptor to use by setting the _APP_STORAGE_DEVICE environment variable. Valid values are local, s3, dospaces, backblaze, linode and wasabi. Each storage adaptor requires its own set of additional environment variables to configure.

The maximum size for individual file uploads is controlled by the _APP_STORAGE_LIMIT environment variable, which defaults to 30 MB. See Environment Variables for more information.

Configure storage adaptors

Applying Changes

After editing your docker-compose.yml or .env files, you will need to recreate your Appwrite stack by running the following compose command in your terminal.

docker compose up -d

You can verify if the changes have been successfully applied by running this command:

docker compose exec appwrite vars

More Configurable Options

If you don't see something you'd like to configure on this page, try searching the complete list of environment variables.

Learn more about environment variables