nebari
nebari copied to clipboard
[ENH] - Store user Jupyter settings on NFS
Feature description
Would it be possible to store the user's jupyter settings on NFS rather than the JHub server?
Value and/or benefit
Whenever an upgrade (and maybe a redeploy?) happens, I lose my jupyter settings. Its not a huge deal, just frustrating when my keybindings suddenly go missing and I have to set them up again.
I'm guessing this is happening because the user settings are currently kept on the JHub server which is destroyed. If they were kept on NFS, we could have persistent settings... right??
Anything else?
No response
@kcpevey where does normally the jupyter settings are stored?
where does normally the jupyter settings are stored?
I admittedly don't know. I'm just an end user with a vision, opening this up for discussion 😉
Is there a jlab setting to allow setting the path for config files
Is there a jlab setting to allow setting the path for config files
Yes, using the JUPYTERLAB_SETTINGS_DIR and JUPYTERLAB_WORKSPACES_DIR env variables.
Ref: https://jupyterlab.readthedocs.io/en/stable/user/directories.html#jupyterlab-user-settings-directory
More broadly one can set JUPYTERLAB_DIR or LabApp.app_dir to change the JupyterLab application directory in general (these may require copying some static assets over from the default one), see jupyter lab dir for the default.
JUPYTERLAB_SETTINGS_DIRandJUPYTERLAB_WORKSPACES_DIR
Since most nebari settings are set in jupyter-config file it might be beneficial to use c.LabApp.user_settings_dir and c.LabApp.workspaces_dir traits over environment variables.
I've confirmed my user settings are being stored in my personal space at $HOME/.jupyter/lab/user-settings/@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings and they persist when my user server is shutdown and restarted.
At this point, I think the only way for this to get lost is if the whole system is rebuilt and files are lost. I'm going to close this since my original issue is resolved. If we see this happen after a redeploy, then we can revisit, but my inclination is that it won't be an issue during redeploy.