Skip to content

.env

Some sensitive information like API keys and secret tokens are stored inside the .env file.

When you install StartKit.AI for the first time, some required variables will be set up for you.

Here are all the .env variables, their descriptions, and if they are required:

.env.example
##############
# API details
##############
API_HOST=localhost
API_PORT=1337
MAGIC_LINK_REDIRECT="http://localhost:1337"
# used to encrypt JWT tokens, it will be populated
# for you when you install StartKit.AI for the first time
JWT_SECRET=
####################################################
# OpenAI!
# For more details see https://startkit.ai/docs/getting-started/installation/openai
####################################################
OPENAI_KEY=
# optional
OPENAI_ORG_ID=
####################################################
# Mongo
# Used for all storage
# For more details see https://startkit.ai/docs/getting-started/installation/database
####################################################
MONGO_URI="mongodb://127.0.0.1:27017/boilerplate"
MONGO_TLS=
MONGO_ATLAS=
####################################################
# Embeddings
# Used for AI "memory"
# For more details see https://startkit.ai/docs/features/embeddings
####################################################
EMBEDDINGS_URL=http://localhost:8000
# This bearer token is for creating a private connection between
# the embeddings server and your main app, it will be populated
# for you when you install StartKit.AI for the first time
EMBEDDINGS_BEARER_TOKEN=
####################################################
# Emails
# Used for sending magic links to login
# For more details see https://startkit.ai/docs/features/emails
####################################################
RESEND_SENDING_ADDRESS=
RESEND_API_KEY=
# and if you want to add users to a newsletter
RESEND_AUDIENCE_ID=
####################################################
# Storage
# Used for storing user uploaded images and files
# Can use any S3 compatible API
# For more details see https://startkit.ai/docs/getting-started/installation/s3
####################################################
STORAGE_URL=
STORAGE_REGION=
STORAGE_KEY=
STORAGE_SECRET=
STORAGE_NAME=
####################################################
# Demos
# For more details see https://startkit.ai/docs/demos/env
####################################################
# URL for the demos to use to call the API (they run using Vite)
VITE_API_URL="http://localhost:1337"
# The context ID to use for the default PDF in the "Chat with PDF" demo
VITE_DEMO_PDF_CONTEXT_ID='1710012052356-10430406-warp.pdf'
####################################################
# Stripe
####################################################
STRIPE_WEBHOOK_SECRET=
STRIPE_API_KEY=
GOOGLE_SEARCH_KEY=
WEB_SEARCH_ID=