快速入门:搭建您自己的 Memos 备忘录 or Memos 微博 2024-04-06 默认分类,服务搭建 1 条评论 991 次阅读 ## 1. Memos 介绍 > Memos 是一项隐私优先的轻量级笔记服务。 > - **Open source and free forever**. Embrace a future where creativity knows no boundaries with our open-source solution – free today, tomorrow, and always. > 开源且永久免费。通过我们的开源解决方案拥抱创造力无国界的未来——今天、明天、永远免费。 > - **Self-hosting with Docker in just seconds**. Enjoy the flexibility, scalability, and ease of setup that Docker provides, allowing you to have full control over your data and privacy. > 只需几秒钟即可使用 Docker 进行自托管。享受 Docker 提供的灵活性、可扩展性和易于设置的优势,让您能够完全控制您的数据和隐私。 > - **Pure text with added Markdown support.** Say goodbye to the overwhelming mental burden of rich formatting and embrace a minimalist approach. > 添加了 Markdown 支持的纯文本。告别丰富格式带来的压倒性精神负担,拥抱极简主义方法。 > - **Customize and share your notes effortlessly**. With our intuitive sharing features, you can easily collaborate and distribute your notes with others. > 轻松定制和分享您的笔记。借助我们直观的共享功能,您可以轻松地与其他人协作和分发您的笔记。 > - **RESTful API for third-party services.** Embrace the power of integration and unleash new possibilities with our RESTful API support. > 用于第三方服务的 RESTful API。借助我们的 RESTful API 支持,拥抱集成的力量并释放新的可能性。 ## 2. Memos 相关链接 - Memos的Github:https://github.com/usememos/memos - Memos的官网:https://www.usememos.com/ - Memos文档链接:https://www.usememos.com/docs - Memos手机端下载:https://memos.moe/ - 参考文章:https://www.skyue.com/23021116.html - 参考例子(一个博主自己搭建的):https://memos.skyue.com/explore ## 3. 前置工作 - 准备VPS或者其他设备 - 域名(非必须) - 反向代理(非必须) ## 4. 安装 ### 4.1 安装Docker、Docker-compose 此处省略,请自行安装好docker、docker-compose,目前Memos只支持docker启动 ### 4.2 创建安装目录 ```bash mkdir -p /root/data/docker_data/memos ``` ```bash cd /root/data/docker_data/memos ``` ### 4.3 Docker安装 #### 4.3.1 命令方式 官方有提供docker命令方式进行启动,链接如下:https://www.usememos.com/docs/install/self-hosting ```bash docker run -d --name memos -p 5230:5230 -v ./memos/:/var/opt/memos neosmemo/memos:stable ``` #### 4.3.2 docker-compose.yml方式 由于我个人喜欢使用docker-compose.yml文件方式,所以我演示会使用yml文件方式进行演示。 以下是官方提供的docker-compose.yml文件(我把volumes存储路径做了一下修改,放在本地目录) ```yml version: "3.0" services: memos: image: neosmemo/memos:stable container_name: memos volumes: - ./memos/:/var/opt/memos ports: - 5230:5230 ``` 官方默认使用的数据库是使用的SQLite,我查看官方文档,可以换成Mysql或者Postgres数据库。以下是我参考官方命令使用Postgres数据库(官方只提供了使用Mysql或者Postgres数据库的命令启动方式),利用Chagpt来生成的docker-compose.yml文件 ```yml version: '3' services: memos: image: neosmemo/memos:stable ports: - "5230:5230" volumes: - ./memos:/var/opt/memos environment: - DATABASE_URL=postgresql://postgres:PASSWORD@postgres:5432/memos depends_on: - postgres postgres: image: postgres:latest environment: - POSTGRES_PASSWORD=postgres volumes: - ./postgres_data:/var/lib/postgresql/data ``` ### 4.4 运行 ```bash docker-compose up -d ``` ## 5.使用 ### 5.1 创建账户  ### 5.2 系统设置  ### 5.3 发布  ### 5.4 未登录页面  ### 5.5 手机端APP使用   ## 6.总结 个人感觉像是一个备忘录的项目,也可以拿来当作微博来使用(我看有个博主是这样操作的),不过个人感觉基本功能是有的,就是app手机端还不是很完善,因为我觉得如果当作备忘录或者微博来使用,有一个使用比较良好的手机端我感觉是必要的。目前来说,手机端的使用稍微逊色了一点,可以再进行优化。后续如果自己想深入使用,可以再多给大家分享一下里面的细节。 打赏: 微信, 支付宝 标签: VPS 本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
博主真是太厉害了!!!