Skip to main content

Environment Variables

BYOK deployments connect the NearSync application to your own infrastructure by setting environment variables. This page describes what configuration is needed and which variables are optional.

Core Variables (Required)

These variables are required for the NearSync application to function:

Supabase Connection

VariableDescription
Supabase URLThe HTTPS endpoint for your Supabase project. Found in your Supabase Dashboard under Settings > API.
Supabase anon keyThe public API key for client-side operations. All data access through this key is governed by Row-Level Security policies. Found alongside the URL in your Supabase Dashboard.

These two variables are the minimum required to connect the NearSync frontend to your database.

Domain Configuration

VariableDescription
Admin dashboard URLThe public URL where your admin dashboard is deployed (e.g., admin.yourcompany.com)
Client portal URLThe public URL where your client portal is deployed (e.g., portal.yourcompany.com)
Marketing site URLThe public URL for your marketing website, if applicable

Domain variables are used for cross-domain authentication, email links, and booking URLs.

Integration Variables (Optional)

These variables enable specific feature modules. If omitted, the associated features will be unavailable but the rest of the platform functions normally.

Communication Services

VariableDescriptionEnables
Voice provider credentialsAPI keys and account identifiers for your voice/telephony providerVoice calling in Comms HQ
WhatsApp Business API credentialsAPI token and phone number ID for the Meta Business APIWhatsApp messaging in Comms HQ
Email sending credentialsSMTP or transactional email provider API keyOutbound email delivery

AI Services

VariableDescriptionEnables
Primary AI provider keyAPI key for your chosen AI provider (e.g., Google Gemini, OpenAI, Anthropic)AI assistant (Pippin), knowledge base, smart features

NearSync supports multiple AI providers. You configure your preferred provider and key. The AI configuration is stored in your own database, not in environment variables, but the provider API key is needed at the edge function level.

Monitoring

VariableDescriptionEnables
Error tracking DSNEndpoint for your error tracking service (e.g., Sentry)Application error monitoring and alerting

Payment Processing

VariableDescriptionEnables
Payment provider keysAPI keys for your payment processor (e.g., Stripe)Invoice payments, payment links in Finance HQ

Edge Function Secrets

If you are deploying your own Supabase Edge Functions (enterprise self-hosted model), additional secrets are configured via the Supabase CLI or Dashboard under Edge Functions > Secrets:

SecretDescription
Admin URLPoints edge function email links to your admin dashboard
Portal URLPoints edge function email links to your client portal
Site URLPoints edge function email links to your marketing site

These ensure that emails sent by edge functions (invitations, notifications, booking confirmations) contain correct links to your domains.

Variable Isolation in BYOK

A key benefit of the BYOK model: all API keys and credentials are stored in your own infrastructure. NearSync's codebase reads these variables at runtime but never transmits them externally. Third-party API keys (voice, WhatsApp, AI, payments) are your property and remain under your control.

If you use the NearSync-managed Vercel deployment, your environment variables are stored encrypted in your Vercel project. If you self-host, you manage secrets via your own deployment platform.

Next Steps