Use MinIO
object storage for Obsidian sync.
1 Install MinIO
server
Use docker to install MinIO
server, run the following script:
docker run -p 8090:8090 -p 8091:8091 \
-name minio \
d --restart=always \
e "MINIO_ACCESS_KEY=minioadmin" \
e "MINIO_SECRET_KEY=minioadmin" \
v /home/chinglin/fastdata/.minio/data:/data \
v /home/chinglin/fastdata/.minio/config:/root/.minio \
minio/minio server \
/data --console-address ":8090" -address ":8091"
MINIO_ACCESS_KEY
andMINIO_SECRET_KEY
: by default isminioadmin
andminioadmin
, it is not a must to reconfig it.- console address
8090
to configure the whole service - address
8091
to access the files, minio client will use these ports.
Besides, the firewall port should be opened if you want to get access outside such as http://server_ip:8090
.
2 MinIO
client
2.1 Installation
Follow the instructions here.
mac client
brew install minio/stable/mc
linux client
dnf install https://dl.minio.org.cn/client/mc/release/linux-amd64/mcli-20230128202938.0.0.x86_64.rpm
mcli alias set myminio/ http://MINIO-SERVER MYUSER MYPASSWORD
2.2 configuration
Go localhost:8090, to create a bucket named bucket_name
. Get the access_key
and access_secret_key
.
Set alias:
mc alias set alias_name oss_url access_key access_secret_key
2.3 basic operation
list the bucket info
mc ls alias_name/bucket_name
download the files
mc cp alias_name/bucket_name/file_name local_path
upload the file
mc cp local_path alias_name/bucket_name/
remove the file
mc rm alias_name/bucket_name/file_name
3 Configure for Obsidian
Install third-party plug-in remotely-save for obsidian.
Choose s3 as remote save tool.
set the bucket name as localhost:8091/bucket_name region set as default value
Summary
Install MinIO
server, get access with MinIO
client, configure for Obsidian.