# Manage Jupyter notebook servers

> **Warning:**
> The following is only valid when the Python and Jupyter plugins are [installed and enabled](managing-plugins.html)!

In IntelliJ IDEA, you can execute code cells using the following server types:

* Managed server – a Jupyter server that is automatically launched by IntelliJ IDEA for the current project. It will be terminated when you close IntelliJ IDEA.

* External server – any Jupyter server that you connect to by specifying its URL and token. It can run on either your local or remote machines.

> **Note:**
> Jupyter server connection settings are user-specific.

Procedure: Add Managed Jupyter server

1. Go to `Tools | Add Jupyter Connection...`

Alternatively, right-click the project directory and select `New | Jupyter connection` from the context menu.

2. In the window that opens, click ![Add Jupyter Connection](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) Add Configuration or press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (NetBeans), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)) and select IDE-Managed Server.

For more information on configuring Managed Servers, refer to [Set up a Managed
Server](#setup-managed-server).

3. Click OK if you want the newly created server to be automatically selected for your current notebook.

![Add a Managed Server](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_add_jupyter_managed_server.png)

Procedure: Add External Jupyter server

1. Go to `Tools | Add Jupyter Connection...`

Alternatively, right-click the project directory and select `New | Jupyter connection` from the context menu.

2. In the window that opens, click ![Add Jupyter Connection](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) Add Configuration or press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (NetBeans), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)) and select External Server.

For more information on configuring external servers, refer to [Set up an External
Server](#setup-configured-server).

3. Click OK if you want the newly created server to be automatically selected for your current notebook.

> **Tip:**
> Added configured servers are shown in the [Project
> View](project-tool-window.html#views).
>
> ![Remote server in the Project View panel](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ij_remote_server_in_project_view.png)

Procedure: Set up a Managed Server

1. Click the list of servers on the [Jupyter
notebook toolbar](jupyter-notebook-support.html#toolbar) and select Configure Jupyter Server from the context menu.

![Configure Jupyter Server](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_configure_jupyter_server.png)

2. In the window that opens, select Managed Server.

Managed Server automatically selects the execution method for Jupyter Notebooks. To configure the server settings manually, clear the `Autodetected execution mode` checkbox.

3. Select the Execution mode:

JupyterLab:

* Set the server settings using the Command line arguments field.

* Set Environment variables and assign values to them.

* Jupyter servers can be secured either with a token (included in the URL) or a user-defined password. If the Jupyter server is secured with a password, enter it in the Password field. For more information, refer to [Security in the Jupyter notebook server](https://jupyter-notebook.readthedocs.io/en/v6.5.2/security.html#security-in-the-jupyter-notebook-server).

IPyKernel:

IPython kernel is ready to use, and no additional setup is required.

> **Note:**
> IPyKernel supports only Python notebooks, and Open Notebook in Browser option is not available for that type of kernel

4. Click OK to apply the changes and close the window.

> **Note:**
> The Managed Server will appear in the list of servers on the [Jupyter
> notebook toolbar](jupyter-notebook-support.html#toolbar).

Procedure: Set up an External Server

1. Click the list of servers on the [Jupyter
notebook toolbar](jupyter-notebook-support.html#toolbar) and select Configure Jupyter Server from the context menu.

![Configure Jupyter Server](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_configure_jupyter_server.png)

Alternatively, right-click the server in the Project view `Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS)) and select `Configure Jupyter Server` from the context menu.

2. In the window that opens, choose the external server that you want to configure.

3. In the Name field, set the name for your external server.

4. In the Server URL field, specify the address to establish a connection to an external Jupyter server. The target URL should contain a server name or its address and the access token.

To automatically detect available Jupyter instances on the local machine, click Discover local servers. If a server is found, the URL and token will be filled in automatically.

> **Tip:**
> To find a token for an external server, you can run either the `jupyter server list` or `jupyter lab list` command in a terminal

5. Under Type, select the required server type.

Notebook/Lab:

Use this option to connect to a standard Jupyter Notebook or JupyterLab instance, running locally or on a remote machine.

Provide the required authentication token or password.

![Notebook/Lab](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_jupyter_server_notebook_lab.png)

> **Note:**
> If you leave the field empty, the token will be extracted from the URI.

Hub:

Use this option to connect to a JupyterHub instance.

Provide one of the following:

* Your username, password, and the URL of the hub, if authentication is done by using login credentials.

* Direct URL to a running Jupyter notebook server that includes the access token if token-based authentication is used.

![Hub](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_jupyter_server_hub.png)

AWS SageMaker:

Use this option to connect to an AWS SageMaker instance or another cloud solution.

No token is required, you can use the presigned URL directly.

![AWS SageMaker](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_jupyter_server_aws.png)

6. If the server requires a proxy connection, select the Use IDE Proxy checkbox.

Refer to the [HTTP
proxy](settings-http-proxy.html) page to configure the corresponding settings.

7. Click Test connection to verify the setup.

8. Click OK to apply the changes and close the window.

Procedure: Manage external server files

When an external Jupyter server is connected, its files appear in the [Project
View](project-tool-window.html#views). You can create, open, edit, and delete files from the external Jupyter server as if they were part of your local project. For example:

* To add a file, right-click the External Server directory or a package within it and select New from the context menu. Select the required file type. For more information, refer to [Create new items](add-items-to-project.html#create-new-items). ![Add a remote server file](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ij_add_remote_server_file.png)

* To delete a file, right-click it in the External Server directory and select Delete `Delete` (Windows), `⌦` (macOS), `⌦` (IntelliJ IDEA Classic (macOS)), `⌦` (macOS System Shortcuts), `Delete` (XWin), `Delete` (GNOME), `Delete` (KDE), `Delete` (Emacs), `Delete` (Sublime Text), `⌦` (Sublime Text (macOS)), `Delete` (NetBeans), `Delete` (Visual Studio), `⌦` (Visual Studio (macOS)), `Delete` (Eclipse), `⌦` (Eclipse (macOS)) from the context menu. ![Delete remote server file](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ij_delete_remote_server_file.png)

Procedure: Remove a Jupyter server

* Go to `Settings | Tools | Jupyter | Jupyter Servers` .

In the window that opens, select the server you want to remove and click ![Remove Configuration](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.expui.general.remove.svg) Remove Configuration or press `Delete` (Windows), `⌦` (macOS), `⌦` (IntelliJ IDEA Classic (macOS)), `⌦` (macOS System Shortcuts), `Delete` (XWin), `Delete` (GNOME), `Delete` (KDE), `Delete` (Emacs), `Delete` (Sublime Text), `⌦` (Sublime Text (macOS)), `Delete` (NetBeans), `Delete` (Visual Studio), `⌦` (Visual Studio (macOS)), `Delete` (Eclipse), `⌦` (Eclipse (macOS)).

* Alternatively, to remove an external server, right-click the server in the Project view `Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS)) and select `Delete` `Delete` (Windows), `⌦` (macOS), `⌦` (IntelliJ IDEA Classic (macOS)), `⌦` (macOS System Shortcuts), `Delete` (XWin), `Delete` (GNOME), `Delete` (KDE), `Delete` (Emacs), `Delete` (Sublime Text), `⌦` (Sublime Text (macOS)), `Delete` (NetBeans), `Delete` (Visual Studio), `⌦` (Visual Studio (macOS)), `Delete` (Eclipse), `⌦` (Eclipse (macOS)) from the context menu.

Procedure: Launch a local Jupyter server

1. Click the list of servers on the Jupyter notebook toolbar and select the server that you want to launch from the context menu.

2. To run a Jupyter server, [execute any
code cell](running-jupyter-notebook-cells.html#execute-cell).  When you initiate cell execution, IntelliJ IDEA launches a Jupyter server on the local host using any available port (by default, it is the 8888 port). You can switch to the Jupyter Server tool window to preview the server's configuration details.

![Jupyter server is running. Jupyter tool window](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_jupyter_tool_window.png)

Procedure: Stop the Jupyter server

To stop any running server, switch to the Jupyter Server tool window and click ![Stop Jupyter server](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.expui.run.stop.svg) Stop Jupyter server. Preview the status in the Server Log window.

![Stopping the server](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_jupyter_stop_server.png)

Once you have shut down the server, the current session is terminated. When you start the server next time, execution results for all previous sessions and all notebooks will be lost.

## Kernel actions

Procedure: Restart kernel

You might want to refresh your calculations without shutting down the entire server and affecting any other notebooks. To restart the currently running kernel, click ![Kernels](https://resources.jetbrains.com.cn/help/img/idea/2026.2/python-jupyter.icons.com.jetbrains.python.jupyter.expui.restartKernel.svg) on the [Jupyter notebook toolbar](jupyter-notebook-support.html#toolbar). You can then view the kernel status in the Server Log window:

![Restarting the current kernel](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_jupyter_restart_kernel.png)

Procedure: Shutdown kernel

To completely stop a running kernel, open the list of servers on the Jupyter notebook toolbar and select Shutdown Kernel from the context menu. This action will terminate the current kernel session.

![Shutdown the kernel](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_shutdown_kernel.png)

Procedure: Switch kernel

If you have at least two kernels available, and you need to switch to a different kernel, open the list of servers on the Jupyter notebook toolbar. Select Switch Kernel from the context menu and choose the required kernel from the dropdown list.

![Switch the kernel](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_switch_kernel.png)

Procedure: Connect kernel to server

After selecting a remote Jupyter server and opening a notebook, the kernel list becomes available automatically after the first cell is run.

However, you can manually connect to the server before running any cells. After adding the external server, click the ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.refresh.svg) Connect to Server button on the [Jupyter
notebook toolbar](jupyter-notebook-support.html#toolbar). This will establish the connection between the kernel and the Jupyter server.

![Connect the kernel to the server](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_connect_kernel.png)

