---
title: "Get started with Arcjet"
titleByFramework:
  default: "Get started with Arcjet"
  bun: "Get started with Bun"
  bun-hono: "Get started with Bun + Hono"
  deno: "Get started with Deno"
  nest-js: "Get started with NestJS"
  next-js: "Get started with Next.js"
  node-js: "Get started with Node.js"
  node-js-express: "Get started with Node.js + Express"
  node-js-hono: "Get started with Node.js + Hono"
  remix: "Get started with Remix"
  sveltekit: "Get started with SvelteKit"
description: "Getting started with Arcjet. Quick start guide to protect your app from attacks, apply a rate limit, and prevent bots from accessing your NestJS, Next.js, Node.js, Bun, or SvelteKit app."
prev: false
next: false
frameworks:
  - bun
  - bun-hono
  - deno
  - nest-js
  - next-js
  - node-js
  - node-js-express
  - node-js-hono
  - remix
  - sveltekit
ajToc:
  - text: 0. Get Started
    anchor: "0-get-started"
  - text: 1. Install Arcjet
    anchor: "1-install-arcjet"
  - text: 2. Set your key
    anchor: "2-set-your-key"
  - text: 3. Add rules
    anchor: "3-add-rules"
  - text: 4. Start app
    anchor: "4-start-app"
  - text: "FAQs"
    anchor: "faqs"
  - text: "What next?"
    anchor: "what-next"
  - text: "Get help"
    anchor: "get-help"
---

import SlotByFramework from "@/components/SlotByFramework";
import FrameworkLinks from "@/components/FrameworkLinks";
import { LinkButton, LinkCard, CardGrid } from "@astrojs/starlight/components";
import FAQs from "/src/components/FAQs.astro";
import WhatIsArcjet from "/src/components/WhatIsArcjet.astro";
import SdkReferenceLinkByFramework from "/src/components/SdkReferenceLinkByFramework.astro";

import BunStep0 from "@/snippets/get-started/bun/Step0.mdx";
import BunStep1 from "@/snippets/get-started/bun/Step1.mdx";
import BunRequirements from "@/snippets/get-started/bun/Requirements.mdx";
import BunStep2 from "@/snippets/get-started/bun/Step2.mdx";
import BunStep3 from "@/snippets/get-started/bun/Step3.mdx";
import BunStep4 from "@/snippets/get-started/bun/Step4.mdx";

import BunHonoStep0 from "@/snippets/get-started/bun-hono/Step0.mdx";
import BunHonoStep1 from "@/snippets/get-started/bun-hono/Step1.mdx";
import BunHonoRequirements from "@/snippets/get-started/bun-hono/Requirements.mdx";
import BunHonoStep2 from "@/snippets/get-started/bun-hono/Step2.mdx";
import BunHonoStep3 from "@/snippets/get-started/bun-hono/Step3.mdx";
import BunHonoStep4 from "@/snippets/get-started/bun-hono/Step4.mdx";

import DenoStep0 from "@/snippets/get-started/deno/Step0.mdx";
import DenoStep1 from "@/snippets/get-started/deno/Step1.mdx";
import DenoRequirements from "@/snippets/get-started/deno/Requirements.mdx";
import DenoStep2 from "@/snippets/get-started/deno/Step2.mdx";
import DenoStep3 from "@/snippets/get-started/deno/Step3.mdx";
import DenoStep4 from "@/snippets/get-started/deno/Step4.mdx";

import NestJsStep0 from "@/snippets/get-started/nest-js/Step0.mdx";
import NestJsStep1 from "@/snippets/get-started/nest-js/Step1.mdx";
import NestJsRequirements from "@/snippets/get-started/nest-js/Requirements.mdx";
import NestJsStep2 from "@/snippets/get-started/nest-js/Step2.mdx";
import NestJsStep3 from "@/snippets/get-started/nest-js/Step3.mdx";
import NestJsStep4 from "@/snippets/get-started/nest-js/Step4.mdx";

import NextJsStep0 from "@/snippets/get-started/next-js/Step0.mdx";
import NextJsStep1 from "@/snippets/get-started/next-js/Step1.mdx";
import NextJsRequirements from "@/snippets/get-started/next-js/Requirements.mdx";
import NextJsStep2 from "@/snippets/get-started/next-js/Step2.mdx";
import NextJsStep3 from "@/snippets/get-started/next-js/Step3.mdx";
import NextJsStep4 from "@/snippets/get-started/next-js/Step4.mdx";

import NodeJsStep0 from "@/snippets/get-started/node-js/Step0.mdx";
import NodeJsStep1 from "@/snippets/get-started/node-js/Step1.mdx";
import NodeJsRequirements from "@/snippets/get-started/node-js/Requirements.mdx";
import NodeJsStep2 from "@/snippets/get-started/node-js/Step2.mdx";
import NodeJsStep3 from "@/snippets/get-started/node-js/Step3.mdx";
import NodeJsStep4 from "@/snippets/get-started/node-js/Step4.mdx";

import NodeJsExpressStep0 from "@/snippets/get-started/node-js-express/Step0.mdx";
import NodeJsExpressStep1 from "@/snippets/get-started/node-js-express/Step1.mdx";
import NodeJsExpressRequirements from "@/snippets/get-started/node-js-express/Requirements.mdx";
import NodeJsExpressStep2 from "@/snippets/get-started/node-js-express/Step2.mdx";
import NodeJsExpressStep3 from "@/snippets/get-started/node-js-express/Step3.mdx";
import NodeJsExpressStep4 from "@/snippets/get-started/node-js-express/Step4.mdx";

import NodeJsHonoStep0 from "@/snippets/get-started/node-js-hono/Step0.mdx";
import NodeJsHonoStep1 from "@/snippets/get-started/node-js-hono/Step1.mdx";
import NodeJsHonoRequirements from "@/snippets/get-started/node-js-hono/Requirements.mdx";
import NodeJsHonoStep2 from "@/snippets/get-started/node-js-hono/Step2.mdx";
import NodeJsHonoStep3 from "@/snippets/get-started/node-js-hono/Step3.mdx";
import NodeJsHonoStep4 from "@/snippets/get-started/node-js-hono/Step4.mdx";

import RemixStep0 from "@/snippets/get-started/remix/Step0.mdx";
import RemixStep1 from "@/snippets/get-started/remix/Step1.mdx";
import RemixRequirements from "@/snippets/get-started/remix/Requirements.mdx";
import RemixStep2 from "@/snippets/get-started/remix/Step2.mdx";
import RemixStep3 from "@/snippets/get-started/remix/Step3.mdx";
import RemixStep4 from "@/snippets/get-started/remix/Step4.mdx";

import SvelteKitStep0 from "@/snippets/get-started/sveltekit/Step0.mdx";
import SvelteKitStep1 from "@/snippets/get-started/sveltekit/Step1.mdx";
import SvelteKitRequirements from "@/snippets/get-started/sveltekit/Requirements.mdx";
import SvelteKitStep2 from "@/snippets/get-started/sveltekit/Step2.mdx";
import SvelteKitStep3 from "@/snippets/get-started/sveltekit/Step3.mdx";
import SvelteKitStep4 from "@/snippets/get-started/sveltekit/Step4.mdx";

[Arcjet](https://arcjet.com/) helps developers protect their apps in just a few
lines of code. Bot detection. Rate limiting. Email validation. Attack
protection. Data redaction. A developer-first approach to security.

This guide will show you how to set up a simple API server protected by Arcjet.

<FrameworkLinks title="Choose a framework" client:load />

## 0. Get Started

<SlotByFramework client:load>
  <BunStep0 slot="bun" />
  <BunHonoStep0 slot="bun-hono" />
  <DenoStep0 slot="deno" />
  <NestJsStep0 slot="nest-js" />
  <NextJsStep0 slot="next-js" />
  <NodeJsStep0 slot="node-js" />
  <NodeJsExpressStep0 slot="node-js-express" />
  <NodeJsHonoStep0 slot="node-js-hono" />
  <RemixStep0 slot="remix" />
  <SvelteKitStep0 slot="sveltekit" />
</SlotByFramework>

## 1. Install Arcjet

In your project root, run the following command:

<SlotByFramework client:load>
  <BunStep1 slot="bun" />
  <BunHonoStep1 slot="bun-hono" />
  <DenoStep1 slot="deno" />
  <NestJsStep1 slot="nest-js" />
  <NextJsStep1 slot="next-js" />
  <NodeJsStep1 slot="node-js" />
  <NodeJsExpressStep1 slot="node-js-express" />
  <NodeJsHonoStep1 slot="node-js-hono" />
  <RemixStep1 slot="remix" />
  <SvelteKitStep1 slot="sveltekit" />
</SlotByFramework>

### Requirements

<SlotByFramework client:load>
  <BunRequirements slot="bun" />
  <BunHonoRequirements slot="bun-hono" />
  <DenoRequirements slot="deno" />
  <NestJsRequirements slot="nest-js" />
  <NextJsRequirements slot="next-js" />
  <NodeJsRequirements slot="node-js" />
  <NodeJsExpressRequirements slot="node-js-express" />
  <NodeJsHonoRequirements slot="node-js-hono" />
  <RemixRequirements slot="remix" />
  <SvelteKitRequirements slot="sveltekit" />
</SlotByFramework>

## 2. Set your key

[Create a free Arcjet account](https://app.arcjet.com) then follow the
instructions to add a site and get a key.

<SlotByFramework client:load>
  <BunStep2 slot="bun" />
  <BunHonoStep2 slot="bun-hono" />
  <DenoStep2 slot="deno" />
  <NestJsStep2 slot="nest-js" />
  <NextJsStep2 slot="next-js" />
  <NodeJsStep2 slot="node-js" />
  <NodeJsExpressStep2 slot="node-js-express" />
  <NodeJsHonoStep2 slot="node-js-hono" />
  <RemixStep2 slot="remix" />
  <SvelteKitStep2 slot="sveltekit" />
</SlotByFramework>

## 3. Add rules

This configures Arcjet rules to protect your app from attacks, apply a rate
limit, and prevent bots from accessing your app.

<SlotByFramework client:load>
  <BunStep3 slot="bun" />
  <BunHonoStep3 slot="bun-hono" />
  <DenoStep3 slot="deno" />
  <NestJsStep3 slot="nest-js" />
  <NextJsStep3 slot="next-js" />
  <NodeJsStep3 slot="node-js" />
  <NodeJsExpressStep3 slot="node-js-express" />
  <NodeJsHonoStep3 slot="node-js-hono" />
  <RemixStep3 slot="remix" />
  <SvelteKitStep3 slot="sveltekit" />
</SlotByFramework>

<SlotByFramework client:load>
  <BunStep4 slot="bun" />
  <BunHonoStep4 slot="bun-hono" />
  <DenoStep4 slot="deno" />
  <NestJsStep4 slot="nest-js" />
  <NextJsStep4 slot="next-js" />
  <NodeJsStep4 slot="node-js" />
  <NodeJsExpressStep4 slot="node-js-express" />
  <NodeJsHonoStep4 slot="node-js-hono" />
  <RemixStep4 slot="remix" />
  <SvelteKitStep4 slot="sveltekit" />
</SlotByFramework>

The requests will also show in the [Arcjet dashboard](https://app.arcjet.com).

## FAQs

<FAQs />

## What next?

<SlotByFramework client:load>
  <Fragment slot="next-js">
    <LinkCard
      title="Site-wide bot protection"
      href="/bot-protection/quick-start#3-add-bot-protection"
      description="Use middleware to protect your entire app."
    />
  </Fragment>
</SlotByFramework>
<CardGrid>
  <LinkCard
    title="Customize allowed bots"
    href="/bot-protection/identifying-bots"
    description="Identify bots and configure allow/deny lists."
  />
  <LinkCard
    title="Testing"
    href="/testing"
    description="Write tests for your rules."
  />
</CardGrid>

### Explore

Arcjet can be used with specific rules on individual routes or as general
protection on your entire application. You can defend from clients sending
you sensitive information, minimize fraudulent registrations with
the signup form protection and more.

<CardGrid>
  <LinkCard
    title="Example apps"
    href="https://github.com/arcjet/arcjet-js/tree/main/examples"
    description="Check out the examples."
  />
  <LinkCard
    title="Learn how Arcjet works"
    href="/architecture"
    description="Arcjet's architecture."
  />
  <SdkReferenceLinkByFramework />
</CardGrid>

## Get help

Need help with anything? [Email us](mailto:support@arcjet.com) or [join our
Discord](https://arcjet.com/discord) to get support from our engineering team.