Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
b482e79
Add Dockerfile support to language and platform mappings
ebenezerdon Jun 12, 2025
ed8c139
Refactor self-hosting documentation structure and add new platform/co…
ebenezerdon Jun 12, 2025
328fb5f
docs: add AWS, DigitalOcean, Google Cloud and Azure to self-hosting p…
ebenezerdon Jun 12, 2025
9dcb390
add version control, backups, and security documentation for self-hos…
ebenezerdon Jun 13, 2025
c94ba9f
Update tutorials
ebenezerdon Jun 18, 2025
8af5510
Add cloud vs self-hosting comparison and guidelines for when to self-…
ebenezerdon Jun 18, 2025
2de7590
Merge branch 'main' into doc-self-hosting-tutorials
ebenezerdon Jun 18, 2025
b06f800
Update casing
ebenezerdon Jun 19, 2025
74d43e2
Move management pages to a management folder
ebenezerdon Jun 19, 2025
3610dee
Add dedicated security page and update production page to remove redu…
ebenezerdon Jun 19, 2025
6cd2544
Merge branch 'main' into doc-self-hosting-tutorials
ebenezerdon Jun 19, 2025
3a68329
Temporarily remove platforms for testing
ebenezerdon Jun 19, 2025
d42e921
Rename management section to production, create a production preparat…
ebenezerdon Jun 19, 2025
6a6bdef
Add detailed documentation on rate limits, including their applicatio…
ebenezerdon Jun 19, 2025
1300451
Add performance, resource management, and monitoring considerations t…
ebenezerdon Jun 19, 2025
79c9a4d
Reposition security and scaling
ebenezerdon Jun 19, 2025
903c61b
Merge branch 'main' into doc-self-hosting-tutorials
ebenezerdon Jul 2, 2025
95bfdcd
Update AWS self-hosting guide
ebenezerdon Jul 2, 2025
2e526fe
Use structured sections
ebenezerdon Jul 2, 2025
11869b0
Update digitalocean self-hosting guide
ebenezerdon Jul 2, 2025
110a0b0
Update gcp self-hosting guide
ebenezerdon Jul 2, 2025
14488bf
Update azure self-hosting guide
ebenezerdon Jul 2, 2025
469966e
Update selfhost vs cloud
ebenezerdon Jul 24, 2025
1d00a4c
Update step 1 / 2
ebenezerdon Jul 24, 2025
78e1fe5
Update src/routes/docs/advanced/self-hosting/+page.markdoc
ebenezerdon Jul 24, 2025
575c55c
Update src/routes/docs/advanced/self-hosting/+page.markdoc
ebenezerdon Jul 24, 2025
b47a454
Use partial for github config
ebenezerdon Jul 24, 2025
8fbe6de
Remove redundant info box
ebenezerdon Jul 24, 2025
607d10f
Correct setup text
ebenezerdon Jul 24, 2025
5af40f8
replace mongo with mariadb
ebenezerdon Jul 24, 2025
4e4cd9a
update to mysql
ebenezerdon Jul 24, 2025
f07f482
Update backup doc
ebenezerdon Jul 28, 2025
b73c6f2
Merge branch 'main' into doc-self-hosting-tutorials
ebenezerdon Jul 28, 2025
36ced25
Merge branch 'main' into doc-self-hosting-tutorials
ebenezerdon Aug 7, 2025
dfdca8b
Update src/routes/docs/advanced/self-hosting/installation/+page.markdoc
ebenezerdon Aug 28, 2025
17fcee3
Update src/routes/docs/advanced/self-hosting/installation/+page.markdoc
ebenezerdon Aug 28, 2025
883512b
use list instead of table
ebenezerdon Aug 28, 2025
4d40b05
Update src/lib/utils/code.ts
ebenezerdon Aug 28, 2025
1737324
Update src/lib/utils/references.ts
ebenezerdon Aug 28, 2025
629b487
Update src/routes/docs/advanced/self-hosting/+page.markdoc
ebenezerdon Aug 28, 2025
f9ed389
Update src/routes/docs/advanced/self-hosting/production/scaling/+page…
ebenezerdon Aug 28, 2025
7286349
Update src/routes/docs/advanced/self-hosting/+page.markdoc
ebenezerdon Aug 28, 2025
b4d29d4
Fix typos and de-hardcode the image tag to avoid fast bit-rot
ebenezerdon Aug 28, 2025
e7276b0
Merge branch 'main' into doc-self-hosting-tutorials
ebenezerdon Aug 28, 2025
fa63a52
Update src/lib/utils/references.ts
ebenezerdon Aug 28, 2025
f4a3df4
restructure and simplify backups page
ebenezerdon Aug 28, 2025
a11ea48
Remove DigitalOcean App Platform deployment option
ebenezerdon Aug 28, 2025
87ad9ec
fix incorrect links
ebenezerdon Aug 28, 2025
a9f37bf
Remove redundant cards
ebenezerdon Aug 28, 2025
164e897
remove duplicate ini
ebenezerdon Aug 28, 2025
6035729
Update src/routes/docs/advanced/self-hosting/platforms/google-cloud/+…
ebenezerdon Aug 28, 2025
33533f2
Update src/routes/docs/advanced/self-hosting/platforms/digitalocean/+…
ebenezerdon Aug 28, 2025
fbd231c
Update src/routes/docs/advanced/self-hosting/platforms/digitalocean/+…
ebenezerdon Aug 28, 2025
8fc629f
Update src/routes/docs/advanced/self-hosting/production/updates/+page…
ebenezerdon Aug 28, 2025
9e790d9
Update src/routes/docs/advanced/self-hosting/production/backups/+page…
ebenezerdon Aug 28, 2025
ae17517
Simplify self-hosting tutorials and focus on one-click deploys
ebenezerdon Sep 5, 2025
4ebd43b
fix syntax error
ebenezerdon Sep 5, 2025
6eae4c8
fix text rendering with bulleted lists
ebenezerdon Sep 5, 2025
fecd192
Merge branch 'main' into doc-self-hosting-tutorials
ebenezerdon Sep 5, 2025
71415d6
use info tags instead of note/quote
ebenezerdon Sep 5, 2025
7bf6064
Update src/routes/docs/advanced/self-hosting/configuration/version-co…
ebenezerdon Sep 5, 2025
2f9d92d
Update src/routes/docs/advanced/self-hosting/+layout.svelte
ebenezerdon Sep 5, 2025
3535012
Merge branch 'main' into doc-self-hosting-tutorials
ebenezerdon Sep 5, 2025
178fc11
focus Google Cloud docs on Compute Engine
ebenezerdon Sep 5, 2025
d62663a
focus Azure docs on Virtual Machines
ebenezerdon Sep 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/lib/utils/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import http from 'highlight.js/lib/languages/http';
import css from 'highlight.js/lib/languages/css';
import groovy from 'highlight.js/lib/languages/groovy';
import ini from 'highlight.js/lib/languages/ini';
import dockerfile from 'highlight.js/lib/languages/dockerfile';
import { Platform } from './references';
import { writable } from 'svelte/store';

Expand Down Expand Up @@ -65,7 +66,10 @@ const languages = {
css: css,
groovy: groovy,
ini: ini,
env: ini
env: ini,
dotenv: ini,
dockerfile: dockerfile,
docker: dockerfile
} as const satisfies Record<string, LanguageFn>;

const platformAliases: Record<string, keyof typeof languages> = {
Expand Down
7 changes: 6 additions & 1 deletion src/lib/utils/references.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ export const platformMap: Record<Language | string, string> = {
vue: 'Vue',
svelte: 'Svelte',
groovy: 'Groovy',
go: 'Go'
go: 'Go',
dockerfile: 'Dockerfile',
docker: 'Dockerfile',
ini: 'INI',
env: '.env',
dotenv: '.env'
};

export const serviceMap: Record<ServiceValue, string> = {
Expand Down
100 changes: 79 additions & 21 deletions src/routes/docs/advanced/self-hosting/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,57 +12,115 @@
label: 'Getting started',
items: [
{
label: 'Installation',
label: 'Overview',
href: '/docs/advanced/self-hosting/'
},
{
label: 'Installation',
href: '/docs/advanced/self-hosting/installation'
}
]
},
{
label: 'Guides',
label: 'Platform deployment',
items: [
{
label: 'Coolify',
href: '/docs/advanced/self-hosting/coolify'
label: 'AWS',
href: '/docs/advanced/self-hosting/platforms/aws'
},
{
label: 'Functions',
href: '/docs/advanced/self-hosting/functions'
label: 'DigitalOcean',
href: '/docs/advanced/self-hosting/platforms/digitalocean'
},
{
label: 'Sites',
href: '/docs/advanced/self-hosting/sites'
label: 'Google Cloud',
href: '/docs/advanced/self-hosting/platforms/google-cloud'
},
{
label: 'Azure',
href: '/docs/advanced/self-hosting/platforms/azure'
},
{
label: 'Coolify',
href: '/docs/advanced/self-hosting/platforms/coolify'
}
]
},
{
label: 'Configuration',
items: [
{
label: 'Environment variables',
href: '/docs/advanced/self-hosting/configuration/environment-variables'
},
{
label: 'Email delivery',
href: '/docs/advanced/self-hosting/email'
href: '/docs/advanced/self-hosting/configuration/email'
},
{
label: 'SMS delivery',
href: '/docs/advanced/self-hosting/sms'
href: '/docs/advanced/self-hosting/configuration/sms'
},
{
label: 'Storage',
href: '/docs/advanced/self-hosting/storage'
label: 'Functions',
href: '/docs/advanced/self-hosting/configuration/functions'
},
{
label: 'Environment variables',
href: '/docs/advanced/self-hosting/environment-variables'
label: 'Sites',
href: '/docs/advanced/self-hosting/configuration/sites'
},
{
label: 'TLS Certificates',
href: '/docs/advanced/self-hosting/tls-certificates'
label: 'Storage',
href: '/docs/advanced/self-hosting/configuration/storage'
},
{
label: 'Debugging',
href: '/docs/advanced/self-hosting/debug'
label: 'TLS certificates',
href: '/docs/advanced/self-hosting/configuration/tls-certificates'
},
{
label: 'Production',
label: 'Version control',
href: '/docs/advanced/self-hosting/configuration/version-control'
}
]
},
{
label: 'Production',
items: [
{
label: 'Preparation',
href: '/docs/advanced/self-hosting/production'
},
{
label: 'Update',
href: '/docs/advanced/self-hosting/update'
label: 'Security',
href: '/docs/advanced/self-hosting/production/security'
},
{
label: 'Scaling',
href: '/docs/advanced/self-hosting/production/scaling'
},
{
label: 'Rate limits',
href: '/docs/advanced/self-hosting/production/rate-limits'
},
{
label: 'Email delivery',
href: '/docs/advanced/self-hosting/production/emails'
},
{
label: 'Error monitoring',
href: '/docs/advanced/self-hosting/production/errors'
},
{
label: 'Backups',
href: '/docs/advanced/self-hosting/production/backups'
},
{
label: 'Updates and migrations',
href: '/docs/advanced/self-hosting/production/updates'
},
{
label: 'Debugging',
href: '/docs/advanced/self-hosting/production/debugging'
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we missed adding the security doc:

Screenshot 2025-06-19 at 10 28 18 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

]
}
Expand Down
193 changes: 115 additions & 78 deletions src/routes/docs/advanced/self-hosting/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,54 @@ description: Set up your self-hosted Appwrite instance easily. Read the installa

Appwrite was designed from the ground up with self-hosting in mind. You can install and run Appwrite on any operating system that can run a [Docker CLI](https://www.docker.com/products/docker-desktop). Self-hosted Appwrite instances can be configured flexibly with access to the same features found on Appwrite Cloud.

# System requirements {% #system-requirements %}
{% info title="Upgrading from older versions" %}
If you are migrating from an older version of Appwrite, you need to follow the [migration instructions](/docs/advanced/self-hosting/production/updates)
{% /info %}

# Cloud vs Self-hosting {% #cloud-vs-self-hosting %}

Choose the deployment method that fits your needs.

Appwrite is designed to run well on both small and large deployments. The minimum requirements to run Appwrite are as little as **2 CPU cores** and **4GB of RAM**, with **2GB of swap memory**, and an operating system that supports Docker.
| Feature | Appwrite Cloud | Self-hosting |
|---------|---------------|--------------|
| Setup | Zero setup | Manual setup required |
| Maintenance | Fully managed | You manage updates and scaling |
| Data control | Managed infrastructure | Full control over data location |
| Compliance | Built-in compliance | Configure for your requirements |
| Scaling | Automatic | Manual configuration |

Appwrite requires [Docker Compose Version 2](https://docs.docker.com/compose/install/). To install Appwrite, make sure your Docker installation is updated to support Composer V2.
# When to self-host {% #when-to-self-host %}

{% info title="Upgrading From Older Versions" %}
If you are migrating from an older version of Appwrite, you need to follow the [migration instructions](/docs/advanced/self-hosting/update)
Self-hosting is ideal when you need data control or have specific compliance requirements.

**Consider self-hosting if:**
- You want to manage your own infrastructure
- You're a hobbyist or want to experiment with Appwrite in a playground environment
- You need to develop against a local instance of Appwrite

**Appwrite Cloud is recommended if:**
- You want to focus on building features, not managing infrastructure
- Your team lacks extensive DevOps experience
- You expect self-hosting to save costs (it often costs more when factoring in time and expertise)
{% info title="Enterprise self-hosting" %}
For compliance features and dedicated support, explore [enterprise self-hosting solutions](/contact-us/enterprise).
{% /info %}

# Install with Docker {% #install-with-docker %}

The easiest way to start running your Appwrite server is by running our Docker installer tool from your terminal. Before running the installation command, make sure you have [Docker CLI](https://www.docker.com/products/docker-desktop) installed on your host machine.

You will be prompted to configure the following during the setup command:

1. Your Appwrite instance's HTTP and HTTPS ports.
2. Your Appwrite instance's secret key used to encrypt sensitive data.
3. Your Appwrite instance's main hostname. Appwrite will generate a certificate using this hostname.
4. Your Appwrite instance's DNS A record hostname. Typically set to the same value as your Appwrite instance's hostname.

{% tabs %}
{% tabsitem #unix title="macOS and Linux" %}
## Bash
```sh
docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.7.4
```
{% /tabsitem %}

{% tabsitem #windows title="Windows" %}
## CMD
```cmd
docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.7.4
```
## Powershell
```powershell
docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.7.4
```
{% /tabsitem %}
{% /tabs %}

# One-click setups {% #one-click-setups %}

In addition to running Appwrite locally, you can also launch Appwrite using a pre-configured setup. This allows you to get up and running with Appwrite quickly without installing Docker on your local machine.

Choose from one of the providers below:
# Quick start {% #quick-start %}

The fastest way to get started with Appwrite self-hosting:

1. **Use a one-click deployment** - Choose from [marketplace installations](#one-click-deployments) for instant setup
2. **Or follow the manual installation** - Use our [Docker installation guide](/docs/advanced/self-hosting/installation) for custom setups
3. **Configure services** - Set up [email](/docs/advanced/self-hosting/configuration/email), [storage](/docs/advanced/self-hosting/configuration/storage), and other services

# Deployment options {% #deployment-options %}

Choose the deployment method that best fits your needs:

## One-click deployments {% #one-click-deployments %}

**Recommended:** Use these pre-configured marketplace apps for instant setup:

{% table %}
* &nbsp; {% width=48 %}
Expand Down Expand Up @@ -91,46 +81,93 @@ Choose from one of the providers below:
* [Click to install](https://aws.amazon.com/marketplace/pp/prodview-2hiaeo2px4md6)
{% /table %}

## Cloud platforms {% #cloud-platforms %}

For custom deployments on major cloud providers:

{% cards %}
{% cards_item href="/docs/advanced/self-hosting/platforms/aws" title="Amazon Web Services" %}
One-click AWS Marketplace deployment with custom configuration options.
{% /cards_item %}

{% cards_item href="/docs/advanced/self-hosting/platforms/digitalocean" title="DigitalOcean" %}
Marketplace installation with simple Droplet configuration.
{% /cards_item %}

{% cards_item href="/docs/advanced/self-hosting/platforms/google-cloud" title="Google Cloud" %}
Deploy using Cloud Run, Compute Engine, or other Google Cloud services.
{% /cards_item %}

{% cards_item href="/docs/advanced/self-hosting/platforms/azure" title="Microsoft Azure" %}
Deploy using Container Apps, Virtual Machines, or other Azure services.
{% /cards_item %}
{% /cards %}

## Platform-as-a-Service (PaaS) {% #paas-platforms %}

Deploy Appwrite on modern PaaS platforms for simplified management:

{% cards %}
{% cards_item href="/docs/advanced/self-hosting/platforms/coolify" title="Coolify" %}
Open-source platform for easy self-hosting with one-click deployments.
{% /cards_item %}
{% /cards %}

# Configuration {% #configuration %}

After deployment, configure Appwrite to enable additional features:

# Next steps {% #next-steps %}
{% cards %}
{% cards_item href="/docs/advanced/self-hosting/configuration/email" title="Email delivery" %}
Set up SMTP providers for user verification, password recovery, and notifications.
{% /cards_item %}

Self-hosting Appwrite gives you more configurable options.
Make these configurations to unlock the full power of Appwrite.
{% cards_item href="/docs/advanced/self-hosting/configuration/sms" title="SMS Delivery" %}
Configure SMS providers for phone authentication and two-factor authentication.
{% /cards_item %}

[Configure Appwrite Functions](/docs/advanced/self-hosting/functions)
{% cards_item href="/docs/advanced/self-hosting/configuration/storage" title="Storage Backends" %}
Connect external storage providers like AWS S3, Backblaze, or Wasabi.
{% /cards_item %}

[Configure Appwrite Sites](/docs/advanced/self-hosting/sites)
{% cards_item href="/docs/advanced/self-hosting/configuration/functions" title="Functions Runtime" %}
Enable serverless functions with custom runtimes and execution environments.
{% /cards_item %}
{% /cards %}

[Configure email delivery](/docs/advanced/self-hosting/email)
# Production readiness {% #production-readiness %}

[Configure SMS delivery](/docs/advanced/self-hosting/sms)
Ensure your Appwrite deployment is production-ready:

[Configure Appwrite Storage](/docs/advanced/self-hosting/storage)
## Security considerations {% #security %}

[Configure TLS Certificates](/docs/advanced/self-hosting/tls-certificates)
- **Environment Variables** - Secure sensitive configuration using environment variables
- **TLS Certificates** - Enable HTTPS with automated certificate management
- **Network Security** - Configure firewalls and security groups appropriately
- **Access Control** - Implement proper authentication and authorization

# Manual (Docker Compose) {% #manual %}
## Performance optimization {% #performance %}

For advanced Docker users, the manual installation might seem more familiar. To set up Appwrite manually, download the Appwrite base [`docker-compose.yml`](/install/compose) and [`.env`](/install/env) files, then move them inside a directory named `appwrite`. After the download completes, update the different environment variables as you wish in the `.env` file and start the Appwrite stack using the following Docker command:
- **Resource Scaling** - Monitor and scale CPU, memory, and storage resources
- **Database Performance** - Optimize database connections and queries
- **CDN Integration** - Use content delivery networks for static assets
- **Load Balancing** - Distribute traffic across multiple instances

```bash
docker compose up -d --remove-orphans
```
## Monitoring and maintenance {% #monitoring %}

Once the Docker installation completes, go to your machine's hostname or IP address on your browser to access the Appwrite Console. Please note that on hosts that are not Linux-native, the server might take a few minutes to start after installation completes.
- **Health Checks** - Set up monitoring for service availability and performance
- **Log Management** - Centralize and analyze application logs
- **Backup Strategy** - Implement regular database and file backups
- **Update Management** - Keep Appwrite updated with the latest releases

# Stop {% #stop %}
# Get started {% #get-started %}

You can stop your Appwrite containers by using the following command executed from the same directory as your `docker-compose.yml` file.
Ready to self-host Appwrite? Choose your preferred path:

```bash
docker compose stop
```
**🚀 One-Click Deploy** - Use a [marketplace installation](#one-click-deployments) for instant setup (recommended)

# Uninstall {% #uninstall %}
**🐳 Manual Installation** - Follow our [Docker installation guide](/docs/advanced/self-hosting/installation) for custom setups

To stop and remove your Appwrite containers, you can use the following command executed from the same directory as your `docker-compose.yml` file.
**☁️ Cloud Platform** - [Choose a cloud platform](#cloud-platforms) for production hosting with custom configuration

```bash
docker compose down -v
```
**🛠️ Platform-as-a-Service** - Deploy on [Coolify](/docs/advanced/self-hosting/platforms/coolify) or similar platforms for simplified management
Loading
Loading