@ManuScri welcome to the forum.
Locally, notes are stored in the ~/.config/joplin-desktop/database.sqlite file. The resources / attachments are stored in the ~/.config/joplin-desktop/resources folder.
I believe that there is an unsupported feature where you can set the path for where the above is stored using a --profile
switch followed by a path to the required location. I do not use that but searching this forum for --profile
should bring up information as it has been discussed before.