[Tutorial] How to broadcast a jupyterlab server with gdrive integration for remote access
See original GitHub issueNot really an issue but I’d like to offer some help to aspiring testers/users of the project. It took me some time to actually figure out how to make this work remotely. It seems much easier in retrospect!
Note: This is a temporary hack to circumvent #7 in a multi-user/multi-machine environment until it’s resolved.
Anyway, AFAICT, the actual problem is that google drive has to work with a localhost server in order to be able to allow the server to see your files. All is good when you’re running the server locally but what happens when you need to have multiple users that connect remotely?
My solution uses ssh tunneling, if there’s a better way please let me know because it’s not pretty.
I assume you’re behind some kind of firewalled NAT router.
Server side
- Follow the instructions to install jupyter lab and google drive integration and make sure everything works as expected locally.
- First you need to port forward the jupyter lab server port over the internet, as well as the ssh port (this is really dangerous so at least don’t use the default one). You should set your own values for your setup but for this demo I assume the following:
- Server external (public) IP address:
123.45.67.89
- Jupyter port on the server:
8888
- Forwarded ssh port:
22222
- Forwarded jupyter port over the internet:
9888
- LAN IP of the server:
192.168.1.2
- Final client url:
localhost:8890
- username:
user
- Server external (public) IP address:
- Create a user on the server for each jupyter user (they will need credentials so it’s better to have their own than share yours). No need for superuser permissions.
- Run
jupyter lab --no-browser --ip=192.168.1.2
Client side:
Using putty (e.g. for windows machines with no bash access at all and/or people who are afraid of the terminal 😛)
- Download putty
- Setup the ssh session
- Setup the ssh tunnel (don’t forget to click on add when you’re finished)
- Save the configuration if you want
- Click on “open”
- Enter your credentials
- Open your browser at
localhost:8890
- Enjoy jupyter lab with google drive integration
Clients with direct access to ssh
- Connect to the server via ssh to setup your user’s password etc:
ssh user@123.45.67.89 -p 22222
- Open an ssh tunnel:
ssh -N -L localhost:8890:123.45.67.89:9888 user@123.45.67.89
- Open browser at
localhost:8890
- Enjoy jupyter lab with google drive integration
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (10 by maintainers)
Top GitHub Comments
Hi @PavlosMelissinos, the documentation for setting up your own client id has improved in #70 and #71, so I am marking this as resolved. If you still have issues, feel free to reopen!
Perfect 💯, thanks a lot! 😄