-
Notifications
You must be signed in to change notification settings - Fork 55
Plugin Installation
In order for your new self-hosted Publish and Sync server to function properly, you must install a plugin to your copy of Obsidian.md
Navigate to your vault's .obsidian folder:
cd /path/to/vault/.obsidianCreate a new folder for the plugin and enter the folder:
mkdir -p plugins/custom-sync-plugin && cd plugins/custom-sync-pluginUse wget to download the plugin files:
wget https://github.com/acheong08/rev-obsidian-sync-plugin/raw/master/main.js https://github.com/acheong08/rev-obsidian-sync-plugin/raw/master/manifest.jsonTo manually get the latest copy of the unofficial Obi-Sync Plugin, download here.
- Navigate to the folder where your vault is on your local machine, and enter the
.obsidian\plugins\folder. - Create a new folder:
custom-sync-plugin - Inside the
custom-sync-pluginfolder, install the plugin files:- 📄
main.js - 📄
manifest.json
- 📄
Note
Alternatively, you can use https://github.com/TfTHacker/obsidian42-brat which can be found in the official community plugins list.
Once the plugin is installed, activate it by launching Obsidian.md.
- Open
Obsidian Settings
- On left menu, click
Community Plugins - Scroll down to
Custom Native Syncand enable
- To the left of the enable button for
Custom Native Sync, press the options
button. - Configure the
Obsidian Sync URLin the Plugin settings after setting up your sync server- By default, it is
https://api.domain.com
- By default, it is
- Go to the
Core Pluginssection of Obsidian - Locate the core plugin
Syncand enable


Before doing these steps, ensure that your obi-sync self-hosted server is running.
Open your Obsidian.md Settings
and select About.
You need to sign in and connect Obsidian.md to your self-hosted server by clicking Log In:

The login dialog will appear:

Fill in your email address and password that you used to register your account with the cURL command in the section Creating New User.
curl --request POST `
--url https://api.domain.com/user/signup `
--header 'Content-Type: application/json' `
--data '{
"email": "example@example.com", <----- The email you will use
"password": "example_password", <----- The password you will use
"name": "Example User",
"signup_key": "<SIGNUP_KEY>"
}'Note
After signing in successfully, the Log In button will change to Manage settings. Keep in mind though that clicking the Manage Settings button will take you to Obsidian's official website. It has nothing to do with your own self-hosted server.
Next, on the left side under Core Plugins, select Sync.
On the right side, click the Choose button:

A new dialog will then appear. Select Create New Vault

Then fill in the information for your new vault. The Encryption Password can be anything you want. Do not lose this password. You cannot unlock / decrypt your vault if you can't remember it.

Your new vault will be created, along with a few options you can select, and a Connect button.

Click the Connect button to start Syncing between your local vault and your self-hosted sync server. If you get a warning message labeled Confirm Merge Vault, click Continue.
If you provided an Encryption Password a few steps back, you will now be asked to enter that password, and then click Unlock Vault.
You will then get one more confirmation that your vault is now synced.

From this point on, you can adjust any of the Sync settings you wish to modify, which includes syncing things like images, videos, plugins, settings, and more. Whatever options you enable, will be included in the Sync job.
Ensure Sync Status is set to running. You can enable / disable the sync's state by clicking the button to the right.

You can confirm that your files are successfully syncing by clicking the View button to the right of Sync Activity.

Once pressing the View button, a new dialog will appear and show you the status of your Sync job.
2023-09-09 01:38 - Uploading file Test Folder/Subfolder/My File 1.md
2023-09-09 01:38 - Upload complete Test Folder/Subfolder/My File 1.md
2023-09-09 01:38 - Uploading file Test Folder/Subfolder/My File 2.md
2023-09-09 01:38 - Upload complete Test Folder/Subfolder/My File 2.md
2023-09-09 01:40 - Fully syncedThese instructions help guide you through setting up Obsidian Publish. This feature will allow you to view your Vault .md notes on your webserver.
Open your Obsidian.md settings, and under Options on the left, select Core Plugins. In the middle of the screen, enable
Publish.

Back on the main Obsidian interface, select the Publish Changes
button in your Obsidian side / toolbar.

In the new dialog, enter a Site ID in the textfield provided. This will become the slug name for your new vault.

Once you have a name, click Create.
You will then see a list of all your vault's associated files. Select the checkbox to the left of each folder you wish to upload to your self-hosted Publish server.

Once you've selected the desired folders, click Publish in the bottom right.
Yet another dialog will appear which confirms your uploaded vault documents.

Note
Because we are hosting our own server, the link provided at the bottom of the dialog will not work since it goes to Obsidian's official publish server.
Open your web browser and go to the URL for your self-hosted publish server. In our example, we would view our Testing Folder/Tags.md page by entering the following URL:
https://publish.domain.com/myvault/Testing Folder/Tags.md
-
myvault: Name given to example vault -
Testing Folder: Folder name the note resides in -
Tags.md: Note filename
To see an overview of files you have uploaded to your publish server, go to your publish subdomain, and add your vault name at the end. Nothing else needs added.
https://publish.domain.com/myvault
In our example vault, visiting the URL above displays JSON and includes a list of all files uploaded from the test vault:

From this point, you can upload whatever files you wish to have published and play around with the settings.