Skip to main content
OwnDocs

Deployment

4 min read

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:

Deploy with VercelDeploy to NetlifyDeploy to Render

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:

  1. Clone repository — Vercel clones the repository into your GitHub account

  2. Configure environment — You fill in the required environment variables (ACCESS_MODE, APP_PASSWORD, JWT_SECRET, COOKIE_SALT, THEME_VARIANT)

  3. Build and deploy — Vercel builds and deploys the site

  4. Go live — Your documentation site is live with a .vercel.app URL

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:

  1. Clone repository — Netlify clones the repository into your GitHub account

  2. Configure environment — The netlify.toml template asks for environment variables

  3. Build with OpenNext — Netlify installs the OpenNext adapter and builds the site

  4. Go live — Your documentation site is live with a .netlify.app URL

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:

  1. Clone repository — Render clones the repository into your account

  2. Apply blueprint — The render.yaml blueprint configures the web service with generated secrets

  3. Build — Render installs dependencies and builds the site

  4. Go live — Your documentation site is live with an .onrender.com URL

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_MODE
    • public (open access) or private (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:

Bash
Bash
npm install
npm run build
npm start

The 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.

  1. Prepare environment variables

    The compose file reads secrets from .env.local. Generate them first:

    Bash
    Bash
    bash scripts/setup-env.sh
  2. Build and start the container

    Bash
    Bash
    docker compose up --build -d

    If you are on an older Docker installation, the legacy spelling works the same way:

    Bash
    Bash
    docker-compose up --build -d
  3. Open the site

    The container publishes port 3000, so the site is at http://localhost:3000.

  4. Stop the container

    Bash
    Bash
    docker 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.

Was this page helpful?