<p>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 <a href="https://www.docker.com/products/docker-desktop" target="_blank" rel="noopener">Docker CLI</a>. Self-hosted Appwrite instances can be configured flexibly with access to the same features found on Appwrite Cloud.</p>

<h2><a href="#systemRequirements" id="systemRequirements">System Requirements</a></h2>

<p>Appwrite is designed to run well on both small and large deployments. The minimum requirements to run Appwrite are as little as <b>1 CPU core</b> and <b>2GB of RAM</b>, and an operating system that supports Docker.</p>

<p>Appwrite requires <a href="https://docs.docker.com/compose/install/" target="_blank" rel="noopener">Docker Compose Version 2</a>. To install Appwrite, make sure your Docker installation is updated to support Composer V2.</p>

<div class="notice margin-bottom">
    <h3>Upgrading From Older Versions</h3>
    <p>If you are migrating from an older version of Appwrite, you need to follow the <a href="/docs/upgrade">migration instructions</a>.</p>
</div>

<h2><a href="#installWithDocker" id="installWithDocker">Install with Docker</a></h2>

<p>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 <a href="https://www.docker.com/products/docker-desktop" target="_blank" rel="noopener">Docker CLI</a> installed on your host machine.</p>

<p>You will be prompted to configure the following during the setup command:</p>
<ol class="margin-top margin-bottom-large text-size-normal">
    <li>Your Appwrite instance's HTTP and HTTPS ports.</li>
    <li>Your Appwrite instance's secret key which used to encrypt sensitive data.</li>
    <li>Your Appwrite instance's main hostname. Appwrite will generate a certificate using this hostname.</li>
    <li>Your Appwrite instance's DNS A record hostname. Typically set to the same value as your Appwrite instance's hostname.</li>
</ol>

<h3><a href="#unix" id="unix">Unix</a></h3>

<div class="ide margin-bottom" data-lang="bash" data-lang-label="Bash">
    <pre class="line-numbers"><code class="prism language-bash" data-prism>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:<?php echo APP_VERSION_STABLE; ?></code></pre>
</div>

<h3><a href="#windows" id="windows">Windows</a></h3>

<p>Hyper-V and Containers Windows features must be enabled to run Appwrite on Windows with Docker. If you don't have these features available, you can install <a href="https://docs.docker.com/desktop/windows/install/" target="_blank" rel="noopener">Docker Desktop</a> which uses Virtualbox to run Appwrite on a Virtual Machine.</p>

<ul class="phases clear" data-ui-phases>
    <li>
        <h4>CMD</h4>

        <div class="ide margin-bottom" data-lang="bash" data-lang-label="CMD">
            <pre class="line-numbers"><code class="prism language-bash" data-prism>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:<?php echo APP_VERSION_STABLE; ?></code></pre>
        </div>

    </li>
    <li>
        <h4>PowerShell</h4>

        <div class="ide margin-bottom" data-lang="bash" data-lang-label="PowerShell">
            <pre class="line-numbers"><code class="prism language-bash" data-prism>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:<?php echo APP_VERSION_STABLE; ?></code></pre>
        </div>
    </li>
</ul>

<h2><a href="#one-click-setups" id="one-click-setups">One-Click Setups</a></h2>

<p>
    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.
</p>

<p>Choose from one of the providers below:</p>

<table cellspacing="0" cellpadding="0" border="0" class="full margin-bottom-large text-size-small vertical">
    <thead>
        <tr>
            <th style="width: 80px"></th>
            <th style="width: 180px">Provider</th>
            <th style="width: 120px"></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <img src="/images-ee/one-click/digitalocean.svg" alt="Logo" height="30" class="force-light sdk-logo margin-start margin-end" />
                <img src="/images-ee/one-click/dark/digitalocean.svg" alt="Logo" height="30" class="force-dark sdk-logo margin-start margin-end" />
            </td>
            <td>
                DigitalOcean
            </td>
            <td>
                <a href="https://marketplace.digitalocean.com/apps/appwrite" target="_blank" rel="noopener">Click to Install</a>
            </td>
        </tr>        
        <tr>
            <td>
                <img src="/images-ee/one-click/gitpod.svg" alt="Logo" height="30" class="force-light sdk-logo margin-start margin-end" />
                <img src="/images-ee/one-click/dark/gitpod.svg" alt="Logo" height="30" class="force-dark sdk-logo margin-start margin-end" />
            </td>
            <td>
                Gitpod
            </td>
            <td>
                <a href="https://gitpod.io/#https://github.com/appwrite/integration-for-gitpod" target="_blank" rel="noopener">Click to Install</a>
            </td>
        </tr>
        <tr>
            <td>
                <img src="/images-ee/one-click/akamai.svg" alt="Logo" height="30" class="force-light sdk-logo margin-start margin-end" />
                <img src="/images-ee/one-click/dark/akamai.svg" alt="Logo" height="30" class="force-dark sdk-logo margin-start margin-end" />
            </td>
            <td>
                Akamai Compute
            </td>
            <td>
                <a href="https://www.linode.com/marketplace/apps/appwrite/appwrite/" target="_blank" rel="noopener">Click to Install</a>
            </td>
        </tr>
    </tbody>
</table>

<h2><a href="#next-steps" id="next-steps">Next Steps</a></h2>
<p>Self-hosting Appwrite gives you more configurable options. You can customize Appwrite with your choice of S3 compatible storage adapters, email and SMS providers, functions runtimes, and more.</p>

<p><a href="/docs/configuration"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Learn about configuring Appwrite</a></p>

<p>Self-hosted Appwrite instances can be made production ready. To run Appwrite successfully in a production environment, you should follow a few basic concepts and best practices.</p>
<p><a href="/docs/production"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Learn about Appwrite in production</a></p>

<h2><a href="#manual" id="manual">Manual (using docker-compose.yml)</a></h2>

<p>For advanced Docker users, the manual installation might seem more familiar. To set up Appwrite manually, download the Appwrite base <a href="/install/compose" target="_blank">docker-compose.yml</a> and <a href="/install/env" target="_blank">.env</a> files, then move them inside a directory named <code>appwrite</code>. After the download completes, update the different environment variables as you wish in the <code>.env</code> file and start the Appwrite stack using the following Docker command:</p>

<div class="ide margin-bottom" data-lang="bash" data-lang-label="Bash">
    <pre class="line-numbers"><code class="prism language-bash" data-prism>docker compose up -d --remove-orphans</code></pre>
</div>

<p>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.</p>

<h2><a href="#stop" id="stop">Stop</a></h2>

<p>You can stop your Appwrite containers by using the following command executed from the same directory as your <code>docker-compose.yml</code> file.</p>

<div class="ide margin-bottom" data-lang="bash" data-lang-label="Bash">
    <pre class="line-numbers"><code class="prism language-bash" data-prism>docker compose stop</code></pre>
</div>

<h2><a href="#uninstall" id="uninstall">Uninstall</a></h2>

<p>To stop and remove your Appwrite containers, you can use the following command executed from the same directory as your <code>docker-compose.yml</code> file.</p>

<div class="ide margin-bottom" data-lang="bash" data-lang-label="Bash">
    <pre class="line-numbers"><code class="prism language-bash" data-prism>docker compose down -v</code></pre>
</div>