Cloud Setup
Your documentation runs locally. Now let's make it live.
Nocturne works with any static host. This guide covers the three most popular free options.
Estimated time: 10–15 minutes.
Before You Deploy
Make sure you have:
- Nocturne running locally — see Local Setup
- A GitHub account — sign up free
- An account on at least one: Cloudflare, Netlify, Vercel
Step 1 — Push to GitHub
In the terminal, inside your Nocturne folder:
git init
git add .
git commit -m "Initial commit"
Then create a new repo on GitHub: github.com/new.
- Repository name:
nocturne-docs - Visibility: Public or Private
- Do not initialize with README
Copy the two commands GitHub shows, and run them:
git remote add origin https://github.com/YOUR-USERNAME/nocturne-docs.git
git push -u origin main
Your project is now on GitHub.
Step 2 — Common Build Settings
All providers need the same build settings. Note these down:
| Setting | Value |
|---|---|
| Build command | npm run build |
| Output directory | build |
| Node version | 18 or higher |
Step 3 — Deploy to Cloudflare Pages (Recommended)
Cloudflare Pages offers unlimited bandwidth — best for documentation sites.
- Open dash.cloudflare.com
- Go to Workers & Pages → Create → Pages → Connect to Git
- Authorize Cloudflare to access GitHub
- Select your
nocturne-docsrepository
Build settings:
| Field | Value |
|---|---|
| Project name | nocturne-docs |
| Production branch | main |
| Framework preset | Docusaurus |
| Build command | npm run build |
| Build output directory | build |
Click Save and Deploy.
After 1–2 minutes, your site is live at https://nocturne-docs.pages.dev.
Step 4 — Deploy to Netlify
- Open app.netlify.com
- Click Add new site → Import an existing project
- Select GitHub → authorize → select your repo
Build settings:
| Field | Value |
|---|---|
| Build command | npm run build |
| Publish directory | build |
Click Deploy site.
Step 5 — Deploy to Vercel
- Open vercel.com/new
- Click Continue with GitHub → authorize
- Import your
nocturne-docsrepository
Build settings:
| Field | Value |
|---|---|
| Framework Preset | Docusaurus |
| Build Command | npm run build |
| Output Directory | build |
Click Deploy.
Step 6 — Add a Custom Domain (Optional)
After deployment, connect your own domain.
Cloudflare Pages:
- Project → Custom domains → Set up a domain
Netlify:
- Site → Domain management → Add a domain
Vercel:
- Project → Settings → Domains
Follow the DNS instructions. Propagation takes 5–30 minutes.
Automatic Rebuilds
Once deployed, every push to main triggers a rebuild:
git add .
git commit -m "Update docs"
git push
Cloudflare, Netlify, or Vercel detects the push, rebuilds your site, and deploys it — usually in under 2 minutes.
No manual work needed.
Verifying Your Deployment
After deployment, check:
- ✅ Homepage loads
- ✅ Docs pages open
- ✅ Search works (Pagefind needs a production build)
- ✅ Dark mode toggle works
- ✅ All links work
If anything fails, check the build log in your provider's dashboard.
Troubleshooting
Build fails with "command not found: npm"
Node.js is not installed in the build environment. Add a .nvmrc file to your repo:
18
Or set NODE_VERSION=18 in environment variables.
Build succeeds but site is blank
Check the output directory. It must be build — not dist or public.
Search doesn't work on the live site
Pagefind only indexes during production builds. Make sure npm run build runs successfully.
404 on subpages
Cloudflare Pages handles trailing slashes automatically. If you see issues, add a _redirects file:
/* /index.html 200
What's Next?
Your documentation is live. Now let's configure Nocturne.