Fixes #5612, #5611 Root cause: PostgreSQL's jsonb_array_elements() throws errors when the 'tokens' key is missing or malformed, while SQLite/MySQL return NULL gracefully. This caused: - 502 errors when creating admin after v0.25.3 → v0.26.0 upgrade - Settings not persisting and users unable to stay logged in Changes to store/db/postgres/user_setting.go: - Remove strict JSONB operations from GetUserByPATHash query - Fetch all PERSONAL_ACCESS_TOKENS rows and filter in Go - Skip malformed/invalid JSON rows with continue (error recovery) - Match SQLite/MySQL's forgiving error handling New integration tests (store/test/user_setting_test.go): - TestUserSettingGetUserByPATHashNoTokensKey - TestUserSettingGetUserByPATHashEmptyTokensArray - TestUserSettingGetUserByPATHashWithOtherUsers New PostgreSQL-specific tests (store/db/postgres/user_setting_test.go): - TestGetUserByPATHashWithMissingData (comprehensive edge cases) - TestGetUserByPATHashPerformance (100+ users) - TestUpsertUserSetting (basic upsert) Test coverage: ✅ Missing PERSONAL_ACCESS_TOKENS key ✅ Empty/malformed JSON data ✅ Multiple users with mixed valid/invalid data ✅ Performance with 100+ users ✅ Error recovery without crashes Benefits: - No database migration required (TEXT column works fine) - Backward compatible with v0.25.3 upgrades - Handles missing/corrupt data gracefully - Consistent behavior across all database drivers |
||
|---|---|---|
| .github | ||
| cmd/memos | ||
| internal | ||
| plugin | ||
| proto | ||
| scripts | ||
| server | ||
| store | ||
| web | ||
| .dockerignore | ||
| .gitignore | ||
| .golangci.yaml | ||
| AGENTS.md | ||
| CODEOWNERS | ||
| LICENSE | ||
| README.md | ||
| SECURITY.md | ||
| go.mod | ||
| go.sum | ||
README.md
Memos
An open-source, self-hosted note-taking service. Your thoughts, your data, your control — no tracking, no ads, no subscription fees.
💎 Featured Sponsors
Warp — The AI-powered terminal built for speed and collaboration
TestMu AI - The world’s first full-stack Agentic AI Quality Engineering platform
Overview
Memos is a privacy-first, self-hosted knowledge base that works seamlessly for personal notes, team wikis, and knowledge management. Built with Go and React, it offers lightning-fast performance without compromising on features or usability.
Why choose Memos over cloud services?
| Feature | Memos | Cloud Services |
|---|---|---|
| Privacy | ✅ Self-hosted, zero telemetry | ❌ Your data on their servers |
| Cost | ✅ Free forever, MIT license | ❌ Subscription fees |
| Performance | ✅ Instant load, no latency | ⚠️ Depends on internet |
| Ownership | ✅ Full control & export | ❌ Vendor lock-in |
| API Access | ✅ Full REST + gRPC APIs | ⚠️ Limited or paid |
| Customization | ✅ Open source, forkable | ❌ Closed ecosystem |
Features
-
🔒 Privacy-First Architecture
- Self-hosted on your infrastructure with zero telemetry
- Complete data ownership and export capabilities
- No tracking, no ads, no vendor lock-in
-
📝 Markdown Native
- Full markdown support
- Plain text storage — take your data anywhere
-
⚡ Blazing Fast
- Built with Go backend and React frontend
- Optimized for performance at any scale
-
🐳 Simple Deployment
- One-line Docker installation
- Supports SQLite, MySQL, and PostgreSQL
-
🔗 Developer-Friendly
- Full REST and gRPC APIs
- Easy integration with existing workflows
-
🎨 Beautiful Interface
- Clean, minimal design and dark mode support
- Mobile-responsive layout
Quick Start
Docker (Recommended)
docker run -d \
--name memos \
-p 5230:5230 \
-v ~/.memos:/var/opt/memos \
neosmemo/memos:stable
Open http://localhost:5230 and start writing!
Try the Live Demo
Don't want to install yet? Try our live demo first!
Other Installation Methods
- Docker Compose - Recommended for production deployments
- Pre-built Binaries - Available for Linux, macOS, and Windows
- Kubernetes - Helm charts and manifests available
- Build from Source - For development and customization
See our installation guide for detailed instructions.
Contributing
We welcome contributions of all kinds! Whether you're fixing bugs, adding features, improving documentation, or helping with translations — every contribution matters.
Ways to contribute:
- 🐛 Report bugs
- 💡 Suggest features
- 🔧 Submit pull requests
- 📖 Improve documentation
- 🌍 Help with translations
Sponsors
Love Memos? Sponsor us on GitHub to help keep the project growing!
Star History
License
Memos is open-source software licensed under the MIT License.
Privacy Policy
Memos is built with privacy as a core principle. As a self-hosted application, all your data stays on your infrastructure. There is no telemetry, no tracking, and no data collection. See our Privacy Policy for details.
Website • Documentation • Demo • Discord • X/Twitter