Nextbase Project Environment Variables
Supabase Configuration
The Nextbase project relies on Supabase for its backend services. Configure the following environment variables to enable integration with Supabase.
SUPABASE_PROJECT_REF
- Type: String
- Required: Yes
- Default:
SUPABASE_PROJECT_REF
A unique reference identifier for your Supabase project.
NEXT_PUBLIC_SUPABASE_URL
- Type: String
- Required: Yes
- Default:
NEXT_PUBLIC_SUPABASE_URL
The public URL of your Supabase project.
NEXT_PUBLIC_SUPABASE_ANON_KEY
-
Type: String
-
Required: Yes
-
Default:
NEXT_PUBLIC_SUPABASE_ANON_KEY
The public anonymous key for accessing your Supabase project.
SUPABASE_SERVICE_ROLE_KEY
-
Type: String
-
Required: Yes
-
Default:
SUPABASE_SERVICE_ROLE_KEY
The service role key for your Supabase project.
SUPABASE_JWT_SECRET
-
Type: String
-
Required: Yes
-
Default:
SUPABASE_JWT_SECRET
The JWT secret for secure communication with Supabase.
Stripe Configuration Integrate your Nextbase project with Stripe for payment processing by configuring the following environment variables.
STRIPE_SECRET_KEY
-
Type: String
-
Required: Yes
-
Default:
STRIPE_SECRET_KEY
The secret key for authenticating requests to the Stripe API.
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
-
Type: String
-
Required: Yes
-
Default:
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
The public key used for client-side interactions with Stripe.
STRIPE_WEBHOOK_SECRET
-
Type: String
-
Required: Yes
-
Default:
STRIPE_WEBHOOK_SECRET
The webhook secret for handling events from Stripe.
Host Configuration Configure the host-related environment variables for your Nextbase project.
NEXT_PUBLIC_SITE_URL
-
Type: String
-
Required: Yes
-
Default:
NEXT_PUBLIC_SITE_URL
The public URL of your Nextbase site.
Email Configuration Configure email-related environment variables for your Nextbase project.
ADMIN_EMAIL
-
Type: String
-
Required: Yes
-
Default:
ADMIN_EMAIL
The email address of the administrator.
RESEND_API_KEY
-
Type: String
-
Required: Yes
-
Default:
RESEND_API_KEY
The RESEND_API_KEY is an API key specifically designated for the functionality related to email resending within the Nextbase project. Email resending is a feature commonly implemented in web applications to allow users to request the re-sending of certain emails, such as account activation emails, password reset emails, or verification emails.
Analytics Configuration Enable analytics for your Nextbase project by configuring the following environment variables.
NEXT_PUBLIC_POSTHOG_API_KEY
-
Type: String
-
Required: No
-
Default:
NEXT_PUBLIC_POSTHOG_API_KEY
PostHog is an open-source product analytics tool. It helps you understand how users interact with your application by providing event tracking, session recording, feature flags, and more.
NEXT_PUBLIC_POSTHOG_APP_ID
-
Type: String
-
Required: No
-
Default:
NEXT_PUBLIC_POSTHOG_APP_ID
The app ID for PostHog analytics integration.
NEXT_PUBLIC_POSTHOG_HOST
-
Type: String
-
Required: No
-
Default:
NEXT_PUBLIC_POSTHOG_HOST
The host URL for PostHog analytics integration.
NEXT_PUBLIC_GA_ID
-
Type: String
-
Required: No
-
Default:
NEXT_PUBLIC_GA_ID
The Google Analytics (GA) ID for tracking.
Unkey is an open source API authentication and authorization platform for scaling user facing APIs. Create, verify, and manage low latency API keys in seconds
UNKEY_ROOT_KEY
-
Type: String
-
Required: No
-
Default:
UNKEY_ROOT_KEY
The root key for Unkey integration.
UNKEY_API_ID
-
Type: String
-
Required: No
-
Default:
UNKEY_API_ID
The API ID for Unkey integration.
Note on Security Keep your .env file secure and do not expose sensitive information. Do not include the .env file in version control to prevent accidental exposure of sensitive data.
Example Usage Create a .env file at the root of your project and add the necessary variables: