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
| Variable | Description |
|---|---|
| Supabase URL | The HTTPS endpoint for your Supabase project. Found in your Supabase Dashboard under Settings > API. |
| Supabase anon key | The 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
| Variable | Description |
|---|---|
| Admin dashboard URL | The public URL where your admin dashboard is deployed (e.g., admin.yourcompany.com) |
| Client portal URL | The public URL where your client portal is deployed (e.g., portal.yourcompany.com) |
| Marketing site URL | The 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
| Variable | Description | Enables |
|---|---|---|
| Voice provider credentials | API keys and account identifiers for your voice/telephony provider | Voice calling in Comms HQ |
| WhatsApp Business API credentials | API token and phone number ID for the Meta Business API | WhatsApp messaging in Comms HQ |
| Email sending credentials | SMTP or transactional email provider API key | Outbound email delivery |
AI Services
| Variable | Description | Enables |
|---|---|---|
| Primary AI provider key | API 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
| Variable | Description | Enables |
|---|---|---|
| Error tracking DSN | Endpoint for your error tracking service (e.g., Sentry) | Application error monitoring and alerting |
Payment Processing
| Variable | Description | Enables |
|---|---|---|
| Payment provider keys | API 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:
| Secret | Description |
|---|---|
| Admin URL | Points edge function email links to your admin dashboard |
| Portal URL | Points edge function email links to your client portal |
| Site URL | Points 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
- Deploy to Vercel and configure these variables in your project settings
- Review data sovereignty guarantees