Skip to main content
Arcjet is a security layer that allows developers to protect their apps with just a few lines of code. Implement rate limiting, bot protection, email validation, and defense against common attacks. Arcjet is installed as a dependency in your application and doesn’t require an agent or any additional infrastructure. The SDK is currently available for JS & Python applications, with support for other languages coming soon.

Quick start (Next.js)

A quick way to see what Arcjet can do is to deploy the example app. It’s also available at example.arcjet.com. Clone the GitHub repository:
Set up a new Fly app:
This command will generate a Dockerfile and a fly.toml for you. Create an Arcjet account and link it to your Fly app:
This will:
  • Create an Arcjet account linked to your Fly account.
  • Create an Arcjet team mapped to your Fly organization.
  • Create an Arcjet site for your Fly application.
  • Set ARCJET_KEY as a secret on your Fly application.
Deploy to Fly:
Open your app in your browser and try the features. Review the request details in your Arcjet dashboard:

Run locally

Arcjet protections run locally as well as when deployed to Fly. This makes it easy to test and debug security rules. Assuming you have already cloned the example and linked Arcjet to your Fly app (see above): Log into your Arcjet dashboard to get the ARCJET_KEY for your app.
Install dependencies:
Rename .env.local.example to .env.local and add your Arcjet key. If you want to test the rate limiting authentication, you will also need to add an Auth.js secret and create a GitHub OAuth app. Start the dev server
Open http://localhost:3000 in your browser.

Protecting your application with Arcjet

Once you have set your ARCJET_KEY secret, you can start using Arcjet to protect your application. Arcjet supports many different web frameworks e.g. Bun, Next.js, Node.js, SvelteKit.

Node.js example

You can also find this example on GitHub.
  1. Install the Arcjet SDK:
  2. Add a rate limit to a route in index.ts:
  3. Run your application:
Load the application and refresh the page a few times to see the rate limit in action.

Python + FastAPI example

You can also find this example on GitHub.
  1. Install the Arcjet SDK:
  2. Create a new file at main.py with the contents:
  3. Run your application with your Arcjet key in the environment:

Pricing

See the Arcjet pricing page.

Support

Email: support@arcjet.com Discord: Join. See the Arcjet docs for the full support policy.