---
layout: post
title: "How to deploy your first Appwrite site and function"
description: Put your web app live with Appwrite Sites straight from GitHub, then create, deploy and run your first Appwrite Function.
date: 2026-11-03
cover: /images/blog/deploy-your-first-appwrite-function-and-site/cover.avif
timeToRead: 4
author: atharva
category: tutorials
featured: false
faqs:
  - question: "Do I need a GitHub repository to deploy an Appwrite site?"
    answer: "No. Pick a starter under **Clone template** on the **Create site** screen and Appwrite deploys it for you. You can also deploy with the [Appwrite CLI](/docs/products/sites/deploy-from-cli) or [upload your files](/docs/products/sites/deploy-manually)."
  - question: "How do I add environment variables to my site or function?"
    answer: "Open its **Variables** tab, add your keys, and redeploy. New values reach the next deployment. See [site environment variables](/docs/products/sites/environment-variables) and [function environment variables](/docs/products/functions/environment-variables)."
  - question: "Can I use my own domain for my Appwrite site?"
    answer: "Yes. Open your site's **Domains** tab and add your domain. A subdomain like `www.example.com` needs one CNAME record at your DNS provider. [Custom domains with Sites](/blog/post/custom-domains-with-sites) walks through it."
  - question: "Which languages can I write Appwrite Functions in?"
    answer: "Node.js, Python, PHP, Go, Dart, Ruby, Rust, Deno, Bun and more. Each has a starter template on the **Create function** screen. See [Functions runtimes](/docs/products/functions/runtimes) for every version."
---

Appwrite Sites hosts the web app your users open, and Appwrite Functions run your backend code, such as API endpoints, webhooks and scheduled jobs. Both deploy from GitHub, so every push to your production branch builds and goes live.

By the end of this guide, your web app runs on its own Appwrite domain, and your first function answers requests from the Console and from your app.

**Building with an AI coding agent?**

Your agent can create and deploy your site and function for you with the Appwrite plugin. [Connect your AI coding agent to Appwrite](/blog/post/connect-ai-coding-assistant-to-appwrite), then ask it to deploy your app.

You need an Appwrite project and a web app in a GitHub repository. If you don't have a project yet, [create one in the Console](/sign-in).

# Step 1: Deploy your site from GitHub

![Create site screen with Connect GitHub, Connect Entire, Connect GitLab and Connect Bitbucket under Import repository, and site templates under Clone template](/images/blog/deploy-your-first-appwrite-function-and-site/site-create.avif)

1. In the Console, open **Sites** and click **Create site**.
2. Under **Import repository**, click **Connect GitHub** and choose the repositories Appwrite can read.
3. Pick your web app's repository and click **Connect**.
4. Appwrite detects your framework and fills in the build settings. If your app needs environment variables, add them under **Environment variables**.
5. Click **Deploy**.

**No web app yet?**

Pick a starter under **Clone template** instead, such as **React starter** or **TanStack Start starter**. It comes with your project's endpoint and ID already filled in.

# Step 2: Open your site

![Site Deployments tab showing the active deployment with its preview, source, domain and Visit button](/images/blog/deploy-your-first-appwrite-function-and-site/site-overview.avif)

Appwrite builds your app and shows a preview when it's ready. Click **Visit site** to open it on its Appwrite domain. That's the link you share with your users.

Click **Go to dashboard** to reach your site's **Deployments** tab, with the active deployment and its domain. From now on, every push to your production branch builds a new deployment and puts it live.

# Step 3: Create a function

![Create function screen with Connect Git repository on the left and language starters under Clone template on the right](/images/blog/deploy-your-first-appwrite-function-and-site/function-create.avif)

The quickest start is a starter template, which gives you working code in a repository of your own.

1. Open **Functions** and click **Create function**.
2. Under **Clone template**, click your language, such as **Node**. This opens the **Starter function**.
3. Give your function a name.
4. Choose **Connect your repository**, then **Create new repository**.
5. Click **Create and deploy**.

Appwrite creates the repository, commits the starter code and deploys it. Like your site, the function deploys again on every push to its production branch.

# Step 4: Run your function

![Executions tab of a function listing completed runs with their status code, method, path and duration](/images/blog/deploy-your-first-appwrite-function-and-site/function-executions.avif)

1. Open your function's **Executions** tab and click **Create execution**.
2. Set **Path** to `/ping`.
3. Click **Execute**.

The response body shows `Pong`, and the run appears in the list.

Your app can call the same function at its domain, listed on the **Domains** tab. The starter function is public, so you can try it from your terminal:

```bash
curl https://<FUNCTION_DOMAIN>/ping
```

To make it your own, edit `src/main.js` in your new repository and push. The next run returns your change.

# Keep building

Your web app and your backend are both live. Click any run on the **Executions** tab to see what your function logged, and when you're ready for more, these guides pick up from here:

- [Add a custom domain to your site](/blog/post/custom-domains-with-sites)
- [Roll back to an earlier deployment](/docs/products/sites/instant-rollbacks)
- [Run your function on a schedule](/docs/products/functions/execute#schedule)
- [Send your first message with Appwrite Messaging](/blog/post/send-your-first-message-with-appwrite-messaging)
- [Upload your first file to Appwrite Storage](/blog/post/upload-your-first-file-to-appwrite-storage)
