GSoC idea - Support for multiple profiles

It seems that there's a huge misconception of the idea of several profiles.

The current status of Joplin is the following: You start Joplin for the first time and a profile is automatically created. This profile holds all your settings, which includes the single sync target for that profile. This won't change. There will be only ONE sync target per profile.

There's an unsupported argument --profile <path> which allows to start Joplin with a new profile, which will be created, in case it does not exist in <path>.

So you can start Joplin with different profiles in different paths. Those are independent from each other and you can't start 2 instances of Joplin (with either the same or the a different profile) at the same time.

Now here's the idea of this project:

Joplin should allow people to manage these profiles within the application (desktop, mobile, cli). There's a setting where one can choose the profile and that's the profile that is used when starting Joplin.
This setting is not supposed to be in the preferences, but maybe a dropdown box right of the search bar. So as soon as you switch the profile, Joplin is restarted with the new profile. I still think there's a way to do this without actually restarting the app, but that's a point that has to be figured out during the project.

This does not change the fact that no more than one instance of Joplin can run at the same time. This is not part of the project - but could be. As a next step, I envision the possibility of starting two or more instances of Joplin with different profiles.

So, to summarize:

There are 2 distinct (but not mutually exclusive) concepts:

  • multiple profiles
  • multiple instances

This project idea is about multiple profiles.

I hope I was able to clear this up a bit.

10 Likes

Currently the directory and file names for the default and only profile are hard-coded. The project aims at changing this and allowing the user to create multiple profiles. Am I right, @tessus?

Yes, that’s correct.

Thank you for clearing this. Will keep this in mind

1 Like

as I started the mess I will try to explain myself. It is mainly said above but I will but in my own words.
I’m mainly driven by the combination of the ideas / features

origin from the same background as stated in

mine too

The final wish is, to run Joplin headless combined with the Web application companion for Joplin on a server on my network (what is currently in reconstruction) allowing to share notes between family members and friends.
User accounts are provided by the sync target such as nextcloud.
A big surplus would be to have work and private profile with different settings (and notes by having a work and private account). You can imaging, profiles present roles and depending on your current role you need a different configuration,

First of all it needs to be answered what is stored in the profile, if it is anything (CSS style, preferences, search weighting, tags, sync-target, …) but the notes than there is even some kind of user profile, as you switch sync-target, you may store at the same service using a different user account.

Of course, we are not going to introduce user account management but using multiple profiles is somehow a transition towards this although leaving the tough work, user management, to the sync-target.
I hope, I expressed it a bit more clearly this time.

I do have some thought about leaving the multiple profile to the OS of the app.
We want to keep Joplin app as simple as possible, so that any user can manage it. Setting up different user profiles on OS is still a tasks to more advanced users, in particular for Android and iOS.
So if we are going to have multiple profiles, like mother, father, kid (staying with the family idea), privacy could become an issue but depending on how GSoC Idea - Password-protected notes is implemented that could be solved

A last though, how could the web companion deal with multiple profiles?
It may need to spin-up another Joplin instance if two user open the web companion with their respective profiles, wouldn’t it?
The question remaining is, how resource consuming is this approach, if operate with headless Joplin apps.

Last but not least, this does not happen at once but, if it is agreed to my thoughts, it shall keep the door open to continue development towards these features.

1 Like

@PackElend, Currently in the .config/joplin-desktop/ directory there are the following files/folders:
database.sqlite log-database.txt log.txt resources/ templates/ tmp/
These are specific to a single profile, which is the default profile in this case. With the profiles implemented, these would reside in folders named Profile<id>. within the .config/joplin-desktop/. It may make sense to store the things you have mentioned in the separate profile directories.

In addition, the user should also have a choice to make global versions of these. This is similar to the way VS Code organizes configurations. The global settings would of course override the profile specific settings.

1 Like

yes and please leave it to the user, if they want to put the root folder in their OS`s user profile folder or at a different place.
I mostly have my profile stored in the default path but there are occasions where it has to be stored at a different place and I hate it when the app does not allow me to do so :slight_smile:

+1

1 Like

@PackElend, That can of course be done, but eventually there will be at least one config file in a known location, such as the home directory.

As an alternative, we can use an environment variable such JOPLINAPP_ROOT, which when not found defaults to the home directory.

+1 IMHO

1 Like

@laurent, @tessus, What is your opinion on this?

I’m not sure I understand the reasoning behind this. A profile has its own identity. How would you imagine a global profile is supposed to work? Can you give me an example for when I had 2 profiles (work / personal). Both have different sync targets. So how does a global profile fit into this?

O no, I was not talking about sync targets. Those would be distinct. I was talking about user style sheets and other preferences. For an instance, the user may globally put in a dark background, while for each profile vary the text color. But of course it does not make much sense to have a global database or sync target.

1 Like

Actually I want to know how to run locally the codes of support for multiple profiles. Is it done by npm start or anything else

For the 2 css files this makes total sense. However, your logic is backwards. The profile css overrides the global css, not the other way around.
Also, you should really think this through. You’d basically have to parse the global and the profile css files to merge them. You can’t just take either one or the other. Well, you could, but that’s not how this usually works.

Hi Joplin team ! Your app seems to be the one I was searching for (sync, markdown, GPS,…). I would love to use it for personal notes (for me and my devices) and share only some notes with other friends or family. I understood that I cannot sync notebooks with different sync services. So I would be interested in having few profiles (with different sync services or even same service but different paths) and choose the one I want when the app launches (on desktop and mobile ;). Is it something you planned to do ? Again thanks a lot for your work (especially reading me). Cyril

it is an idea to add this feature but I cannot tell when or by whom

1 Like

I would like multiple profiles because I started using Joplin for personal notes and the professional ones. However I dropped the idea to use it for both because it turned into a mess.
With multiple profiles I would organize it.

I love this idea. Just found Joplin a month ago and collapsed my note-taking from about six different platforms to joplin with several coworkers and friends following suite after I introduced them to the platform. I'm currently using tagging to switch 'contexts' between work, personal, and projects, but the ability to efficiently switch between these types of contexts would be really, really awesome.

+1 for this idea as it would be really easy to switch between work notes and personal notes

1 Like

I've thought about this multiple profile feature again and I'm wondering exactly what problems we are trying to solve. Now of course you can easily have a "Personal" and "Work" notebook and switch from one to another easily and everything works as expected, such as search, copying notes from one notebook to another, etc.

If we support multiple profiles, many things won't work as expected, for example it would be complicated to move a note from a work profile to a personal profile. You won't be able to search across both personal and work profiles, etc. You'll have to duplicate your settings, custom CSS, plugins, etc. from one profile to the other.

So why is using a Work and Personal notebook not a good solution? What feature is missing that would make this solution work?