Serverless Functions for every backend job_
Run API endpoints, webhooks, cron jobs, and event handlers in secure isolated runtimes that scale with demand.
- Language runtimes
- 13+
- Local-first development
- CLI
- Schedule triggers
- Cron
- Platform event hooks
- Events
- Repository deploys
- Git
13+ runtimes. Develop locally, deploy when ready.
Deploy from Git with auto-build on push
Connect a repository and deploy on every push, the same workflow as Sites. Set a production branch that auto-activates successful builds, filter by branch or path with glob patterns, and review preview deployments from pull requests.
Git repository
Auto-build on push with branch and path filters.
Repository
appwrite/backend
Production branch
main
Root directory
functions/stripe-webhook
Build triggers
feat: add webhook handler
main · 2m ago
Fast builds with built-in dependency cache
Every deployment runs through Appwrite's build pipeline with logs you can inspect in the Console. Package manager stores for npm, pnpm, yarn, and bun are cached automatically between builds, so repeat installs skip duplicate work. Tune build and runtime CPU and memory separately when compilation needs more headroom than steady execution.
Build logs
Duration: 24sDeployments
| Deployment ID | Status | Duration | Created |
|---|---|---|---|
| 67abc12f9e2d | Active | 24s | 2m ago |
| 89def45a1c8b | Ready | 1m 12s | Yesterday |
HTTP endpoints via domains
Every function gets a generated URL and optional custom domain for sync HTTP APIs and webhooks. Pass user sessions with the x-appwrite-user-jwt header so your function respects Auth permissions inside Server SDKs.
Function domain
Sync HTTP for APIs and webhooks.
Generated domain
https://65f1a2b3.appwrite.run
Request
POST /Pass a user JWT so Server SDKs inside the function respect Auth permissions.
Event triggers and scheduled executions
Run functions asynchronously on platform events or on a cron schedule. Sync HTTP calls and SDK executions with async disabled return responses immediately but cap at 30 seconds. Events, cron jobs, and queued executions run in the background with your configured timeout, up to 15 minutes.
Event triggers
When something happens
Event-driven
AsyncReact to platform events as they occur.
Webhooks, sync jobs, and reactive workflows.
A customer completes checkout
Scheduled executions
When the clock hits
Time-based
Pick a preset or write a custom cron expression.
Preset
Every hour
0 * * * *
Reports, cleanups, and recurring background jobs.
Every Monday at 9 AM
Execution modes
Sync
30s limitHTTP domains and SDK calls with async disabled. Response body returned to the caller.
Async
BackgroundPlatform events, cron schedules, and queued executions. Uses your configured timeout.
Executions and observability
Every run creates an execution you can inspect in the Console. Review status, trigger, method, path, and duration in the executions table, then open details for logs, errors, and headers. Request and response bodies are not stored by default. Use log() and error() for the audit trail you need.
| Execution ID | Status | Trigger | Method | Duration | Created |
|---|---|---|---|---|---|
| 68a4e2f91b0c | Completed | Event | POST | 342ms | 2m ago |
| 68a4d8c03f21 | Completed | Schedule | POST | 1.2s | 18m ago |
| 68a4c1aa7e55 | Completed | HTTP | POST | 89ms | 1h ago |
| 68a4b9024d18 | Completed | Event | POST | 410ms | 3h ago |
| 68a4a11fc873 | Completed | HTTP | GET | 12ms | 5h ago |
| 68a48e6a2b90 | Completed | Schedule | POST | 2.4s | Yesterday |
Execution details
68a4e2f91b0c
- Trigger
- Event
- Duration
- 342ms
- Method
- POST
- Path
- /
Event: databases.*.tables.*.rows.*.create Processing order ord_8f2a91c Updated inventory for 3 SKUs Sent receipt via Messaging topic "receipts"
13+ runtimes, your stack
Code in Node, Bun, Python, Go, Rust, Dart, and more. Pin the version you ship with and deploy without relearning the platform.
Runtime
node-22
Your language, your runtime
Pin your version. Deploy isolated. Built for production.
Ready to deploy
And more
Develop and run functions locally
Use the Appwrite CLI and Docker to run functions on localhost with hot reload. Test with production-style headers, impersonate users, and deploy when you are ready.
Local dev
Appwrite CLI
Run on localhost
Same Docker runtime as production, on your machine.
$ appwrite run functions --function-id stripe-webhook
Building function using Docker…
Starting function using Docker…
Visit http://localhost:3000/ to execute your function.
Config
appwrite.config.json
Impersonate user
--user-id <id>
Edit your code and the function restarts automatically. Deploy when you are ready.
Function templates catalog
Start from the Console Templates tab with pre-built integrations for Stripe payments, OpenAI prompts, search sync, Discord bots, and more. Filter by use case or runtime and skip boilerplate when wiring new backend jobs.
Function templates
Pre-built integrations to skip boilerplate.
Payments with Stripe
Receive card payments and store paid orders.
Prompt ChatGPT
Ask questions and let GPT answer from your app.
Sync with Meilisearch
Index database rows for search-as-you-type.
Discord Command Bot
Add slash commands to your Discord servers.
Tools built for developers and agents_
API-first by design. Use the Console, Realtime, SDKs, CLI, Terraform, MCP, and agent skills on the same project.
Developer and agent experience
A typical function handler.
import { Client } from 'node-appwrite';
export default async ({ req, res, log }) => { log(`${req.method} ${req.path}`);
const { orderId } = JSON.parse(req.body); if (!orderId) { return res.json({ error: 'Missing orderId' }, 400); }
const client = new Client() .setEndpoint(process.env.APPWRITE_FUNCTION_API_ENDPOINT) .setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID) .setKey(req.headers['x-appwrite-key']);
log(`Processing ${orderId} (${process.env.APPWRITE_FUNCTION_NAME})`);
return res.json({ status: 'fulfilled', orderId });};Everything is an API
REST, GraphQL, and SDKs for every service. Automate and integrate without console-only workflows.
Console
Manage every service in your project from a unified Console. Optimized keyboard access and a Command Center keep you moving fast.
Realtime
Subscribe to live events and react to changes as they happen.
functions.*.executions.*
functions.*.executions.*.create
MCP
Connect AI agents to your Appwrite project, APIs, and docs through MCP servers.
appwrite-docs
appwrite-apiTerraform
Manage Appwrite infrastructure as code with the official provider.
terraform plan
terraform applyAgent skills
Give AI agents SDK-accurate knowledge of Appwrite services and APIs.
npx skills add appwrite/agent-skillsSDKs
Client and server SDKs for the platforms your team already uses. 15 official SDKs available across client and server runtimes.
CLI
Deploy resources, manage projects, and generate typed SDKs from your terminal.
appwrite login
appwrite deployFAQ_
Appwrite supports 13+ runtimes including Node.js, Bun, Python, Go, Dart, PHP, Ruby, Rust, and Deno. Each runtime has multiple version tags so you can pin the environment that matches production.
Start building with Functions_
Deploy your first function from a template or your own codebase in minutes.
Explore Appwrite_
Modular backend services that share the same project, permissions model, and console.