Environment Variables Documentation
This document lists all the required environment variables for running the project and GitHub CI workflows.
Project Environment Variables
Variable
Description
Required For
SANITY_PROJECT_ID
Sanity project ID
Development, Production
SANITY_DATASET
Sanity dataset name
Development, Production
Variable
Description
Required For
NEXT_PUBLIC_SANITY_PROJECT_ID
Sanity project ID
Development, Production
NEXT_PUBLIC_SANITY_DATASET
Sanity dataset name
Development, Production
Below are only required to trigger the deployment workflows.
Variable
Description
Required For
GITHUB_PAT
GitHub personal access token
Development, Production
DEPLOY_REPO_URL
Repository URL for deployment
Development, Production
DEPLOY_WORKFLOW
GitHub workflow file name
Development, Production
DEPLOY_STAGING_WORKFLOW
GitHub workflow file name for staging
Development, Production
DEPLOY_REF
Git reference for deployment
Development, Production
Run cd apps/assets && php setup.php to setup the assets server. The below variables will be autogenerated.
Variable
Description
Required For
ADMIN_USERNAME
Admin username
Assets
ADMIN_PASSWORD_HASH
Admin password hash
Assets
ADMIN_PASSWORD
Admin password
OPTIONAL
Secret
Description
Required For
SANITY_DATASET
Sanity dataset name
Production CI/CD
SANITY_PROJECT_ID
Sanity project ID
Production CI/CD
FTP_SERVER
Production FTP server
Production CI/CD
FTP_USERNAME
Production FTP username
Production CI/CD
FTP_PASSWORD
Production FTP password
Production CI/CD
STAGING_FTP_SERVER
Staging FTP server
Staging CI/CD
STAGING_FTP_USERNAME
Staging FTP username
Staging CI/CD
STAGING_FTP_PASSWORD
Staging FTP password
Staging CI/CD
ASSETS_FTP_SERVER
Assets FTP server
Assets CI/CD
ASSETS_FTP_USERNAME
Assets FTP username
Assets CI/CD
ASSETS_FTP_PASSWORD
Assets FTP password
Assets CI/CD
VERCEL_TOKEN
Vercel deployment token
Content CI/CD
VERCEL_ORG_ID
Vercel organization ID
Content CI/CD
VERCEL_PROJECT_ID
Vercel project ID
Content CI/CD
GH_TOKEN
GitHub token for Vercel deploy
Content CI/CD
cp apps/web/.env.example apps/web/.env.local
cp apps/cms/.env.example apps/cms/.env.local
cd apps/assets && php setup.php
Never commit .env.local files containing sensitive information
Always use .env.example for documenting required variables
Keep your SSH and FTP credentials secure and rotate them periodically
Use different Sanity project IDs for development and production environments