Instructions for JupyterHub configuration state that to start JupyterLab by default, one should use a configuration of:
c.Spawner.args = ['--NotebookApp.default_url=/lab']
To start a classic Notebook by default, use:
c.Spawner.args = ['--NotebookApp.default_url=/tree']
To start the classic Notebook and open a specific ipynb file, use:
c.Spawner.args = ['--NotebookApp.default_url=/tree/path/to/file.ipynb']
One might therefore assume that opening /lab/path/to/file.ipynb would open a specific file in JupyterLab, but this does not work and results in an error. The correct configuration is /lab/tree:
c.Spawner.args = ['--NotebookApp.default_url=/lab/tree/path/to/file.ipynb']