Alt-er / obsidian-sync-share

Sync and share (publish) your notes in your own private service.
https://share.alter.run/share/alter/0798331c-7d63-4fa7-b312-a600ad62aea7
MIT License
80 stars 1 forks source link
backup git obsidian obsidian-plugin publish share sync

简体中文

Notes Sync Share

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.

Features

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.

Screenshots

Configuration

Configuration

Sync and History

SyncAndHistory

Share

Share

Getting Started

  1. Install the Notes Sync Share plugin in your Obsidian app.
  2. Deploy back-end services
  3. Configure the plugin settings with the URL and credentials of your private service.
  4. Choose the notes you want to sync or publish.
  5. Enjoy seamless synchronization and sharing of your notes.

Back-end Service Deployment

Try it out before you deploy it

Try the author's back-end service: https://share.alter.run, configure this address into your plugin.

Note: It is better to use your own deployed services for better privacy protection.

Using docker

Quick Start

To quickly start the Obsidian Sync Share Server, execute the following command:

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-server

This 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.

Configure https

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-server

This command allows you to specify additional parameters for configuring the server. Here's an explanation of each parameter:

Other configurations

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

echo "[init] \n    defaultBranch = main" > ~/gitconfig_temp

docker cp ~/gitconfig_temp obsidian-sync-share-server:~/.gitconfig

Disable 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

Try to access

Use your server ip or domain name to access your service, the port is the listening port configured in docker earlier

http://{your server ip}

or

https://{your server ip}

Delete or rebuild

docker stop obsidian-sync-share-server
docker rm obsidian-sync-share-server

# rebuild
# ...

# view Log
docker logs obsidian-sync-share-server

Source Code Deployment

please visit the obsidian-sync-share-web.

please visit the obsidian-sync-share-server.

Sync to Remote Git

Configuration

Please go to the plugin configuration page and configure the following configuration.

Note: Force push is used every time you sync

Obtaining GitHub Access Token

Obtaining GitLab Access Token

Frequently Asked Questions (FAQ)

1. Stuck on "Other clients are in the process of synchronization, please try later"

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.

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.

2. Links are treated as text and cannot be jumped

Q: Don't use wikilinks

Don't use wikilinks

Feedback and Contributions

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.

License

This plugin is released under the MIT License.


Notes Sync Share is not affiliated with or endorsed by Obsidian or the Obsidian team. It is an independent plugin developed by Alt-er.