Minimal uses environment variables for configuration. This guide covers all available configuration options and their usage.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ephraimduncan/minimal.so/llms.txt
Use this file to discover all available pages before exploring further.
Environment Variables
All configuration is done through environment variables in a.env file at the root of your project.
Quick Setup
.env with your configuration values.
Core Configuration
Database
You must configure either
DATABASE_URL (for local SQLite) or both TURSO_DATABASE_URL and TURSO_AUTH_TOKEN (for Turso).DATABASE_URL
- Required: Yes (if not using Turso)
- Default:
file:./dev.db - Description: SQLite database connection URL
- Example:
file:./dev.db
.env
LOCAL_DATABASE_URL
- Required: No
- Default:
file:./dev.db - Description: Local database URL for development
- Example:
file:./dev.db
.env
TURSO_DATABASE_URL
- Required: Yes (for production with Turso)
- Default: None
- Description: Turso database connection URL
- Example:
libsql://your-db.turso.io
.env
TURSO_AUTH_TOKEN
- Required: Yes (for production with Turso)
- Default: None
- Description: Turso authentication token
- Example:
eyJhbGc...
.env
Authentication
BETTER_AUTH_SECRET
- Required: Yes
- Default: None
- Description: Secret key for session signing and encryption
- Example:
your-secret-key-here
.env
Application URL
NEXT_PUBLIC_APP_URL
- Required: Yes
- Default:
https://minimal.so - Description: Public URL where your application is hosted
- Example:
https://bookmarks.example.com
.env
This URL is used for OAuth callbacks, email links, and CORS configuration. Must include protocol (http/https).
.env
Optional Configuration
OAuth Providers
Google OAuth
Enable Google sign-in by configuring both variables:GOOGLE_CLIENT_ID
- Required: No (Yes if using Google OAuth)
- Default: None
- Description: Google OAuth client ID
- Example:
123456789-abc.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET
- Required: No (Yes if using Google OAuth)
- Default: None
- Description: Google OAuth client secret
- Example:
GOCSPX-abc123...
.env
Get Google OAuth credentials from the Google Cloud Console.
Email Service
AUTOSEND_API_KEY
- Required: No (Yes if using email features)
- Default: None
- Description: Autosend API key for transactional emails
- Example:
as_live_abc123...
.env
- Welcome emails on signup
- Email verification
- Password reset
Admin Configuration
ADMIN_EMAIL
- Required: No
- Default: None
- Description: Admin email address for notifications
- Example:
admin@example.com
.env
Storage Configuration
BLOB_READ_WRITE_TOKEN
- Required: No (Yes if using Vercel Blob)
- Default: None
- Description: Vercel Blob storage token for file uploads
- Example:
vercel_blob_...
AVATAR_STORAGE
- Required: No
- Default: None
- Description: Avatar storage configuration
- Example:
bloborlocal
.env
If not configured, Minimal will use default avatar placeholders.
Chrome Extension
CHROME_EXTENSION_ID
- Required: No (Yes if using Chrome extension)
- Default: None
- Description: Chrome extension ID for CORS configuration
- Example:
abcdefghijklmnopqrstuvwxyz123456
NEXT_PUBLIC_CHROME_EXTENSION_ID
- Required: No (Yes if using Chrome extension)
- Default: None
- Description: Public Chrome extension ID for client-side access
- Example:
abcdefghijklmnopqrstuvwxyz123456
.env
Configuration Examples
Minimal Local Development
.env
Production with Turso
.env
Full Production Configuration
.env
Environment-Specific Configuration
Development vs Production
Minimal automatically detects the environment based onNODE_ENV:
- Development:
NODE_ENV=development(default withbun run dev) - Production:
NODE_ENV=production(set withbun run build)
Platform-Specific Variables
Some platforms set additional variables:Vercel
Validation
Minimal validates configuration on startup. If required variables are missing, you’ll see error messages:Security Best Practices
- Never commit
.envfiles: Add.envto.gitignore - Use strong secrets: Generate random secrets with
openssl rand -base64 32 - Rotate secrets: Regularly rotate
BETTER_AUTH_SECRETand API keys - Use HTTPS: Always use
https://URLs in production - Restrict CORS: Only add necessary extension IDs to
CHROME_EXTENSION_ID - Environment separation: Use different secrets for development and production
Troubleshooting
Variable Not Loading
- Check
.envfile location (must be at project root) - Restart development server after changes
- Verify no typos in variable names
- Check for quotes around values
OAuth Not Working
- Verify
NEXT_PUBLIC_APP_URLmatches OAuth redirect URI - Check both
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETare set - Ensure OAuth consent screen is configured in Google Cloud Console
Email Not Sending
- Verify
AUTOSEND_API_KEYis valid - Check Autosend account has credits
- Review application logs for email errors
Next Steps
- Database Setup - Configure SQLite or Turso
- Authentication - Set up OAuth and email auth
- Installation - Complete installation guide