Menu

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 VariableRequiredIntroduced InDescription
NEXT_PUBLIC_SITE_URLRequired1.xWebsite access URL
• For local development, use the startup address, defaults to http://localhost:3000
• For production, use your actual domain
NEXT_PUBLIC_PRICING_PATHRequired2.xCorresponds to the actual pricing plan page, defaults to /#pricing
NEXT_PUBLIC_LOCALE_DETECTIONRequired1.xLanguage 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_IMAGESOptional2.xWhether to enable image optimization, recommended to set as true to save Vercel image optimization resources
NEXT_PUBLIC_LOGIN_MODEOptional2.xSelect login mode: page opens login page /login, dialog opens login modal
NEXT_PUBLIC_COOKIE_CONSENT_ENABLEDOptional3.1.6Whether to enable Cookie consent modal, defaults to false
NEXT_PUBLIC_USER_SOURCE_TRACKING_ENABLEDOptional3.2.10Whether 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 VariableRequiredIntroduced InDescription
DATABASE_URLRequired3.0.0

Authentication

See Authentication Integration steps.

Environment VariableRequiredIntroduced InDescription
BETTER_AUTH_SECRETOptional3.0.0Generate using command openssl rand -base64 32
NEXT_PUBLIC_GITHUB_CLIENT_IDOptional3.0.0
GITHUB_CLIENT_SECRETOptional3.0.0
NEXT_PUBLIC_GOOGLE_CLIENT_IDOptional3.0.0
GOOGLE_CLIENT_SECRETOptional3.0.0

Cloudflare Turnstile

See Turnstile Integration steps.

Environment VariableRequiredIntroduced InDescription
NEXT_PUBLIC_TURNSTILE_SITE_KEYOptional2.xEnables Cloudflare Turnstile when configured
TURNSTILE_SECRET_KEYOptional3.0.0

Resend Email Service

See Resend Integration steps.

Environment VariableRequiredIntroduced InDescription
RESEND_API_KEYOptional1.xResend API access key
RESEND_AUDIENCE_IDOptional1.xResend audience ID
ADMIN_EMAILOptional1.xAdministrator email address, used as email sender
ADMIN_NAMEOptional1.xAdministrator name, used as email sender display name

Upstash Redis

See Upstash Integration steps.

Environment VariableRequiredIntroduced InDescription
UPSTASH_REDIS_REST_URLOptional1.xRedis database URL
UPSTASH_REDIS_REST_TOKENOptional1.xRedis access token
DAY_MAX_SUBMISSIONSOptional1.xDaily maximum submission limit

Stripe

See Stripe Integration steps.

Environment VariableRequiredIntroduced InDescription
NEXT_PUBLIC_DEFAULT_CURRENCYOptional1.xDefault payment currency
STRIPE_SECRET_KEYOptional1.xStripe secret key
STRIPE_PUBLISHABLE_KEYOptional1.xStripe publishable key
STRIPE_WEBHOOK_SECRETOptional1.xStripe Webhook signature secret
STRIPE_CUSTOMER_PORTAL_URLOptional1.xUser subscription management page URL, provides users access to subscription information and cancellation, defaults to /dashboard/subscription page
STRIPE_RADAR_EARLY_FRAUD_WARNING_TYPEOptional3.1.9Sets 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 VariableRequiredIntroduced InDescription
CREEM_API_BASE_URLOptional3.2.6https://api.creem.io/v1
CREEM_API_KEYOptional3.2.6
CREEM_WEBHOOK_SECRETOptional3.2.6

Cloudflare R2 Storage

See Cloudflare R2 Integration steps.

Environment VariableRequiredIntroduced InDescription
R2_ACCOUNT_IDOptional1.xR2 storage account ID
R2_ACCESS_KEY_IDOptional1.xR2 access key ID
R2_SECRET_ACCESS_KEYOptional1.xR2 secret access key
R2_BUCKET_NAMEOptional1.xR2 bucket name
R2_PUBLIC_URLOptional1.xR2 bucket public access URL

AI Model Integration

Environment VariableRequiredIntroduced InDescription
OPENAI_API_KEYOptional1.xOpenAI API key
DEEPSEEK_API_KEYOptional1.xDeepSeek API key
ANTHROPIC_API_KEYOptional1.xAnthropic API key
XAI_API_KEYOptional1.xXAI API key
GOOGLE_GENERATIVE_AI_API_KEYOptional1.xGoogle API key
REPLICATE_API_TOKENOptional1.xReplicate API token
OPENROUTER_API_KEYOptional1.xOpenRouter API key
FIRECRAWL_API_KEYOptional3.1.7Firecrawl 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 VariableRequiredIntroduced InDescription
NEXT_PUBLIC_AI_PROVIDEROptional1.xAI model service provider, e.g.: xai
NEXT_PUBLIC_AI_MODEL_IDOptional1.xAI model identifier, e.g.: grok-3

Analytics & Advertising

See Analytics Integration

Environment VariableRequiredIntroduced InDescription
NEXT_PUBLIC_GOOGLE_IDOptional1.xGoogle Analytics
NEXT_PUBLIC_GOOGLE_ADSENSE_IDOptional1.xGoogle AdSense
NEXT_PUBLIC_PLAUSIBLE_SRCOptional2.xPlausible script URL
NEXT_PUBLIC_PLAUSIBLE_DOMAINOptional2.xPlausible analytics domain
PLAUSIBLE_API_KEYOptional3.1.2Plausible API Key
PLAUSIBLE_URLOptional3.1.2Plausible server URL
NEXT_PUBLIC_UMAMI_SRCOptional3.2.9Umami script URL
NEXT_PUBLIC_UMAMI_WEBSITE_IDOptional3.2.9Umami website ID
NEXT_PUBLIC_RYBBIT_SRCOptional3.2.9Rybbit script URL src
NEXT_PUBLIC_RYBBIT_SITE_IDOptional3.2.9Rybbit data-site-id
NEXT_PUBLIC_RYBBIT_SESSION_REPLAYOptional3.2.9Whether to enable Rybbit Replay feature (user session recording)
NEXT_PUBLIC_RYBBIT_REPLAY_MASK_SELECTORSOptional3.2.9Rybbit Replay user information selectors to mask

Discord

Environment VariableRequiredIntroduced InDescription
NEXT_PUBLIC_DISCORD_INVITE_URLOptional2.xDiscord invite link
DISCORD_WEBHOOK_URLOptional3.1.7Discord Notify Webhook URL

Affiliate(Tolt.io)

See Tolt Integration steps.

Environment VariableRequiredIntroduced InDescription
NEXT_PUBLIC_TOLT_IDOptional2.xTolt.io Affiliate ID