Memos Self-Hosted Note App: Lightweight Markdown and API-First

6月7日 Published inNote-taking tool

Memos is a lightweight, open-source note-taking application designed for those who prefer to host their own tools. It provides native Markdown support and extensive customization options.

  • Data Ownership: You retain full control over your information. Everything is stored in the database of your choice—be it on a local disk or your own cloud server.
  • Privacy-First: As a self-hosted solution, the application operates entirely within your infrastructure and follows your specific access rules.
  • No External Dependencies: Memos runs without "phoning home" or requiring connections to outside services.
  • Speed and Simplicity: The interface is built for quick entry; notes are saved as you type.
  • Markdown Support: Features full rendering and syntax highlighting for clean, organized notes.
  • Rich Media: Seamlessly handles images, links, and embedded content.
  • Technical Stack: The backend is built with Go, while the frontend utilizes React for a responsive, modern experience.
  • Minimal Footprint: Designed to be light on resources, it runs efficiently on Linux, macOS, Windows, or within containers.
  • Customization: Easily swap themes, modify server settings, and adjust page layouts to suit your workflow.
  • API-First Architecture: RESTful endpoints with clear documentation allow for easy integration with other tools.
  • Database Flexibility: Supports SQLite, PostgreSQL, and MySQL.
  • Open Source: No license fees, no subscriptions, and no arbitrary usage limits.

Installing Memos

Prerequisites

  • Docker or Docker Compose installed.
  • A minimum of 512MB RAM and 1GB of free disk space.

Docker (Quick Start)

# Create a directory for your data
mkdir -p ~/.memos

# Run the container
docker run -d \
  --name memos \
  --restart unless-stopped \
  -p 5230:5230 \
  -v ~/.memos:/var/opt/memos \
  neosmemo/memos:stable

Navigate to http://localhost:5230 in your browser and follow the initial setup prompts.

Docker Compose

# docker-compose.yml
version: "3.8"

services:
  memos:
    image: neosmemo/memos:stable
    container_name: memos
    restart: unless-stopped
    ports:
      - "5230:5230"
    volumes:
      - ./data:/var/opt/memos
    environment:
      - MEMOS_MODE=prod
      - MEMOS_PORT=5230

To launch, run: docker-compose up -d.

Note: Your data directory (~/.memos or ./data) contains all your notes and settings. Ensure you back it up regularly. Windows users should refer to the official documentation for specific path formatting.

Installation Options

Container Deployments

  • Docker Hub: Use the official image at neosmemo/memos.
  • GitHub Container Registry: An alternative mirror for the same image.
  • Kubernetes: Deploy via available Helm charts or standard YAML manifests.

Binary Releases

Pre-compiled binaries for Linux, macOS, and Windows can be found on the GitHub Releases page.

Building from Source

  • Go Build: Requires Go version 1.24 or newer.
  • Development Mode: Supports local development with hot-reloading enabled.

Setting Up a Development Environment

Prerequisites

  • Go 1.24+
  • Node.js 22+ and pnpm
  • Git

Backend Development

# Clone the repository
git clone https://github.com/usememos/memos.git
cd memos

# Download dependencies
go mod download

# Start the backend development server
go run ./bin/memos/main.go --mode dev --port 8081

Frontend Development

# Navigate to the web directory
cd web

# Install dependencies
pnpm install

# Start the frontend development server
pnpm dev

Development Access Points:

  • Backend API: http://localhost:8081
  • Frontend UI: http://localhost:3001