marimo icon indicating copy to clipboard operation
marimo copied to clipboard

Connecting to a remote marimo instance interferes with local connection

Open akshayka opened this issue 1 month ago • 2 comments

Describe the bug

  1. On local machine, run marimo edit --port 2718 and start a notebook
  2. On a remote machine, run marimo edit --headless --host 127.0.0.1 --port 2718
  3. On local, connect to the marimo server in (2) on port 2020 using port forwarding, then open a notebook:

ssh -N -L 2720:127.0.0.1:2718 <REMOTE_USER>@<REMOTE_HOST>

In my repro, this was with the gcloud CLI:

gcloud compute ssh <INSTANCE> --zone=<ZONE> --tunnel-through-iap -- -N -L 2720:127.0.0.1:2718

The remote notebook can be interacted with fine. But the locally running notebook editor is interrupted by a "Sign in" alert. If you sign in with the token as username and password, then the notebook that's running remotely gets interrupted by a "Sign in alert."

Image

Will you submit a PR?

  • [ ] Yes

Environment

marimo 0.16.5 on both machines.

Replace this line with the output of marimo env. Leave the backticks in place.

Code to reproduce

No response

akshayka avatar Oct 21 '25 22:10 akshayka

Although we shouldn't put this on the user, does the following work?

marimo edit --headless --host 127.0.0.1 --port 2718 --proxy=http://127.0.0.1:2720

dmadisetti avatar Oct 21 '25 23:10 dmadisetti

Yeah I think it will work, I was just looking into that. In the meantime, we can change our docs to recommend a port other than 2718 on remote (eg, 3718)

akshayka avatar Oct 21 '25 23:10 akshayka