Installation & Setup

Getting started with Stack in 5 minutes

Welcome to the Next.js SDK setup guide. If you’re looking for guides for other frameworks, check out the React SDK Setup, or the JavaScript SDK Setup.

Setup

Before getting started, make sure you have a Next.js project using the app router, as Stack Auth does not support the pages router.

We recommend using our setup wizard for a seamless installation experience. The wizard automatically detects your project structure and walks you through the setup process. If you encounter any issues with the wizard, you can follow our manual installation steps instead.

Post-setup

That’s it! Stack is now configured in your Next.js project. If you start your Next.js app with npm run dev and navigate to http://localhost:3000/handler/signup, you will see the sign-up page.

SignIn

After signing up/in, you will be redirected back to the home page. We will show you how to add user information to it in the next section. You can also check out the http://localhost:3000/handler/account-settings page which looks like this:

Stack account settings page

Next steps

Next up, we will show you how to retrieve and update user information, and how to protect a page from unauthorized access.