Environment Variables
Here's a list of all the environment variables needed to run your Outstatic install:
# REQUIRED Environment variables
# Authentication mode (choose one of the two options below):
# Option A - Free self-hosting with your own GitHub OAuth app
OST_GITHUB_ID=YOUR_GITHUB_OAUTH_OR_APPS_ID
OST_GITHUB_SECRET=YOUR_GITHUB_OAUTH_OR_APPS_SECRET
# Option B - Outstatic Pro relay auth (no local GitHub OAuth app needed)
OUTSTATIC_API_KEY=your_api_key_here
# OST_REPO_SLUG (Ex: for avitorio/outstatic, OST_REPO_SLUG=outstatic)
OST_REPO_SLUG=THE_REPOSITORY_SLUG
# If empty AND on Vercel, this will default to VERCEL_GIT_REPO_SLUG
# OPTIONAL Environment variables
# Main branch of the project. If empty, this will default to 'main'
OST_REPO_BRANCH=main
# Repository owner or organization. If empty, logged in GitHub username is used.
OST_REPO_OWNER=myusername
# Where content is saved. Defaults to outstatic/content if empty.
OST_CONTENT_PATH=outstatic/content
# If your Next.js project is inside a monorepo, ie: your /outstatic folder
# is not at the root level of your repository. Specify monorepo folder of
# your Next.js install
OST_MONOREPO_PATH=apps/web
# OpenAI API Key for AI Completions
OPENAI_API_KEY=sk-XXXXXXX
# Use with Next.js basePath
# https://nextjs.org/docs/app/api-reference/next-config-js/basePath
OST_BASE_PATH=/docs
# This is not needed but can make your install slightly more secure
OST_TOKEN_SECRET=A_32CHAR_RANDOM_STRING_FOR_YOUR_TOKEN_SECRETGood to know: To get your repository slug we first try fetching the OST_REPO_SLUG environment variable. If that is empty, we try VERCEL_GIT_REPO_SLUG, which is one of Vercel's default environment variables. If both are empty, you'll get a warning saying you need to add OST_REPO_SLUG to your environment variables.
Authentication mode: Free self-hosted installations use their own GitHub OAuth app with OST_GITHUB_ID and OST_GITHUB_SECRET. Outstatic Pro workspaces can instead use one OUTSTATIC_API_KEY to unlock AI Completions, Member Management, Google Social Login and Email Sign-In, Automatic Content Setup, and managed relay authentication. Creating or regenerating an Outstatic API key requires an active or trialing Pro subscription.
If you use relay auth, configure your Callback Origins on the project's API Keys page so login callbacks return to your self-hosted /api/outstatic/callback route.
Important: Don't forget to redeploy your website or restart your server after updating environment variables.
In case you need help on how to get your GitHub OAuth credentials, please read the Getting started section.