StackAuth
auth0 and Clerk selfhostable alternative. robust, secured, and customizable
dashboard
stack-auth/stack-auth
Just deployed
Postgres
railwayapp-templates/postgres-ssl:16
Just deployed
/var/lib/postgresql/data
stackauth/server
stackauth/server
Just deployed
📦 Deployment Notes
- To create first user & access dashboard for the first time: After deployment finished, go directly to database -> ApiKeySet -> then manually edit the publishableClientKey and secretServerKey to be the same as in environment variable config.
- To gain admin access and config: Create a user. Go directly to database -> ProjectUser -> manually update serverMetaData field to contain project "internal" with following json: { "managedProjectIds": [ "internal" ] }
📘 Docs | ☁️ Hosted Version | ✨ Demo | 🎮 Discord
Stack Auth: Open-source Clerk/Auth0 alternative
Stack Auth is a managed user authentication solution. It is developer-friendly and fully open-source (licensed under MIT and AGPL).
Stack Auth gets you started in just five minutes, after which you'll be ready to use all of its features as you grow your project. Our managed service is completely optional and you can export your user data and self-host, for free, at any time.
We support Next.js, React, and JavaScript frontends, along with any backend that can use our REST API. Check out our setup guide to get started.

Table of contents
- How is this different from X?
- ✨ Features
- 📦 Installation & Setup
- 🌱 Some community projects built with Stack Auth
- 🏗 Development & Contribution
- ❤ Contributors
How is this different from X?
Ask yourself about X
:
- Is
X
open-source? - Is
X
developer-friendly, well-documented, and lets you get started in minutes? - Besides authentication, does
X
also do authorization and user management (see feature list below)?
If you answered "no" to any of these questions, then that's how Stack Auth is different from X
.
✨ Features
To get notified first when we add new features, please subscribe to our newsletter.
Authentication components that support OAuth, password credentials, and magic links, with shared development keys to make setup faster. All components support dark/light modes. | ![]() |
Idiomatic Next.js APIsWe build on server components, React hooks, and route handlers. | ![]() |
User dashboardDashboard to filter, analyze, and edit users. Replaces the first internal tool you would have to build. | ![]() |
Account settingsLets users update their profile, verify their e-mail, or change their password. No setup required. | ![]() |
Multi-tenancy & teamsManage B2B customers with an organization structure that makes sense and scales to millions. | ![]() |
Role-based access controlDefine an arbitrary permission graph and assign it to users. Organizations can create org-specific roles. | ![]() |
OAuth ConnectionsBeyond login, Stack Auth can also manage access tokens for third-party APIs, such as Outlook and Google Calendar. It handles refreshing tokens and controlling scope, making access tokens accessible via a single function call. | ![]() |
PasskeysSupport for passwordless authentication using passkeys, allowing users to sign in securely with biometrics or security keys across all their devices. | ![]() |
ImpersonationImpersonate users for debugging and support, logging into their account as if you were them. | ![]() |
WebhooksGet notified when users use your product, built on Svix. | ![]() |
Automatic emailsSend customizable emails on triggers such as sign-up, password reset, and email verification, editable with a WYSIWYG editor. | ![]() |
User session & JWT handlingStack Auth manages refresh and access tokens, JWTs, and cookies, resulting in the best performance at no implementation cost. | ![]() |
M2M authenticationUse short-lived access tokens to authenticate your machines to other machines. | ![]() |
Template Content
dashboard
stack-auth/stack-authstackauth/server
stackauth/server