A lightweight, self-hosted personal knowledge base for connected notes.
Moon Note combines Markdown, [[wikilinks]], backlinks, folders, a visual knowledge graph, and a live moon-phase widget — all in a small Node.js app with no database to manage.
- Screenshots
- Features
- Quick Start
- Installation Options
- Managing the App
- Data and Backups
- Configuration
- Keyboard Shortcuts
- API Reference
- Project Structure
- License
| Feature | Description |
|---|---|
| Markdown notes | Write notes in Markdown with a live Write/Preview workflow. |
| Wikilinks | Link notes with [[Note Title]] or [[alias|Note Title]]. |
| Backlinks | See which notes reference the note you are viewing. |
| Folders | Organize notes by folder in the sidebar. |
| Knowledge graph | Explore connections between notes with a D3-powered graph. |
| Moon phase widget | Track the current lunar phase from inside the app. |
| Simple persistence | Notes are stored in data/notes.json; no database required. |
The fastest way to run Moon Note is with Docker:
curl -fsSL https://raw.githubusercontent.com/frostmute/moon-note/main/install.sh | bashThen open:
http://localhost:3000
By default, the installer clones the app to:
~/moon-note
Requirements: Git, Docker, and Docker Compose.
curl -fsSL https://raw.githubusercontent.com/frostmute/moon-note/main/install.sh | bashThe installer will:
- Clone or update the repository.
- Create the local
data/directory if needed. - Build and start the Docker container.
- Expose the app at
http://localhost:3000.
curl -fsSL https://raw.githubusercontent.com/frostmute/moon-note/main/install.sh -o install.sh
MOON_NOTE_DIR=/opt/moon-note PORT=8080 bash install.shThen open:
http://localhost:8080
git clone https://github.com/frostmute/moon-note.git
cd moon-note
docker compose up -d --buildOpen:
http://localhost:3000
Requirements: Node.js 18+ and npm.
git clone https://github.com/frostmute/moon-note.git
cd moon-note
npm install
npm startOpen:
http://localhost:3000
From the Moon Note directory:
# View logs
docker compose logs -f
# Stop the app
docker compose down
# Start the app
docker compose up -d
# Rebuild and restart
docker compose up -d --build
# Update to the latest version
git pull
docker compose up -d --buildIf you used the installer, you can update by running:
bash ~/moon-note/install.shMoon Note stores user notes in a single JSON file:
data/notes.json
For the default installer location, that file is:
~/moon-note/data/notes.json
Back it up with:
cd ~/moon-note
cp data/notes.json moon-note-backup-$(date +%Y-%m-%d).json
data/notes.jsonis intentionally ignored by Git so personal notes are not committed to the repository.
| Variable | Default | Description |
|---|---|---|
PORT |
3000 |
Host port for the web app. |
MOON_NOTE_DIR |
~/moon-note |
Install directory used by install.sh. |
MOON_NOTE_REPO_URL |
https://github.com/frostmute/moon-note.git |
Repository URL used by install.sh. |
Examples:
PORT=8080 docker compose up -dMOON_NOTE_DIR=/srv/moon-note PORT=8080 bash install.sh| Shortcut | Action |
|---|---|
Ctrl/Cmd + N |
Create a new note |
Ctrl/Cmd + S |
Save the current note |
Esc |
Close the graph view |
| Method | Route | Description |
|---|---|---|
GET |
/api/notes |
List all notes. |
GET |
/api/notes/:id |
Get one note with computed backlinks. |
POST |
/api/notes |
Create a note. |
PUT |
/api/notes/:id |
Update a note. |
DELETE |
/api/notes/:id |
Delete a note. |
GET |
/api/search?q= |
Search notes. |
GET |
/api/graph |
Get graph nodes and links. |
GET |
/api/stats |
Get note statistics. |
moon-note/
├── Dockerfile
├── docker-compose.yml
├── install.sh
├── package.json
├── server.js
├── store.js
├── data/
│ └── notes.json # created on first launch; ignored by Git
└── public/
├── index.html
├── css/
│ └── style.css
└── js/
├── app.js
├── graph.js
├── markdown.js
└── moonphase.js
No license has been selected yet. Add a license before distributing or accepting contributions widely.

