Environment Variables
Good to know
Since NEXTY.DEV provides multiple repositories, environment variables differ across repositories. Please visit the corresponding environment variable documentation:
Website Basic Configuration
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
NEXT_PUBLIC_SITE_URL | Required | 1.x | Website access URL • For local development, use the startup address, defaults to http://localhost:3000• For production, use your actual domain |
NEXT_PUBLIC_PRICING_PATH | Required | 2.x | Corresponds to the actual pricing plan page, defaults to /#pricing |
NEXT_PUBLIC_LOCALE_DETECTION | Required | 1.x | Language detection mode, recommended to set as false• Set to true: Enables next-intl automatic detection, which redirects to corresponding language pages based on browser language• Set to false: Uses NEXTY.DEV's built-in SEO-friendly language detector |
NEXT_PUBLIC_OPTIMIZED_IMAGES | Optional | 2.x | Whether to enable image optimization, recommended to set as true to save Vercel image optimization resources |
NEXT_PUBLIC_LOGIN_MODE | Optional | 2.x | Select login mode: page opens login page /login, dialog opens login modal |
NEXT_PUBLIC_COOKIE_CONSENT_ENABLED | Optional | 3.1.6 | Whether to enable Cookie consent modal, defaults to false |
NEXT_PUBLIC_USER_SOURCE_TRACKING_ENABLED | Optional | 3.2.10 | Whether to record user source in userSource table, defaults to true |
Good to know
NEXTY.DEV's language detector checks the browser language on the user's first visit. If it doesn't match the current page language, a friendly switch prompt appears. This approach reduces unnecessary redirects and is more SEO-friendly.
Database
See Database Integration steps.
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
DATABASE_URL | Required | 3.0.0 |
Authentication
See Authentication Integration steps.
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
BETTER_AUTH_SECRET | Optional | 3.0.0 | Generate using command openssl rand -base64 32 |
NEXT_PUBLIC_GITHUB_CLIENT_ID | Optional | 3.0.0 | |
GITHUB_CLIENT_SECRET | Optional | 3.0.0 | |
NEXT_PUBLIC_GOOGLE_CLIENT_ID | Optional | 3.0.0 | |
GOOGLE_CLIENT_SECRET | Optional | 3.0.0 |
Cloudflare Turnstile
See Turnstile Integration steps.
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
NEXT_PUBLIC_TURNSTILE_SITE_KEY | Optional | 2.x | Enables Cloudflare Turnstile when configured |
TURNSTILE_SECRET_KEY | Optional | 3.0.0 |
Resend Email Service
See Resend Integration steps.
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
RESEND_API_KEY | Optional | 1.x | Resend API access key |
RESEND_AUDIENCE_ID | Optional | 1.x | Resend audience ID |
ADMIN_EMAIL | Optional | 1.x | Administrator email address, used as email sender |
ADMIN_NAME | Optional | 1.x | Administrator name, used as email sender display name |
Upstash Redis
See Upstash Integration steps.
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
UPSTASH_REDIS_REST_URL | Optional | 1.x | Redis database URL |
UPSTASH_REDIS_REST_TOKEN | Optional | 1.x | Redis access token |
DAY_MAX_SUBMISSIONS | Optional | 1.x | Daily maximum submission limit |
Stripe
See Stripe Integration steps.
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
NEXT_PUBLIC_DEFAULT_CURRENCY | Optional | 1.x | Default payment currency |
STRIPE_SECRET_KEY | Optional | 1.x | Stripe secret key |
STRIPE_PUBLISHABLE_KEY | Optional | 1.x | Stripe publishable key |
STRIPE_WEBHOOK_SECRET | Optional | 1.x | Stripe Webhook signature secret |
STRIPE_CUSTOMER_PORTAL_URL | Optional | 1.x | User subscription management page URL, provides users access to subscription information and cancellation, defaults to /dashboard/subscription page |
STRIPE_RADAR_EARLY_FRAUD_WARNING_TYPE | Optional | 3.1.9 | Sets response behavior when Stripe Radar early fraud warning is triggered |
STRIPE_RADAR_EARLY_FRAUD_WARNING_TYPE sets the response behavior when Stripe Radar early fraud warning is triggered. Available values and their meanings:
- "refund,email": Automatically refund and send email notification to administrator
- "refund": Automatically refund only
- "email": Send email notification to administrator only (no automatic refund)
- Leave empty or unset to skip processing
For Discord notifications, you can extend the environment variable's optional values and implement Discord notifications using methods in lib/discord/notifications.ts.
Creem
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
CREEM_API_BASE_URL | Optional | 3.2.6 | https://api.creem.io/v1 |
CREEM_API_KEY | Optional | 3.2.6 | |
CREEM_WEBHOOK_SECRET | Optional | 3.2.6 |
Cloudflare R2 Storage
See Cloudflare R2 Integration steps.
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
R2_ACCOUNT_ID | Optional | 1.x | R2 storage account ID |
R2_ACCESS_KEY_ID | Optional | 1.x | R2 access key ID |
R2_SECRET_ACCESS_KEY | Optional | 1.x | R2 secret access key |
R2_BUCKET_NAME | Optional | 1.x | R2 bucket name |
R2_PUBLIC_URL | Optional | 1.x | R2 bucket public access URL |
AI Model Integration
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
OPENAI_API_KEY | Optional | 1.x | OpenAI API key |
DEEPSEEK_API_KEY | Optional | 1.x | DeepSeek API key |
ANTHROPIC_API_KEY | Optional | 1.x | Anthropic API key |
XAI_API_KEY | Optional | 1.x | XAI API key |
GOOGLE_GENERATIVE_AI_API_KEY | Optional | 1.x | Google API key |
REPLICATE_API_TOKEN | Optional | 1.x | Replicate API token |
OPENROUTER_API_KEY | Optional | 1.x | OpenRouter API key |
FIRECRAWL_API_KEY | Optional | 3.1.7 | Firecrawl API key |
AI Translation Feature
The pricing plan editor and blog editor provide AI multilingual translation functionality. You need to configure the corresponding AI model here to use it.
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
NEXT_PUBLIC_AI_PROVIDER | Optional | 1.x | AI model service provider, e.g.: xai |
NEXT_PUBLIC_AI_MODEL_ID | Optional | 1.x | AI model identifier, e.g.: grok-3 |
Analytics & Advertising
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
NEXT_PUBLIC_GOOGLE_ID | Optional | 1.x | Google Analytics |
NEXT_PUBLIC_GOOGLE_ADSENSE_ID | Optional | 1.x | Google AdSense |
NEXT_PUBLIC_PLAUSIBLE_SRC | Optional | 2.x | Plausible script URL |
NEXT_PUBLIC_PLAUSIBLE_DOMAIN | Optional | 2.x | Plausible analytics domain |
PLAUSIBLE_API_KEY | Optional | 3.1.2 | Plausible API Key |
PLAUSIBLE_URL | Optional | 3.1.2 | Plausible server URL |
NEXT_PUBLIC_UMAMI_SRC | Optional | 3.2.9 | Umami script URL |
NEXT_PUBLIC_UMAMI_WEBSITE_ID | Optional | 3.2.9 | Umami website ID |
NEXT_PUBLIC_RYBBIT_SRC | Optional | 3.2.9 | Rybbit script URL src |
NEXT_PUBLIC_RYBBIT_SITE_ID | Optional | 3.2.9 | Rybbit data-site-id |
NEXT_PUBLIC_RYBBIT_SESSION_REPLAY | Optional | 3.2.9 | Whether to enable Rybbit Replay feature (user session recording) |
NEXT_PUBLIC_RYBBIT_REPLAY_MASK_SELECTORS | Optional | 3.2.9 | Rybbit Replay user information selectors to mask |
Discord
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
NEXT_PUBLIC_DISCORD_INVITE_URL | Optional | 2.x | Discord invite link |
DISCORD_WEBHOOK_URL | Optional | 3.1.7 | Discord Notify Webhook URL |
Affiliate(Tolt.io)
See Tolt Integration steps.
| Environment Variable | Required | Introduced In | Description |
|---|---|---|---|
NEXT_PUBLIC_TOLT_ID | Optional | 2.x | Tolt.io Affiliate ID |