ScriptsJul 6, 2026·3 min read

Flatnotes — Self-Hosted Database-Free Markdown Notes

Flatnotes is a lightweight, self-hosted note-taking web app that stores notes as plain Markdown files in a flat folder — no database required, with full-text search and TOTP authentication.

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 29/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Stage only
Trust
Trust: Established
Entrypoint
Flatnotes Overview
Safe staging command
npx -y tokrepo@latest install 3e115cb7-78d1-11f1-9bc6-00163e2b0d79 --target codex

Stages files first; activation requires review of the staged README and plan.

Introduction

Flatnotes is a note-taking web application that stores everything as plain Markdown files on disk. There is no database to configure, back up, or migrate. You get a clean web editor, full-text search, and tagging — all backed by files you can read, edit, and version-control with standard tools.

What Flatnotes Does

  • Provides a web-based Markdown editor with live preview
  • Stores all notes as .md files in a single flat directory
  • Supports full-text search across all notes
  • Organizes notes with a tag-based system
  • Offers password and TOTP-based authentication

Architecture Overview

Flatnotes is built with a Python (Flask) backend and a Vue.js frontend. Notes are read from and written to a mounted directory as plain Markdown files. Search is implemented using Whoosh, a pure-Python full-text search library that indexes the note directory. The entire application runs as a single container with no external dependencies.

Self-Hosting & Configuration

  • Deploy with a single Docker command
  • Mount a directory for note storage — that is the entire data layer
  • Configure authentication via environment variables
  • Supports password auth, TOTP two-factor, or no auth for local use
  • Back up notes by copying the mounted directory

Key Features

  • Zero-database architecture — notes are plain files
  • Notes are portable and readable outside the application
  • Full-text search with instant results
  • Tag-based organization without rigid folder hierarchies
  • Minimal resource footprint suitable for low-powered servers

Comparison with Similar Tools

  • Trilium Notes — rich hierarchical notes with a database; Flatnotes is simpler and database-free
  • Joplin — sync-focused with E2E encryption; Flatnotes is server-only with file-based storage
  • Obsidian — desktop-first with a plugin ecosystem; Flatnotes is web-first and self-hosted
  • HedgeDoc — real-time collaborative editing; Flatnotes is single-user focused
  • Memos — micro-note and timeline format; Flatnotes uses full Markdown documents

FAQ

Q: Can I edit notes outside of the web interface? A: Yes. Notes are plain Markdown files. Edit them with any text editor or sync them with Git.

Q: Does it support multiple users? A: It supports a single authenticated user. Multi-user is not a design goal.

Q: How does search work without a database? A: Flatnotes uses Whoosh, a Python-based search library that maintains a local index of the note directory.

Q: Can I migrate from another note app? A: If your existing notes are in Markdown format, copy them into the data directory and they will appear immediately.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets