banner
lca

lca

真正的不自由,是在自己的心中设下牢笼。

Modified version of memos installation

I watched a video by the Bilibili user 嘎嘎 Vespa on Bilibili, titled How to Use Memos for Card Note Knowledge Management (Part 1), and I think using Memos for card note taking is great. I also recently watched a video on the "highest practical use of knowledge," which discussed the importance of not only inputting knowledge but also outputting it. Outputting helps to understand the knowledge learned. If you only focus on inputting, you won't remember anything and won't be able to deeply understand. The author said, "Input is just a form of 'self-satisfaction.' What truly correlates with 'self-growth' is the output."

So I decided to use Memos to record some of my output thoughts. I used the Memos plugin in Obsidian before, but it lacked some functionality. Therefore, I decided to try the modified version of Memos provided by the author, although it is not as powerful as the original.

Image

Installation#

I downloaded the modified version from:

To install it using Docker, use the following two commands:

docker build -t lca/memos:latest .
docker run -d --name memos -p 5230:5230 -v ~/.memos/:/var/opt/memos lca/memos:latest

To synchronize data across different computers, store the data files in iCloud (optional)

docker build -t lca/memos:latest .
docker run -d --name memos -p 5230:5230 -v ~/Documents/memos/:/var/opt/memos lca/memos:latest

Reference: https://www.usememos.com/blog/syncing-data-with-icloud

Data Backup#

Simply copy the files or download them as a package from the server.

cp -r ~/.memos/memos_prod.db ~/.memos/memos_prod.db.bak

Data Recovery (Using iCloud as an example)#

Replace the latest Memos data file with the newly created Docker repository.

These are the files, with the most important one being the .db file.

image

  1. Backup the data

tar -czvf /root/sys_backup/backup$(date +%Y%m%d).tar.gz ~/.memos

  1. Download and extract the data from the server to a local directory. If using iCloud, the directory would be ~/Documents/memos.

image

If it's the first time running docker run locally, simply place the latest backup data in ~/Documents/memos. If there are subsequent updates, replace the backup data in ~/Documents/memos and pause the Docker container first.

docker stop <memos container ID>

After copying is complete, restart the container.

docker start <memos container ID>

Official version of Memos
https://www.usememos.com/docs/install/self-hosting


Installation on Ubuntu on VPS#

Deployment on the server

Set the Go proxy environment variable

go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct

Add it to the Dockerfile

image

If the speed of go build is slow, you can also set the go proxy.

Image source: https://wallhaven.cc/w/2y6wwg

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.