Notes Sync Share is an Obsidian plugin that allows you to synchronize and share (publish) your notes to your own private service. With this plugin, you can easily sync your Obsidian notes to a self-hosted service and have full control over your data.Notes Sync Share 是一个 Obsidian 插件,它能让您将自己的笔记同步并分享(发布)到您自己的私有服务上。借助此插件,您可以轻松地将 Obsidian 笔记同步到自托管服务,并完全掌控您的数据。
- Sync: Seamlessly sync your Obsidian notes to your private service. Your notes will always be up to date across multiple devices.同步:将您的 Obsidian 笔记无缝同步到您的私人服务。您的笔记将在多个设备上始终保持最新状态。
- Publish and Share: Easily publish and share selected notes to your private service. Share your knowledge with others or collaborate with teammates.发布与分享:轻松将选定的笔记发布并分享到您的私人服务中。与他人分享您的知识或与团队成员协作。
- Privacy and Control: Keep your notes secure and private. Your data is stored in your own self-hosted service, giving you full control over your information.隐私与掌控:保障您的笔记安全且私密。您的数据存储在您自己的自托管服务中,让您完全掌控自己的信息。
Note: Sync and share functions can be used independently, you can use only one of them, for example: just use the share function, and sync function using other obsidian plug-ins to complete is possible.注意:同步和共享功能可以独立使用,您可以只使用其中一个,例如:仅使用共享功能,而使用其他 Obsidian 插件来完成同步功能也是可行的。
- Install the Notes Sync Share plugin in your Obsidian app.在您的 Obsidian 应用程序中安装 Notes Sync Share 插件。
- Deploy back-end services 部署后端服务
- Configure the plugin settings with the URL and credentials of your private service.使用您的私有服务的 URL 和凭证来配置插件设置。
- Choose the notes you want to sync or publish.选择您想要同步或发布的笔记。
- Enjoy seamless synchronization and sharing of your notes.享受笔记的无缝同步与共享。
Try the author's back-end service: , configure this address into your plugin.https://share.alter.run试试作者的后端服务:,将此地址配置到您的插件中。
Note: It is better to use your own deployed services for better privacy protection.注意:为了更好地保护隐私,建议使用您自己部署的服务。
To quickly start the Obsidian Sync Share Server, execute the following command:要快速启动 Obsidian Sync Share 服务器,请执行以下命令:
docker run -d \
--name obsidian-sync-share-server \
-p 80:8080 \
-v "/root/obsidian-sync-share-server/user_store:/app/user_store" \
alterzz/obsidian-sync-share-serverThis command will start a container in the background, mapping port 80 on the host to port 8080 in the container, and mounting the /root/obsidian-sync-share-server/user_store directory on the host to the /app/user_store directory in the container.此命令将在后台启动一个容器,将主机的 80 端口映射到容器的 8080 端口,并将主机上的 /root/obsidian-sync-share-server/user_store 目录挂载到容器内的 /app/user_store 目录。
docker run -d \
--name obsidian-sync-share-server \
-p 443:8080 \
-v "/root/obsidian-sync-share-server/user_store:/app/user_store" \
-v "/root/obsidian-sync-share-server/share.alter.run.jks:/app/cert.jks" \
-e server.ssl.key-store-type=JKS \
-e server.ssl.key-store=/app/cert.jks \
-e server.ssl.key-store-password=xxxx \
alterzz/obsidian-sync-share-serverThis command allows you to specify additional parameters for configuring the server. Here's an explanation of each parameter:此命令允许您指定用于配置服务器的其他参数。以下是每个参数的说明:
- -p 443:8080: Maps port 443 on the host to port 8080 in the container. Modify the host port as needed.-p 443:8080:将主机的 443 端口映射到容器的 8080 端口。如有需要,请修改主机端口。
- -v "/root/obsidian-sync-share-server/user_store:/app/user_store": Mounts the /root/obsidian-sync-share-server/user_store directory on the host to the /app/user_store directory in the container. Adjust the host directory path as required.-v "/root/obsidian-sync-share-server/user_store:/app/user_store": 将主机上的 /root/obsidian-sync-share-server/user_store 目录挂载到容器内的 /app/user_store 目录。根据需要调整主机目录路径。
- -v "/root/obsidian-sync-share-server/share.alter.run.jks:/app/cert.jks": Mounts the share.alter.run.jks file on the host to the /app/cert.jks file in the container. Update the host file path accordingly.-v "/root/obsidian-sync-share-server/share.alter.run.jks:/app/cert.jks": 将主机上的 share.alter.run.jks 文件挂载到容器内的 /app/cert.jks 文件。请相应地更新主机文件路径。
- -e server.ssl.key-store-type=JKS: Sets the SSL key store type to JKS. Modify this if you are using a different type.-e server.ssl.key-store-type=JKS:将 SSL 密钥库类型设置为 JKS。如果您使用的是其他类型,请修改此项。
- -e server.ssl.key-store=/app/cert.jks: Specifies the location of the SSL key store file within the container. Adjust if necessary.-e server.ssl.key-store=/app/cert.jks:指定容器内 SSL 密钥库文件的位置。如有必要,请进行调整。
- -e server.ssl.key-store-password=xxxx: Sets the password for the SSL key store. Replace xxxx with the actual password.-e server.ssl.key-store-password=xxxx:设置 SSL 密钥库的密码。请将 xxxx 替换为实际密码。
limit memory 限制内存
-e JAVA_OPTS=-Xmx512m
Modify the default branch name of git, which is master by default, The following example sets the default branch name to main修改 Git 的默认分支名称,默认情况下是 master,以下示例将默认分支名称设置为 main。
echo "[init] \n defaultBranch = main" > ~/gitconfig_temp
docker cp ~/gitconfig_temp obsidian-sync-share-server:~/.gitconfigDisable or allow automatic registration operations禁用或启用自动注册操作
# Creating a file named `registration_lock` and placing it in the same directory as the program will disable automatic registration.
docker exec obsidian-sync-share-server touch /app/registration_lock
# Deleting this file will allow automatic registration
docker exec obsidian-sync-share-server rm /app/registration_lock
Use your server ip or domain name to access your service, the port is the listening port configured in docker earlier使用您的服务器 IP 地址或域名来访问您的服务,端口是之前在 Docker 中配置的监听端口。
http://{your server ip} http://{您的服务器 IP 地址}
or 或
https://{your server ip} https://{您的服务器 IP 地址}
docker stop obsidian-sync-share-server
docker rm obsidian-sync-share-server
# rebuild
# ...
# view Log
docker logs obsidian-sync-share-serverplease visit the obsidian-sync-share-web.请访问 obsidian-sync-share-web。
please visit the obsidian-sync-share-server.请访问 Obsidian 同步共享服务器。
Please go to the plugin configuration page and configure the following configuration.请前往插件配置页面并配置以下设置。
Note: Force push is used every time you sync注意:每次同步时都会使用强制推送。
- Remote Git repository address远程 Git 仓库地址
- Username and AccessToken 用户名和访问令牌
- Open the GitHub website and log in to your account.打开 GitHub 网站并登录您的账户。
- Click on your profile picture in the top right corner and select "Settings".点击右上角您的个人资料图片,然后选择“设置”。
- In the left sidebar, choose "Developer settings".在左侧边栏中,选择“开发者设置”。
- In the left sidebar, select "Personal access tokens".在左侧边栏中,选择“个人访问令牌”。
- Click on "Generate new token".点击“生成新令牌”。
- Enter a descriptive name in the "Note" field to remember the purpose of this access token.在“备注”字段中输入一个描述性的名称,以便记住此访问令牌的用途。
- Select the desired permissions from the list (e.g., read repository, write repository, etc.).从列表中选择所需的权限(例如,读取存储库、写入存储库等)。
- Click "Generate token" at the bottom of the page.点击页面底部的“生成令牌”。
- Copy the generated access token.复制生成的访问令牌。
- Open the GitLab website and log in to your account.打开 GitLab 网站并登录您的账户。
- Click on your profile picture in the top right corner and select "Settings".点击右上角您的个人资料图片,然后选择“设置”。
- In the left sidebar, choose "Access Tokens".在左侧边栏中,选择“访问令牌”。
- Enter a descriptive name in the "Name" field to remember the purpose of this access token.在“名称”字段中输入一个描述性的名称,以便记住此访问令牌的用途。
- In the "Scopes" section, select the desired permissions (e.g., API, repositories, etc.).在“范围”部分,选择所需的权限(例如,API、仓库等)。
- Click "Create personal access token" at the bottom of the page.点击页面底部的“创建个人访问令牌”。
- Copy the generated access token.复制生成的访问令牌。
Q: Delete files: /app/user_store/{username}/sync_lock can be unlocked manually. The above is the path for docker deployment. If it is deployed manually, please search for the file in the directory you specified manually.问:删除文件:/app/user_store/{用户名}/sync_lock 可以手动解锁。 以上是 Docker 部署的路径。如果是手动部署,请在您手动指定的目录中查找该文件。
If the problem occurs again after unlocking, it means there is a problem in your synchronization process. A common situation is that when using a reverse proxy (nginx), the uploaded file size exceeds the limit when using the default configuration. There may also be other problems, you can use docker logs obsidian-sync-share-server to view the error stack. If it is convenient, you can send it to me and I will analyze the specific problem.如果解锁后问题再次出现,这意味着您的同步过程中存在问题。常见的情况是,在使用反向代理(nginx)时,上传文件的大小超过了默认配置的限制。也可能存在其他问题,您可以使用 `docker logs obsidian-sync-share-server` 查看错误堆栈。如果方便的话,您可以将其发给我,我会分析具体的问题。
Q: Don't use wikilinks 问:不要使用维基链接
If you encounter any issues, have suggestions, or would like to contribute to the development of Notes Sync Share, please visit the GitHub repository. Your feedback and contributions are highly appreciated.如果您遇到任何问题、有任何建议,或者想要为 Notes Sync Share 的开发贡献力量,请访问 GitHub 代码库。您的反馈和贡献我们深表感激。
This plugin is released under the MIT License.此插件依据 MIT 许可证发布。
Notes Sync Share is not affiliated with or endorsed by Obsidian or the Obsidian team. It is an independent plugin developed by Alt-er.Notes Sync Share 与 Obsidian 或 Obsidian 团队没有关联,也未得到其认可。它是由 Alt-er 开发的独立插件。



