Deploy Docusaurus on Your Own Server

Deploy Docusaurus v2 and v3 documentation sites as static files. Temps builds your site and serves the output directly from the proxy — no container runs at runtime.


Quickstart

From your project root, deploy with your preferred package manager:

npx @temps-sdk/cli up

Temps detects @docusaurus/core in your package.json, runs npm run build, and serves the build/ directory. Your site is live with HTTPS in about 2 minutes.


What Temps Handles Automatically

FeatureHow Temps handles it
Detection@docusaurus/core in package.json
Buildnpm run build
OutputServes build/
HTTPSLet's Encrypt certificate, auto-renewed
Runtime costZero — static files served from the proxy

Custom build output

Docusaurus outputs to build/ by default. If you customize the output directory, override it in .temps.yaml:

.temps.yaml

build:
  output_dir: build

Compression & caching

Docusaurus generates a real HTML file for every route, so navigation works without any rewrite rules. The Temps proxy applies these optimizations to all static responses automatically.

The Temps proxy applies performance optimizations to all static file responses automatically:

  • Gzip compression for text-based files over 1 KB (HTML, CSS, JavaScript, JSON, XML, SVG) when the browser supports it.
  • ETags based on each file's content hash, so unchanged files return 304 Not Modified.

Cache-Control headers are set based on the file path:

PatternCache-ControlUse case
/assets/*, /static/*, /_next/static/*, .chunk.*, .hash.*public, max-age=31536000, immutableHashed assets that never change
Everything elsepublic, max-age=0, must-revalidateHTML files and non-hashed resources

Your hashed JS and CSS bundles are cached for a year, while index.html is always revalidated so new deployments are picked up immediately.


Next Steps

Was this page helpful?