question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Tutorial] How to broadcast a jupyterlab server with gdrive integration for remote access

See original GitHub issue

Not 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

  1. Follow the instructions to install jupyter lab and google drive integration and make sure everything works as expected locally.
  2. 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:
    1. Server external (public) IP address: 123.45.67.89
    2. Jupyter port on the server: 8888
    3. Forwarded ssh port: 22222
    4. Forwarded jupyter port over the internet: 9888
    5. LAN IP of the server: 192.168.1.2
    6. Final client url: localhost:8890
    7. username: user
  3. 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.
  4. 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 😛)

  1. Download putty
  2. Setup the ssh session ssh session
  3. Setup the ssh tunnel (don’t forget to click on add when you’re finished) ssh session
  4. Save the configuration if you want
  5. Click on “open”
  6. Enter your credentials
  7. Open your browser at localhost:8890
  8. Enjoy jupyter lab with google drive integration

Clients with direct access to ssh

  1. Connect to the server via ssh to setup your user’s password etc: ssh user@123.45.67.89 -p 22222
  2. Open an ssh tunnel: ssh -N -L localhost:8890:123.45.67.89:9888 user@123.45.67.89
  3. Open browser at localhost:8890
  4. Enjoy jupyter lab with google drive integration

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
ian-r-rosecommented, Sep 13, 2017

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!

0reactions
PavlosMelissinoscommented, Sep 14, 2017

Perfect 💯, thanks a lot! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Integrate JupyterLab with Google Drive - Towards Data Science
The idea is simple, have everything important to you stored in some “secure” remote location which you can access from anywhere.
Read more >
Access Cloud Storage buckets and files from within JupyterLab
Access the Cloud Storage buckets and files · In JupyterLab, click the Browse GCS button. The Cloud Storage integration lists the available buckets....
Read more >
A Step-by-Step Guide on Downloading Your Google Drive ...
A Step-by-Step Guide on Downloading Your Google Drive Files Directly to Jupyter Notebook using Google Drive Python API ... Google Drive is a ......
Read more >
Jupyter notebook remote access || Remote server || GeoDev
Run and access jupyter notebook from a remote server.
Read more >
RStudio Release Notes
When /usr/lib/rstudio-server/bin/rserver-url -l <port number> is executed within a VS Code or Jupyter session, the full URL where a user can view a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found