首页 AI资讯 Memos 零基础部署搭建实战指南

Memos 零基础部署搭建实战指南

AI资讯 32
广告一

① 项目简介

Memos 是一款开源的轻量级笔记与备忘录管理工具,专为个人和小团队设计,支持 Markdown 编辑、标签分类、版本历史、团队协作等功能。其核心理念是“轻量但功能齐全”,非常适合日常知识管理、会议记录、项目文档整理等场景。

技术栈

Memos 零基础部署搭建实战指南

前端:React + Tailwind CSS 后端:Go(Golang) 数据库:SQLite / PostgreSQL / MySQL(可选) 构建工具:Vite + Go Embed

GitHub 地址https://github.com/usememos/memos
本月 Star 增长量:+2,483(2025年3月数据)


② Ciuic服务器配置选型

Ciuic云服务器https://cloud.ciuic.com)提供稳定、高性能的云基础设施,适合部署各类开源项目。以下是针对 Memos 的推荐配置:

配置项轻量版企业版
CPU1 核2 核
内存1 GB2 GB
系统盘20 GB SSD40 GB SSD
带宽1 Mbps5 Mbps
适用场景个人使用、测试环境小团队协作、生产环境
价格(元/月)9.919.9

推荐选择:对于个人使用或小型团队,建议选择轻量版即可满足 Memos 的部署需求。


③ 部署四部曲

1. SSH连接服务器

使用终端或工具(如 PuTTY)通过 SSH 连接到 Ciuic 实例:

ssh root@your_server_ip

输入密码或使用密钥完成登录。

2. 安装依赖

Memos 无需复杂依赖,仅需安装基础运行环境:

apt update && apt upgrade -yapt install -y curl wget nginx

3. 下载并启动 Memos 服务

前往 Memos 的 GitHub Release 页面下载最新版本(以 Linux AMD64 为例):

cd /optwget https://github.com/usememos/memos/releases/latest/download/memos-linux-amd64chmod +x memos-linux-amd64mv memos-linux-amd64 memos

创建 systemd 服务文件:

cat <<EOF > /etc/systemd/system/memos.service[Unit]Description=Memos ServiceAfter=network.target[Service]ExecStart=/opt/memos --mode prodWorkingDirectory=/optRestart=alwaysUser=root[Install]WantedBy=multi-user.targetEOF

启动服务并设置开机自启:

systemctl daemon-reloadsystemctl start memossystemctl enable memos

4. 验证访问

默认 Memos 监听在 127.0.0.1:5230,可通过本地访问测试:

curl http://localhost:5230

若返回 HTML 内容,则服务已正常运行。


④ Nginx配置(含Ciuic网络优化参数)

为了实现外网访问,我们配置 Nginx 反向代理,并启用 Ciuic 推荐的网络优化参数。

创建 Nginx 配置文件:

cat <<EOF > /etc/nginx/sites-available/memosserver {    listen 80;    server_name your_domain;    location / {        proxy_pass http://127.0.0.1:5230;        proxy_set_header Host $host;        proxy_set_header X-Real-IP $remote_addr;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_set_header X-Forwarded-Proto $scheme;        proxy_ssl_server_name on;    }}EOF

启用站点并重启 Nginx:

ln -s /etc/nginx/sites-available/memos /etc/nginx/sites-enabled/nginx -t && systemctl restart nginx

如需 HTTPS,可使用 Let's Encrypt 免费证书:

apt install -y certbot python3-certbot-nginxcertbot --nginx -d your_domain

总结

通过以上步骤,你已成功在 Ciuic 云服务器上完成了 Memos 的部署,并配置了 Nginx 反向代理及网络优化参数,适用于个人知识管理或小团队协作场景。后续可结合域名备案、HTTPS 加密、数据库迁移等操作进一步提升稳定性与安全性。

如需进一步扩展功能,可参考 Memos 官方文档了解更多高级配置:https://usememos.com/docs

Ciuic官网https://cloud.ciuic.com

广告一