Deployment
Deploy OwnDocs with one click, or build it manually on your own infrastructure. By the end you'll have a live documentation site answering on a public URL, or on port 3000 of your own host.
Prerequisites
- A GitHub account, for the one-click deploy buttons that clone the repository for you
- Node.js 20.9.0 or newer and npm 10 or newer, for a manual build
- Docker with the Compose plugin, for the self-hosted container path
- Values ready for the environment variables listed below; run
bash scripts/setup-env.shto generate the secret ones
One-Click Deploy
Click a button below to clone, configure, and deploy OwnDocs:
Each platform clones the repository into your account, asks for the environment variables, and deploys a live site.
Vercel
Vercel is Next.js's native hosting platform. It detects the framework, sets up the build, and deploys without any config. The deploy button asks for every required environment variable during setup.
What happens when you click Deploy:
-
Clone repository — Vercel clones the repository into your GitHub account
-
Configure environment — You fill in the required environment variables (ACCESS_MODE, APP_PASSWORD, JWT_SECRET, COOKIE_SALT, THEME_VARIANT)
-
Build and deploy — Vercel builds and deploys the site
-
Go live — Your documentation site is live with a
.vercel.appURL
Netlify
Netlify runs Next.js through the OpenNext adapter, which it installs during the
build. The included netlify.toml asks for environment variables when you
deploy.
What happens when you click Deploy:
-
Clone repository — Netlify clones the repository into your GitHub account
-
Configure environment — The
netlify.tomltemplate asks for environment variables -
Build with OpenNext — Netlify installs the OpenNext adapter and builds the site
-
Go live — Your documentation site is live with a
.netlify.appURL
Render
Render deploys OwnDocs as a web service using the included render.yaml
blueprint. It generates secrets like JWT_SECRET and COOKIE_SALT during
deployment.
What happens when you click Deploy:
-
Clone repository — Render clones the repository into your account
-
Apply blueprint — The
render.yamlblueprint configures the web service with generated secrets -
Build — Render installs dependencies and builds the site
-
Go live — Your documentation site is live with an
.onrender.comURL
Environment Variables
All platforms use the same environment variables. The setup script
(scripts/setup-env.sh) generates them for local development. For cloud
deployments, set them in your platform's dashboard or during the one-click
deploy flow.
ACCESS_MODEpublic(open access) orprivate(password-protected)- Default:
public
APP_PASSWORD- Site access password
- Required for private mode
JWT_SECRET- JWT token signing key
- Required for private mode
COOKIE_SALT- Salt for cookie name generation
- Required for private mode
THEME_VARIANT- Color theme, from 26 options
- Default:
violet
NEXT_PUBLIC_FOOTER_COMPANY_NAME- Company name shown in the footer
- No default
NEXT_PUBLIC_FOOTER_COMPANY_URL- Company URL linked in the footer
- No default
NEXT_PUBLIC_SITE_URL- Full site URL for the sitemap and OpenGraph tags
- No default
Manual Deployment
For any Node.js hosting provider, build and start OwnDocs with:
npm install
npm run build
npm startThe production server starts on port 3000 by default. Set environment variables
through your hosting provider's dashboard or a .env.local file before
building.
Docker Self-Host
OwnDocs ships a Dockerfile and a docker-compose.yml so you can run it as a
container on your own infrastructure. This is the recommended self-hosted path
when you want a single isolated service without installing a Node toolchain on
the host.
-
Prepare environment variables
The compose file reads secrets from
.env.local. Generate them first:BashBashbash scripts/setup-env.sh -
Build and start the container
BashBashdocker compose up --build -dIf you are on an older Docker installation, the legacy spelling works the same way:
BashBashdocker-compose up --build -d -
Open the site
The container publishes port 3000, so the site is at
http://localhost:3000. -
Stop the container
BashBashdocker compose down
The compose file maps 3000:3000, loads environment variables from
.env.local, and restarts the container automatically with
restart: unless-stopped. The Dockerfile builds a production image with a
non-root user and runs npm start on port 3000. The image copies the docs
content into the runtime, so on-demand revalidation and the MCP fetch_page
tool work inside the container. It also sets FEEDBACK_DIR=/app/data/feedback,
a writable directory owned by the non-root user where the daily feedback files
land. The compose file maps no volume, so votes are lost on rebuild or recreate
— mount a volume at /app/data/feedback to keep them. See
Configuration for the full environment
variable reference.
Result
Open the deployed URL. On Vercel it ends in .vercel.app, on Netlify
.netlify.app, on Render .onrender.com, and on a manual or Docker host it is
http://localhost:3000. You should land on the OwnDocs home page with the
sidebar, the theme toggle, and working search. Two checks confirm the deploy
took your configuration:
GET /api/healthreturns{"status":"pass"}.- With
ACCESS_MODEset toprivate, any page redirects you to/loginuntil you enterAPP_PASSWORD.
If either check fails, the environment variables didn't reach the running process. Re-check them against Configuration.