Docs
Skip to content

Sites

Deploy from CLI_

Learn to deploy Appwrite Sites from the Appwrite CLI.

1 min read

Raw

Appwrite Sites allows you to host and deploy websites directly within the Appwrite platform. Each site can have many deployments, which can be thought of as versions of the web application.

While we recommend you create deployments through automatic Git deployments, you can also create deployments via the Appwrite CLI.

CLI

You can create sites using the CLI without needing to access the Console.

To deploy your site with the Appwrite CLI, use the appwrite init sites command to create a starter site and paste your code into the generated file and folder.

Bash
appwrite init sites

To deploy the generated code, add any dependencies and push the site using the following command:

Bash
appwrite push sites

Configure CLI deployments

If you need to target a different project, API endpoint, change the path or entry point of your site, or update any of the other configuration options, you can do so by editing the appwrite.config.json file.

For larger projects, you can split site definitions into a separate JSON file with multi-file CLI configuration.

Debugging

  • If you updated your site's configuration but the deployment is not working as expected, you may need to first redeploy your site before the changes take effect.

Was this page helpful?

Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.