Live Collaboration¶
The collaboration mode in Jupyter allows you to share your session to code together with (e.g.) colleagues. Collaboration mode is supported as of Carto-Lab Docker version 0.22.1
.
Enable Jupyter collaboration mode with the following .env
settings:
COLLABORATIVE=true
DISABLE_JUPYTEXT=true
Info
jupyter-collaboration
and jupytext
are currently not compatible.
After enabling these settings, restart the server. You can now share a link to your lab server to let other users collaborate. For further info, see the documentation.
Warning
Sharing the notebook environment gives users full control over your environment and allows arbitrary code execution. Proceed with caution.
Authentication¶
The common use case is in Jupyter Hub sessions. If you are serving a single-user Jupyter Lab server under a static domain or on localhost
,
an option is to additionally generate a token and then only sharing the token with guests. The token should be regularly
updated.
Note
Multi-user authentication for single Jupyter Lab servers is not an explicitly considered use case. The suggestion below is a workaround for niche situations. In general, and from a security perspective, it is always better to handle authentication with a dedicated IdentityProvider
such as Keycloak.
Enable token generation with:
GENERATE_TOKEN=true
Start the server afterwards and print your current token in a terminal session:
echo $TOKEN
Afterwards, you can share links with the token (e.g.) with colleagues:
http://localhost:8888/?token=...
# or
https://myserver.example.com/?token=...
You can also click the share button on the upper-right and share links to notebooks (including the token):