private (password-protected, default) or public (open access). Private
mode requires APP_PASSWORD, JWT_SECRET, and COOKIE_SALT, and blocks
crawlers.
Configuration
OwnDocs is configured through environment variables and two optional files:
owndocs.config.json for build-time variable substitution and .env.local for
local secrets. This page is the complete reference for every value the
application reads. Run bash scripts/setup-env.sh to generate the required
secrets locally.
Access mode
ACCESS_MODEstringDefault: privatePrivate-mode secrets
APP_PASSWORDstringSite access password. Required in private mode. Generate: openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | head -c 24.
JWT_SECRETstringJWT signing key. Required in private mode. Generate: openssl rand -base64 48.
COOKIE_SALTstringSalt for cookie-name generation. Required in private mode. Generate: openssl rand -hex 32.
Appearance
THEME_VARIANTstringDefault: emeraldOne of 26 color palettes: amber, blue, cyan, emerald, fuchsia, gray, green, indigo, lime, mauve, mist, neutral, olive, orange, pink, purple, red, rose, sky, slate, stone, taupe, teal, violet, yellow, zinc.
NEXT_PUBLIC_FOOTER_COMPANY_NAMEstringCompany name shown in the footer. No default.
NEXT_PUBLIC_FOOTER_COMPANY_URLstringCompany URL linked in the footer. No default.
NEXT_PUBLIC_SITE_URLstringCanonical site URL for the sitemap and Open Graph tags. Optional; auto-detected on Vercel.
Announcement bar
NEXT_PUBLIC_ANNOUNCEMENT_IDstringUnique id for the announcement, used to key the dismiss state in localStorage.
NEXT_PUBLIC_ANNOUNCEMENT_MESSAGEstringAnnouncement text shown in the site-wide banner. When empty, the bar is hidden.
NEXT_PUBLIC_ANNOUNCEMENT_HREFstringOptional link destination for the announcement.
NEXT_PUBLIC_ANNOUNCEMENT_LINK_LABELstringOptional link text; requires NEXT_PUBLIC_ANNOUNCEMENT_HREF.
NEXT_PUBLIC_ANNOUNCEMENT_DISMISSIBLEstringDefault: trueSet false to make the announcement non-dismissible.
AI chat
AI_PROVIDERstringanthropic, openai-compatible (or openai), ollama, or ollama-cloud.
See the AI Chat integration for full setup.
AI_API_KEYstringProvider API key. Optional for local Ollama.
AI_BASE_URLstringProvider base URL. Optional; presets exist per provider.
AI_MODELstringModel id. Required for non-Anthropic providers.
ANTHROPIC_API_KEYstringAnthropic-specific API key alias.
ANTHROPIC_MODELstringAnthropic-specific model alias; defaults to claude-sonnet-5.
Feedback
FEEDBACK_DIRstringDefault: ./data/feedbackReader-feedback storage directory.
NOTION_API_KEYstringNotion integration token (starts with ntn_) for read-only hosts. See the
Notion integration.
NOTION_DATABASE_IDstring32-character Notion database id that receives reader votes.
MCP server
MCP_ENABLEDstringSet true to expose /api/mcp in private mode. See the MCP
integration.
MCP_BEARER_TOKENstringBearer token required by MCP clients. Generate: openssl rand -hex 32.
Edit link
NEXT_PUBLIC_REPO_URLstringRepository URL used to build the edit-on-GitHub link in the page footer. When unset, the edit link is hidden.
NEXT_PUBLIC_REPO_BRANCHstringDefault: mainBranch the edit link targets.
Build-time variables
OwnDocs substitutes {{vars.<name>}} tokens in MDX content at build time. There
are two sources, merged with environment variables taking precedence.
owndocs.config.json- a root-level JSON file with avarsobject, for example{ "vars": { "brand": "OwnDocs" } }.NEXT_PUBLIC_DOCS_VAR_*environment variables - each one becomes a variable by stripping the prefix and camel-casing the rest. For example,NEXT_PUBLIC_DOCS_VAR_API_URLbecomeshttps://api.example.com.
Use the variable in content as https://api.example.com; the remark plugin replaces it
at build time.
Result
Every secret above should be generated, stored in .env.local or your host's
secret store, and never committed. The .env.example file documents the same
set with placeholder values for reference. NEXT_PUBLIC_* values are inlined at
build time, so changing them requires a rebuild.