Deployment
Deploy OwnDocs with one click, or build it manually on your own infrastructure.
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:
emerald
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. See
Configuration for the full environment
variable reference.