Installation
Initial Installation Guide — Astro Docus
Section titled “Initial Installation Guide — Astro Docus”Welcome! This guide walks you through everything from scratch — even if you have never touched code before. By the end, you will have the Astro Docus project running on your own computer.
Before You Start — Understand What You Are Installing
Section titled “Before You Start — Understand What You Are Installing”Before touching anything, here is what each tool does in plain English:
- Node.js — The engine that runs JavaScript outside the browser. Astro runs on top of it.
- npm — The package manager that comes free with Node.js. Used to install project libraries.
- VS Code — The editor where you write and edit code.
- Git — A “save point” system for your files (version control). Optional for now.
- Notepad++ — A lightweight alternative text editor.
Download Checklist
Section titled “Download Checklist”| Tool | Required? | Official Link |
|---|---|---|
| Node.js (LTS) | Required | https://nodejs.org |
| VS Code | Required | https://code.visualstudio.com |
| Notepad++ | Optional | https://notepad-plus-plus.org |
| Git | Recommended | https://git-scm.com |
Note: Notepad++ is a fallback if VS Code feels too heavy. For Astro projects, VS Code is far more comfortable.
Step 1 — Install Node.js
Section titled “Step 1 — Install Node.js”Node.js is the foundation. Without it, the Astro project cannot run.
1.1 Download Node.js
Section titled “1.1 Download Node.js”- Open your browser and go to: https://nodejs.org
- You will see two big buttons:
- Left: LTS (Long Term Support) — CHOOSE THIS
- Right: Current (newest, but sometimes unstable)
- Click the LTS button.
Why LTS? It is more stable and production-ready. Current has the latest features but is riskier for beginners.
Current Node.js LTS is around v22.x. The downloaded file will look like:
node-v22.x.x-x64.msi
1.2 Install Node.js
Section titled “1.2 Install Node.js”- Double-click the
.msifile you downloaded. - The installer wizard appears — click Next.
- Check “I accept the terms in the License Agreement” → Next.
- Destination Folder: leave default (
C:\Program Files\nodejs\) → Next. - Custom Setup: leave default → Next.
- Tools for Native Modules: DO NOT check (not needed for beginners) → Next.
- Click Install → wait → click Finish.
1.3 Verify Node.js
Section titled “1.3 Verify Node.js”This is the most important step — to confirm the install worked.
- Open Command Prompt (CMD) or PowerShell
- Press
Win + R→ typecmd→ Enter
- Press
- Type this command:
node --version- If you see a version like
v22.14.0, it WORKED. - Check npm too:
npm --version- If you see something like
10.9.2, npm was installed automatically.
If it errors? Close CMD, reopen it. If it still errors, restart your computer.
Step 2 — Install VS Code
Section titled “Step 2 — Install VS Code”VS Code is where you write and edit code. It is the most comfortable editor for Astro projects.
2.1 Download VS Code
Section titled “2.1 Download VS Code”- Go to: https://code.visualstudio.com
- The site auto-detects your OS. Click Download for Windows.
- Downloaded file:
VSCodeUserSetup-x64-1.xx.x.exe
2.2 Install VS Code
Section titled “2.2 Install VS Code”- Double-click the installer.
- Check “I accept the agreement” → Next.
- Select Additional Tasks: check everything related to “Add to PATH” and “Create a desktop icon” → Next.
- Click Install → wait → Finish.
Why VS Code? It has built-in support for JavaScript, TypeScript, and Node.js. There are also Astro/Starlight extensions that make coding much easier.
Step 3 — Install Git (Optional but Recommended)
Section titled “Step 3 — Install Git (Optional but Recommended)”Git is version control — like “save points” in a game. If you mess up an edit, you can roll back to a previous version.
3.1 Download Git
Section titled “3.1 Download Git”- Go to: https://git-scm.com
- Click Download for Windows (auto-detects 64-bit).
- File:
Git-2.xx.x-64-bit.exe
3.2 Install Git
Section titled “3.2 Install Git”- Double-click the installer.
- Next → Next → Next (all defaults are fine).
- Adjusting your PATH environment: choose “Git from the command line and also from 3rd-party software” — IMPORTANT.
- Leave the rest as default → Install → Finish.
3.3 Verify Git
Section titled “3.3 Verify Git”git --versionIf you see git version 2.xx.x, it worked.
Step 4 — Notepad++ (Lightweight Alternative)
Section titled “Step 4 — Notepad++ (Lightweight Alternative)”If you do not want to install VS Code or your PC is low-spec, Notepad++ is an alternative.
4.1 Download & Install Notepad++
Section titled “4.1 Download & Install Notepad++”- Go to: https://notepad-plus-plus.org
- Click Download → pick the latest version (x64).
- Double-click the installer.
- Choose your language → OK.
- Next → I accept → Next → Next → Install → Finish.
Recommendation: Skip this if you already have VS Code. Notepad++ is better for quickly editing small files or opening logs.
Step 5 — Run the Astro Docus Project
Section titled “Step 5 — Run the Astro Docus Project”Now that you have all the tools, let’s run the project.
5.1 Open the Project Folder in VS Code
Section titled “5.1 Open the Project Folder in VS Code”- Open VS Code.
- Click File → Open Folder.
- Select your Astro Docus project folder (the one containing
astro.config.mjs). - Click Select Folder.
5.2 Open the Terminal in VS Code
Section titled “5.2 Open the Terminal in VS Code”- In VS Code, press
Ctrl +(backtick), or - Click Terminal → New Terminal.
The terminal appears at the bottom of VS Code.
5.3 Install Dependencies
Section titled “5.3 Install Dependencies”This step downloads all the libraries the project needs.
In the terminal, type:
npm installOr if the project uses pnpm (check for a pnpm-lock.yaml file):
pnpm installWait until it finishes. Once the node_modules folder appears, it worked.
What are dependencies? Libraries the project needs — Astro, Starlight, Cloudflare adapter, etc. They are all listed in
package.json.
5.4 Start the Development Server
Section titled “5.4 Start the Development Server”Once installation is complete, type:
npm run devOr:
pnpm devIf successful, you will see output like:
🚀 astro v4.x.x started in 123ms
┃ Local http://localhost:4321/ ┃ Network use --host to expose5.5 Open in Browser
Section titled “5.5 Open in Browser”- Open your browser (Chrome, Firefox, Edge).
- Go to: http://localhost:4321
- BOOM! Your Astro Docus documentation is live.
Project Structure (So You Do Not Get Lost)
Section titled “Project Structure (So You Do Not Get Lost)”Once you open the project, you will see many files. Here is a rough map:
├── astro.config.mjs ← MAIN FILE (project brain)├── package.json ← dependencies list├── public/ ← static files (favicon, images, etc.)├── src/│ ├── assets/ ← images & icons│ ├── content/docs/ ← ALL YOUR DOCUMENTATION GOES HERE│ ├── data/ ← JSON files for dynamic content│ ├── styles/ ← CSS files│ └── widget/ ← Astro components (Header, Footer, etc.)Files you will edit most often:
src/content/docs/→ write new documentationastro.config.mjs→ change title, sidebar, logosrc/styles/→ change appearance
Quick Troubleshooting
Section titled “Quick Troubleshooting”| Problem | Solution |
|---|---|
node command not found |
Close CMD/terminal, reopen. Or restart your computer. |
npm install fails |
Check internet. Try npm cache clean --force then retry. |
| Port 4321 already in use | Run npm run dev -- --port 3000. |
| VS Code cannot open folder | Ensure folder permissions. Try running VS Code as Administrator. |
Quick Summary
Section titled “Quick Summary”1. Install Node.js LTS → nodejs.org2. Install VS Code → code.visualstudio.com3. Install Git (optional) → git-scm.com4. Open project in VS Code5. Terminal: npm install6. Terminal: npm run dev7. Browser: localhost:4321If you can open localhost:4321 in your browser, you have cleared the hardest part. Everything from here is just editing content and styling.
Ready to move on to Part 2: Writing Your First Documentation?
