Obsidian+Syncthing setup almost always implies using both on multiple devices, with Syncthing installed and configured to accept API calls using different API keys. Assuming that plugin's configuration also synchronizes between devices, all plugins instances will use the same URI/API key combination to connect. This means that setting up the plugin on one device correctly leads to HTTP 403 errors on all the other devices.
Mitigations
Same API key
It is possible to configure all ST instances to use same API key.
Pro: this is relatively easy to do via WebUI of ST.
Cons:
This also assumes ST will be available on every device via the same scheme://hostname:port combination too, which might be not feasible in practice.
API keys are randomly generated and unique for security reasons, and we shouldn't go against it.
Disabling plugin configuration synchronization
My assumption was that Obsidian vault is synchronized as is, with all plugins's config syncing too. This can be disabled via .stignore, and then plugin can be configured on every device individually.
Pros: Still relatively easy to do. Though explaining it in the documentation will require more effort, I think.
Cons:
Both Obsidian and ST try to be simple in use, and with this approach we would require users to tinker with the harder parts of both.
Currently, the plugin only stores connection information, but if it introduces more settings in the future (e.g. visual settings for conflict modals), those should be synced. Disabling configuration syncing is not prescient.
Solution
Store multiple configurations instances. Pick the one that is used on this device.
For example, https://github.com/soberhacker/obsidian-telegram-sync is a plugin that also distinguishes between devices. It uses node-machine-id package to do so. And we could do the same, or perhaps machine-id2 package for Android support.
I believe this can be done without changing settings UI, or with slight mention of current device id. As for internal config structure - just store config as a dictionary, where keys are machine ids, and values have the same config structure as it is now. Example config structure:
Problem
Obsidian+Syncthing setup almost always implies using both on multiple devices, with Syncthing installed and configured to accept API calls using different API keys. Assuming that plugin's configuration also synchronizes between devices, all plugins instances will use the same URI/API key combination to connect. This means that setting up the plugin on one device correctly leads to HTTP 403 errors on all the other devices.
Mitigations
Same API key
It is possible to configure all ST instances to use same API key.
Pro: this is relatively easy to do via WebUI of ST.
Cons:
Disabling plugin configuration synchronization
My assumption was that Obsidian vault is synchronized as is, with all plugins's config syncing too. This can be disabled via
.stignore
, and then plugin can be configured on every device individually.Pros: Still relatively easy to do. Though explaining it in the documentation will require more effort, I think.
Cons:
Solution
Store multiple configurations instances. Pick the one that is used on this device.
For example, https://github.com/soberhacker/obsidian-telegram-sync is a plugin that also distinguishes between devices. It uses
node-machine-id
package to do so. And we could do the same, or perhapsmachine-id2
package for Android support.I believe this can be done without changing settings UI, or with slight mention of current device id. As for internal config structure - just store config as a dictionary, where keys are machine ids, and values have the same config structure as it is now. Example config structure: