Live Collaboration¶
Carto-Lab Docker supports JupyterLab's real-time collaboration feature, allowing multiple users to work together—editing code, running cells, and writing markdown—within the same notebook simultaneously. This is ideal for pair programming, live code reviews, and teaching.
Step 1: Enabling the Feature¶
Live collaboration is an opt-in feature and requires Carto-Lab Docker version 0.24.1
or newer.
To enable it, follow these two steps:
- Edit your
.env
file and set theCOLLABORATIVE
flag totrue
.
# In your .env file
COLLABORATIVE=true
- Restart the container for the change to take effect. Run this command from your terminal on the host machine:
docker compose up -d --force-recreate
The JupyterLab server will now start with collaboration enabled.
Step 2: Sharing Your Session¶
Collaboration in a single-user server is managed via a security token. You can share a special link that includes this token to give colleagues temporary access to your session.
The Easy Way: Use the Share Button¶
The simplest way to get a shareable link is directly from the JupyterLab interface.
- Click the Share button in the top-right corner of the JupyterLab window.
- Click Copy Shareable Link.
This will copy a URL to your clipboard that you can send to your collaborators, for example:
http://localhost:8888/lab/tree/my-notebook.ipynb?token=...
Getting the Token Manually¶
If you need the token for other purposes, you can retrieve it from the container logs:
docker compose logs | grep "?token=" | tail -n 1
Security Considerations¶
For Trusted Collaborators Only
The token-based sharing method provides full access to your JupyterLab session. Only share the link with trusted colleagues within a secure network.
The token is automatically regenerated every time the container restarts, limiting its long-term exposure. We recommend a daily restart for any persistently running instance.
For high-security or multi-tenant production environments, we strongly recommend disabling token authentication and integrating with a dedicated Identity Provider (IdP) like Keycloak.