Skip to main content

Local Setup

Now that Nocturne is installed, let's run it.

The dev server gives you a live preview of your documentation. Every change you make appears instantly — no manual rebuild required.

Estimated time: 2–3 minutes.


Step 1 — Start the Dev Server​

In the terminal, run:

npm start

You should see:

[INFO] Starting the development server...
[SUCCESS] Docusaurus website is running at: http://localhost:3000/

Step 2 — Open Your Browser​

Go to:

http://localhost:3000

You'll see the Nocturne homepage.

Try it out:

  • Click a sidebar link — the docs load
  • Toggle dark/light mode — top right corner
  • Use the search bar — type "install" and see results

Step 3 — Edit Content​

Open any file in docs/ using your text editor. For example, docs/getting-started/index.md.

Change something — a heading, a paragraph. Save the file.

Look at your browser. The page updates instantly. No refresh needed.

This is live reload — Docusaurus watches your files and rebuilds as you type.


Step 4 — Stop the Dev Server​

When you're done:

  • Press Ctrl + C in the terminal

The server stops. Run npm start again anytime.


How Live Reload Works​

Docusaurus watches these files:

  • .md and .mdx files in docs/
  • .json files in src/data/
  • .ts and .tsx files in src/
  • .css files in src/css/
  • .md files in blog/

When any of these change, Docusaurus:

  1. Rebuilds the affected page
  2. Pushes the update to your browser
  3. Preserves your scroll position

You stay focused. No manual rebuilds.


What You Can Do Locally​

TaskHow
Preview documentationnpm start
Edit docs contentEdit docs/*.md
Edit homepageEdit src/data/home.json
Edit navbarEdit src/data/navbar.json
Edit site configEdit src/data/site.json
Edit widgetsEdit src/data/widgets.json
Build for productionnpm run build

Troubleshooting​

Port 3000 already in use​

Another process is using port 3000. Start on a different port:

npm start -- --port 3001

Page doesn't update​

  1. Check the terminal for errors
  2. Make sure you saved the file
  3. Refresh the browser manually with Ctrl + Shift + R

Dev server crashes​

  1. Stop with Ctrl + C
  2. Delete node_modules/ and .docusaurus/
  3. Run npm install then npm start

Search doesn't work locally​

Pagefind search only works after npm run build. In dev mode, search is disabled.


What's Next?​

Your documentation runs locally. Now let's deploy it online.

👉 Next: Cloud Setup →