Skip to content

Fix confusing terminal output when using ServerApp.ip=0.0.0.0 - #1643

Merged
minrk merged 2 commits into
jupyter-server:mainfrom
Yann-P:fix-0000
May 29, 2026
Merged

Fix confusing terminal output when using ServerApp.ip=0.0.0.0#1643
minrk merged 2 commits into
jupyter-server:mainfrom
Yann-P:fix-0000

Conversation

@Yann-P

@Yann-P Yann-P commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Pointed out in jupyterlab/jupyterlab#15520,

When using --ip=:: or 0.0.0.0, terminal displays:

    Or copy and paste one of these URLs:
        http://xxx.local:8888/lab?token=xxx
        http://127.0.0.1:8888/lab?token=xxx

Which makes it look like it does not listen on all interfaces, but in fact it does.

After this fix:

    Or copy and paste one of these URLs:
        http://0.0.0.0:8888/?token=xxx
        http://127.0.0.1:8888/?token=xxx

Fixed with #743 in mind to avoid a regression in k8s.

Steps to test

jupyter server --ip 0.0.0.0

And check for no regressions on jupyter server --ip "", jupyter server --ip 127.0.0.1, jupyter server --ip <arbitrary ip>

These are unit-tested too.

AI disclosure

Claude code, only to dig up the history of previous changes to avoid a regression.

@Yann-P Yann-P self-assigned this May 18, 2026
@minrk

minrk commented May 26, 2026

Copy link
Copy Markdown
Contributor

0.0.0.0 is not generally a connectable ip, so it shouldn't be included in a "connect" list, since copy & paste will generally not work. But it should be clear that the separate bits of information:

  1. "Jupyter Server is running at http://0.0.0.0:8888" (good!)
  2. "You can connect at http://hostname:port" (should not include 0.0.0.0)

This PR fixes the Jupyter Server 2.15.0 is running at: log, but the copy and paste one of these URLs shouldn't include 0.0.0.0, but could maybe be more explicit with something like "any hostname/ip of your system, such as..." and still include hostname

@Carreau Carreau modified the milestones: 2.19, Future May 28, 2026
Yann-P added 2 commits May 29, 2026 15:13
Pointed out in jupyterlab/jupyterlab#15520,

When using --ip=:: or 0.0.0.0, terminal displays:

```
    Or copy and paste one of these URLs:
        http://xxx.local:8888/lab?token=xxx
        http://127.0.0.1:8888/lab?token=xxx
```

Which makes it look like it does not listen on all interfaces, but in
fact it does.

Fixed with jupyter-server#743
in mind to avoid a regression in k8s.
Instead, use a text hint. Example :

```
Or copy and paste one of these URLs:
http://mycomputer.local:8888/?token=...
http://127.0.0.1:8888/?token=...
The server is listening on all interfaces, so any hostname or IP of this machine will work.
```
@Yann-P

Yann-P commented May 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thank you for reviewing.

Fixed in b62505c

The output is now

(jupyter-server) jupyter_server fix-0000* % jupyter server --ip 0.0.0.0
[I 2026-05-29 15:20:57.018 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2026-05-29 15:20:57.041 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2026-05-29 15:20:57.042 ServerApp] Serving notebooks from local directory: /Users/yann/oss/jupyter_server
[I 2026-05-29 15:20:57.042 ServerApp] Jupyter Server 2.20.0.dev0 is running at:
[I 2026-05-29 15:20:57.042 ServerApp] http://0.0.0.0:8888/?token=...
[I 2026-05-29 15:20:57.042 ServerApp]     http://127.0.0.1:8888/?token=...
[I 2026-05-29 15:20:57.042 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 2026-05-29 15:20:57.042 ServerApp] Welcome to Project Jupyter! Explore the various tools available and their corresponding documentation. If you are interested in contributing to the platform, please visit the community resources section at https://jupyter.org/community.html.
[C 2026-05-29 15:20:57.043 ServerApp]

    To access the server, open this file in a browser:
        file:///Users/yann/Library/Jupyter/runtime/jpserver-93845-open.html
    Or copy and paste one of these URLs:
        http://yanns-MacBook-Pro.local:8888/?token=...
               ^^^^^^^^^^^^^^^^^^^^^^^
        http://127.0.0.1:8888/?token=...
    The server is listening on all interfaces, so any hostname or IP of this machine will work.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@minrk

minrk commented May 29, 2026

Copy link
Copy Markdown
Contributor

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants