The littlest jupyterhub file storage question

I’ve installed TLJH on a server with multiple drives; TLJH was installed on the system drive. How do I arrange things so that when a user logs in that any notebooks they create get saved on a different drive?

I hate to keep polluting this forum with hacky work-arounds, but since no one has responded…

Have you considered creating a Link between the two locations. For example, if TLJH is putting users into /var/tljh/users and you want them in /mnt/users: ln -s /var/tljh/user /mnt/users Be sure to move any existing date to the new mount point and remove the /var/tljh/users directory first. If you are using Windows, something similar with mklink may serve your purpose.

1 Like

Hi Brett,

Thanks for your reply. It seems that TLJH installs new users in /home and each user directory is named with a jupyter- prefix; for example:
and if this user also has a separate account on (in my case) the Ubuntu server with the name pauln,
the /home directory would have two separate account folders:
/home/jupyter-pauln and /home/pauln
so it would be cool to be able to find out if there is a configuration file somewhere in TLJH that would allow me to change the default location of the jupyter-user directories. This could be problematic, as if
jupyter looks for the directories in /home, I might run into trouble.
I might try your suggestion and see what happens, as I am still just configuring the whole server and I am still the only user.

Hi Paul,
I wonder if the DockerSpawner that was being suggested here might be what you’d prefer? (I think given the thread around this post it is compatible with TLJH, too.)

Hi Wayne,

I ended up doing the following on my system76 server running Ubuntu 18.04:

  1. ssh into server and become super user.
  2. cd /home. (this is where TLJH places all user accounts)
  3. mv jupter-username to another disk on the server (I am trying to keep the system disk free of jupyter notebooks and data unrelated to running the server)
  4. create a symbolic link to the moved folder
  5. restart the jupyterhub service:
    systemctl restart jupyterhub
  6. exit
    This seems to work. I am left with symbolic links to each user account in /home, but I can live with that.
    I have to do some security checks on this method to make sure all is ok, but at first glance, I do not see any problems!
1 Like