• Blog
  • Documentation
  • Courses
  • Changelog
  • AI Starters
  • UI Kit
  • FAQ
  • Supamode
    New
  • Pricing

Launch your next SaaS in record time with Makerkit, a React SaaS Boilerplate for Next.js and Supabase.

Makerkit is a product of Makerkit Pte Ltd (registered in the Republic of Singapore)Company Registration No: 202407149CFor support or inquiries, please contact us

About
  • FAQ
  • Contact
  • Verify your Discord
  • Consultation
  • Open Source
  • Become an Affiliate
Product
  • Documentation
  • Blog
  • Changelog
  • UI Blocks
  • Figma UI Kit
  • AI SaaS Starters
License
  • Activate License
  • Upgrade License
  • Invite Member
Legal
  • Terms of License
  • Global Configuration
    • Environment Variables
    • Feature Flags
    • Introduction
    • Initial Setup
    • Project Structure
    • Running the App
    • Project Configuration
    • Environment Variables
    • Tailwind CSS and Styling
    • Authentication
    • Database Schema
    • Onboarding Flow
    • Routing
    • Supabase: Data Fetching
    • Supabase: Data Writing
    • Building the Tasks page
    • Building the Task Detail page
    • API Routes
    • API Routes Validation
    • Application Pages
    • Adding pages to the Marketing Site
    • Functions you need to know
    • Translations
    • Updating to the latest version
    • Deploying to Production
This documentation is for a legacy version of Remix and Supabase. For the latest version, please visit the Remix and Supabase V2 documentation

Environment Variables

Learn how to use environment variables in your Remix project.

The starter project comes with two different environment variables files:

  1. .env: the main environment file
  2. .env.test: this environment file is loaded when running the Cypress E2E tests. You would rarely need to use this.

NB: the .env file is never committed to the repository. This is because it contains sensitive information, such as API keys. Instead, we use a .env. template file to show what the .env file should look like.

The environment variables for the Remix Supabase kit look like the below:

bash
DEFAULT_LOCALE=en
SITE_URL=http://localhost:3000
# set the below to "production" in your production environment
ENVIRONMENT=development
# SUPABASE
SUPABASE_URL=http://localhost:54321
SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
# STRIPE
STRIPE_WEBHOOK_SECRET=
STRIPE_SECRET_KEY=
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
# EMAIL
EMAIL_HOST=
EMAIL_PORT=587
EMAIL_USER=
EMAIL_PASSWORD=
EMAIL_SENDER='MakerKit Team <info@makerkit.dev>'
Define your environment variables in your hosting provider

Remix does not use .env files for bundling your app in production. Therefore, you will need to define your environment variables in your hosting provider (such as Vercel).

Define your environment variables in your hosting provider

NB: Remix will not bundle environment variables when building your app, but only during development mode. This needs to be repeated, as it is often confused with how Next.js works.

Instead, you will need to define them in your hosting provider (such as your Vercel project settings).