Self-host NextGuide
Run documentation alongside your existing Next.js application on a server you control.
Self-hosting NextGuide
NextGuide runs inside your Next.js application. You do not need a separate NextGuide daemon or an external content service.
Developer Mode
Build and start your Next.js application as you normally would:
bun install
bun run build
bun run start
Configure your domain, HTTPS, and reverse proxy for the Next.js process. Commit content/docs/, nextguide.config.json, and the generated route and styles in your application's repository.
Developer Mode is also compatible with static hosting. Configure Next.js with output: "export", build the project, and deploy the resulting out/ directory if you do not need a Node.js server.
Account Mode
Account Mode requires a persistent Node.js server, a writable documentation directory, and private storage outside the web application directory. It cannot run as a read-only static export or rely on an ephemeral serverless filesystem.
For a persistent server deployment, set:
NEXTGUIDE_PUBLIC_URL=https://docs.example.com
NEXTGUIDE_DATA_DIR=/var/lib/nextguide/account
These are example values, not a directory you must use. Choose a private, persistent path your server process can read and write. The public URL should be your actual HTTPS origin. Back up this directory securely and store recovery codes separately.
The Account Mode source includes authentication and a content studio. Confirm the installed npm alpha version and test its production build before deployment. See Account Mode setup and security & recovery.
Deployment checklist
- Build the Next.js app and test documentation routes before routing public traffic.
- Terminate TLS at your hosting provider or reverse proxy.
- Keep secrets, private keys, and Account Mode files out of the public directory and source control.
- Ensure the server can write to your chosen persistent storage only if you use Account Mode.