Next.js security checklist
A seven-item Next.js security checklist for App Router on Next.js 14 and 15: dependencies, validation, secrets, server-only code, headers, centralized checks, and editor or CI scanning.
Read guideWeb Security
Checklists and implementation guides for securing Next.js, Remix, NestJS, login pages, containers, and self-hosted deployments.
Application and framework security is the set of controls that live in the app you ship: headers, auth, logging, secret handling, container images, and the request handlers that accept untrusted input. A framework default is not a security review. Next.js, Remix, NestJS, and a Docker image each expose a different surface, but the jobs are the same: authenticate the caller, authorize the object, validate input, limit abuse, keep secrets out of the client bundle and the logs, and run the process as a non-root user on a current base image. These guides are checklists and worked examples for those jobs, not a substitute for object-level authorization in your own code.
Start with the web app security checklist as the hub. Use the Next.js or Remix checklist for the framework you run, then the login-page, Docker, and logging guides for the surfaces you actually expose.
A seven-item Next.js security checklist for App Router on Next.js 14 and 15: dependencies, validation, secrets, server-only code, headers, centralized checks, and editor or CI scanning.
Read guideSecurity checklist for Remix v2 and React Router 7: module side effects, signed cookies, CSRF, headers, validation, uploads, and v1 @arcjet/remix or @arcjet/react-router screening.
Read guideA production abuse checklist for Next.js, Remix, and Nuxt: bots, identity-aware rate limits, business-logic misuse, early rejection, monitoring, and in-handler controls.
Read guideSecure login pages against brute force, credential stuffing, SQL injection, and session attacks with fixedWindow, detectBot allow lists, and HttpOnly cookies.
Read guideSelf-host Next.js in Docker on Node 22 LTS with standalone output, a non-root user, Distroless or slim runners, and secrets from a secrets manager.
Read guideSecure NestJS 10 and 11 with @arcjet/nest v1: ESM setup, ArcjetModule, ArcjetGuard, WithArcjetRules, and detectBot allow lists.
Read guideAdd structured JSON logging to Next.js 15 with Pino via the Instrumentation hook or next-logger v5. Use serverExternalPackages and log Arcjet decisions by ID.
Read guideProtect a self-hosted Coolify host with a Tailscale private network and UFW default-deny, then expose one app on purpose with Auth.js and in-app controls.
Read guideDeploy Arcjet on Fly.io with v1 config, Fly-Client-IP detection, rate limiting, and bot protection. Set ARCJET_KEY as a Fly secret and verify denies.
Read guideSecure Node.js containers with a non-root USER, Node 22 on current Debian, Distroless or Wolfi bases, a read-only root, secret scanning, and signed CI deploys.
Read guideFix OrbStack HTTPS in Node.js containers: slim images drop the OpenSSL CA store, so set NODE_OPTIONS=--use-openssl-ca and SSL_CERT_FILE to orbstack-root.crt.
Read guideGet the real client IP on Firebase from x-fah-client-ip after FIREBASE_CONFIG platform detection. Do not maintain Google's published proxy list.
Read guideNEXT_PUBLIC_ env vars are inlined into the browser bundle. Scan .vercel/output, .next, and Docker images with TruffleHog, Gitleaks, Trunk, and osv-scanner.
Read guideTest App Router Route Handlers with next-test-api-route-handler and Vitest. Mock Auth.js v5 auth(), cover broken access control, and unit-test Arcjet-protected handlers.
Read guideTest live Arcjet rules with Newman or k6 against the same binary you deploy. v1 config is key plus rules, with a 51-iteration rate-limit collection.
Read guide