Docs
Skip to content

Firewall

Firewall_

Protect project APIs, Functions, and Sites with Appwrite Firewall. Create rules to deny, challenge, rate limit, redirect, or bypass matching traffic from the Console.

3 min read

Raw

Appwrite Firewall is project-level traffic control. You define rules that match requests by attributes such as IP address, hostname, path, HTTP method, headers, query parameters, user agent, or location, then apply an action before traffic reaches your API, Functions, or Sites.

You manage rules under Firewall in your project. A rule applies to the project API, to one function, or to one site. Before you save, the Console previews how many recent requests would match. After, the traffic overview shows request volume and each Firewall outcome.

Firewall page with traffic overview and rules
Firewall page with traffic overview and rules

How it works

Each Firewall rule has four parts:

  1. Resource type: Which traffic the rule considers. Choose the project API, one Function, or one Site. See Resource scopes.
  2. Conditions: Filters on request attributes (for example IP equals a value, path starts with /v1/account, country equals US). All conditions on a rule must match (AND). A rule with no conditions matches every request in its scope.
  3. Action: What happens when the conditions match. One of Deny, Bypass, Challenge, Rate limit, or Redirect.
  4. Priority: Lower numbers are evaluated first. The first matching enabled rule decides the outcome for that request and stops evaluation.

Console access

Firewall never blocks the Appwrite Console, so you cannot lock yourself out. Firewall checks everything else, including your own SDK calls and requests made with an API key.

Rules on a Site or a Function run at the network edge, which cannot tell your browser from anyone else's. A site challenge, or Attack mode, challenges you too.

Get started

Create your first API-scoped deny rule and confirm outcomes in traffic overview.

Concepts

Core ideas behind Firewall rules, matching, and evaluation.

Guides

Step-by-step guides for common Firewall policies in the Console.

Was this page helpful?

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