Web Mini Note 是一个极简、轻量级的在线笔记应用,使用 Rust 编写,编译后仅约 3MB 大小!支持实时保存、Markdown 渲染、文件上传、二维码分享等功能。
- 🚀 超轻量: 编译后仅约 3MB,资源占用极低
- ⚡ 实时保存: 自动保存笔记内容,无需手动操作
- 📱 响应式设计: 支持桌面和移动设备
- 🎨 Markdown 支持: 实时预览和渲染
- 📎 文件上传: 支持图片和文件上传(最大10MB)
- 🔗 url分享: 一键复制URL
- 📜 历史记录: 查看最近访问的笔记
- 🎯 快捷键: 支持 Ctrl+S 保存等快捷操作
- 🔒 隐私保护: 本地部署,数据完全可控



- 后端: Rust + Axum 框架
- 前端: 原生 JavaScript + HTML5
- 容器: Docker 支持
- 依赖: 极少的第三方依赖,编译产物小巧
# 拉取镜像并运行
docker run -d \
--name web-mini-note \
-p 8080:8080 \
-v $(pwd)/data:/app/_tmp \
5dprince/web-mini-note
# 访问 http://localhost:8080
# 克隆项目
git clone <repository-url>
cd web-mini-note
# 构建(需要 Rust 环境)
cargo build --release
# 运行
./target/release/web-mini-note-rust
# 构建镜像
docker build -t web-mini-note .
# 运行容器
docker run -d \
--name web-mini-note \
-p 8080:8080 \
-v $(pwd)/data:/app/_tmp \
web-mini-note
变量名 | 默认值 | 说明 |
---|---|---|
PORT |
8080 | 服务端口 |
SAVE_PATH |
_tmp | 笔记保存路径 |
FILE_LIMIT |
100000 | 最大文件数量限制 |
SINGLE_FILE_SIZE_LIMIT |
1024 | 单文件大小限制(字节) |
STATIC_ROOT |
. | 静态资源根目录 |
- 创建笔记: 访问首页自动生成随机笔记ID
- 编辑内容: 在文本框中输入内容,自动保存
- Markdown: 点击 🔓 切换到预览模式
- 文件上传: 点击 ⤴ upload 上传图片或文件
- 分享: 点击 🔗 share 生成二维码分享
- 历史: 点击 📜 history 查看最近笔记
- 快捷键:
Ctrl+S
: 手动保存Ctrl+Enter
: 切换预览模式
GET /
- 重定向到随机笔记GET /{note}
- 获取笔记内容POST /{note}
- 保存笔记内容POST /upload
- 上传文件GET /_tmp/{file}
- 访问上传的文件
项目支持多种部署方式:
- 直接运行: 编译后的二进制文件可直接运行
- Docker: 使用提供的 Dockerfile 构建镜像
- 反向代理: 可配合 Nginx 等反向代理使用
欢迎提交 Issue 和 Pull Request!
Web Mini Note is a minimalist, lightweight online note-taking application written in Rust, with a compiled size of only ~3MB! It supports real-time saving, Markdown rendering, file uploads, QR code sharing, and more.
- 🚀 Ultra Lightweight: Only ~3MB compiled size with minimal resource usage
- ⚡ Real-time Saving: Auto-save note content without manual operations
- 📱 Responsive Design: Supports both desktop and mobile devices
- 🎨 Markdown Support: Real-time preview and rendering
- 📎 File Upload: Support image and file uploads (max 10MB)
- 🔗 Sharing: One-click for sharing
- 📜 History: View recently accessed notes
- 🎯 Keyboard Shortcuts: Support Ctrl+S save and other shortcuts
- 🔒 Privacy Protection: Self-hosted with full data control
- Backend: Rust + Axum framework
- Frontend: Vanilla JavaScript + HTML5
- Container: Docker support
- Dependencies: Minimal third-party dependencies for small binary size
# Pull and run the image
docker run -d \
--name web-mini-note \
-p 8080:8080 \
-v $(pwd)/data:/app/_tmp \
-e PORT=8080 \
-e SAVE_PATH=_tmp \
-e FILE_LIMIT=100000 \
-e SINGLE_FILE_SIZE_LIMIT=10240 \
--restart always \
5dprince/web-mini-note
# Access http://localhost:8080
# Clone the project
git clone <repository-url>
cd web-mini-note
# Build (requires Rust environment)
cargo build --release
# Run
./target/release/web-mini-note-rust
# Build image
docker build -t web-mini-note .
# Run container
docker run -d \
--name web-mini-note \
-p 8080:8080 \
-v $(pwd)/data:/app/_tmp \
web-mini-note
Variable | Default | Description |
---|---|---|
PORT |
8080 | Service port |
SAVE_PATH |
_tmp | Notes save path |
FILE_LIMIT |
100000 | Maximum file count limit |
SINGLE_FILE_SIZE_LIMIT |
10240 | Single file size limit (bytes) |
STATIC_ROOT |
. | Static resources root directory |
- Create Note: Visit homepage to auto-generate random note ID
- Edit Content: Type in the text area, auto-saves content
- Markdown: Click 🔓 to switch to preview mode
- File Upload: Click ⤴ upload to upload images or files
- Share: Click 🔗 share to generate QR code for sharing
- History: Click 📜 history to view recent notes
- Shortcuts:
Ctrl+S
: Manual saveCtrl+Enter
: Toggle preview mode
GET /
- Redirect to random noteGET /{note}
- Get note contentPOST /{note}
- Save note contentPOST /upload
- Upload fileGET /_tmp/{file}
- Access uploaded files
The project supports multiple deployment methods:
- Direct Run: Compiled binary can run directly
- Docker: Use provided Dockerfile to build image
- Reverse Proxy: Can be used with Nginx or other reverse proxies
Issues and Pull Requests are welcome!
MIT License
Thanks to all contributors and the Rust community for making this lightweight note-taking solution possible!
特别感谢以下开源项目的启发和贡献:
- @pereorga/minimalist-web-notepad - 经典的极简网页记事本实现
- @Lincest/web-note - minimalist-web-notepad 的优秀改进版本
Special thanks to the following open source projects for inspiration and contributions:
- @pereorga/minimalist-web-notepad - Classic minimalist web notepad implementation
- @Lincest/web-note - Excellent improved version of minimalist-web-notepad