Not sure if Laurent would accept a PR for this, but I’m currently working on adding a command to export and import the settings spit out by joplin config. I’m specifically looking for the ability to bootstrap the headless web server/cli without manual intervention to run joplin inside a docker container.
@marcush saw your pull request when looking for a way to migrate my config from one pc to another. Thanks a lot for that!
I think for me personally the ideal solution would be if the base settings were in a config file somewhere (at all times) so that I can store it in a git repo like all my other dotfiles and config files. Currently I guess adding a special handling script for Joplin to import/export it is preferable to just storing the whole db in git.
EDIT: Oh this doesn't work with the GUI client (Linux)? Ah sorry for posting in the wrong place in that case.
It somewhat does, but it’s not the most straight forward thing in the world. If you have the cli client installed, then you can edit the profile used by the desktop client. I’ll update this post with the exact commands later.
Edit: So here’re the commands I would run to export/import the config for the desktop app using the cli client. For info, I’ve installed both the desktop app and cli client from master. I don’t think my PR is in any working release yet. Also, for me (and I think by default on linux) my desktop config is stored in ~/.config/joplin-desktop. Adjust as necessary.
On the old machine: joplin --profile ~/.config/joplin-desktop config --export > joplin-config.json
On the new machine: joplin --profile ~/.config/joplin-desktop config --import-file <path to joplin-config.json
I believe you actually have to open the desktop app for it to create this profile, but I’m honestly not sure and I wouldn’t run the import command with an already working profile if I was you. Also, this code (intentionally) spits out the sync password in clear text so you should remove that before adding the json file to Github.
Have the UI write to a configuration file. Additionally, when that configuration file is saved in an external editor, Joplin re-reads the file and applies the changes to the UI.
This would allow for having basic options kept in the UI, while advanced options could be inserted manually by power-users. And it’s good for portability.