> For the complete documentation index, see [llms.txt](https://aalborg-university.gitbook.io/machine-learning-workstation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aalborg-university.gitbook.io/machine-learning-workstation/administration/connect-to-the-machine/run-jupyter-remotely.md).

# Run Jupyter remotely

This page provides support on how to interact with a jupyter notebook that's running remotely on the workstation. This is particularly useful, for instance, when training a deep learning model from a jupyter notebook.

Before proceeding, you need to make sure to have a conda environment, and activate it.

Install jupyter in your environment:

```bash
conda install jupyter
```

Create a jupyter configuration file:

```bash
jupyter notebook --generate-config
```

Set up authentication for jupyter:

```bash
jupyter notebook password
```

Start the notebook (use a custom `<PORT_NUMBER>`):

```bash
jupyter notebook --no-browser --port=<PORT_NUMBER>
```

From your local machine, set up port forwarding:

```bash
ssh -N -f -L localhost:<LOCAL_PORT>:localhost:<PORT_NUMBER> ml_workstation
```

That's it. To access jupyter, just point your browser to `http://localhost:<LOCAL_PORT>`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aalborg-university.gitbook.io/machine-learning-workstation/administration/connect-to-the-machine/run-jupyter-remotely.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
