The coding sector is rife with useful tools designed to make your programming tasks as efficient and painless as possible. Jupyter Notebook is one such utility, which combines a note-taking and data visualization app with a live code editor. As someone who often works with Python scripts, Jupyter Notebook is my favorite tool for making notes during lectures and sharing my painstakingly-written code with my programming friends and rivals.
But considering your coding documents are stored on an external server, privacy-conscious users might get worried about maintaining the confidentiality of their projects. So, here’s a quick guide on how you can self-host Jupyter Notebook (and even JupyterLabs) on your workstation.
How to use your GPU in Jupyter Notebook
Speed up your machine learning algorithms by running them on your graphics card in Jupyter Notebook
Deploying the Jupyter Notebook container
Using Proxmox
Typically, self-hosted apps can be configured in a variety of ways, and Jupyter Notebook is no different. If you’re a PVE user, you can leverage the ultra-useful Proxmox VE-Helper script repository to get Jupyter Notebook up and running in a matter of minutes. To do so,
- Open the Shell tab of your preferred Proxmox node.
-
Paste the following command into the terminal interface before tapping the Enter key:
bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/jupyternotebook.sh)"
- Choose Yes when Proxmox asks for your permission to install Jupyter Notebook and select Default Settings for the container.
- Once the script has worked its magic, the Shell UI will display the IP address that you can use to access the Jupyter Notebook web UI.
-
Since Jupyter Notebook requires a token for authentication, you’ll have to switch to the Console tab on the Proxmox server and execute the following command to find the secret token generated by the installation script earlier:
jupyter notebook list
- Switch to the Jupyter Notebook web UI, paste the token into its respective field, and enter a password to make it easier for you to sign in to the Dashboard.
Using Docker or Podman
Alternatively, you can take the Docker/Podman route and deploy the Jupyter Notebook instance inside your PC (or even a VM, if that's what floats your boat).
- Launch the terminal app included in your OS.
- Run the docker pull command to grab the Jupyter Notebook image from the quay.io repository. sudo docker pull quay.io/jupyter/scipy-notebook
- Deploy the Jupyter Notebook container with the docker run command: sudo docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work quay.io/jupyter/scipy-notebook
- You can access the Jupyter Notebook UI with the link generated in the Linux terminal.
Personally, I recommend going with the Docker method, as it lets you leverage the extra consoles, editors, and collaboration features included in JupyterLab. Certain home server operating systems, like YunoHost, include JupyterLab/Jupyter Notebook containers, which are perfect if you want an easy method to host this neat tool on your system.
Code like a pro with a self-hosted Jupyter Notebook container
On its own, the Jupyter Notebook/JupyterLab container has enough features to satisfy your note-taking and coding needs, but its utility jumps to the next level once you integrate it with other self-hosted tools. For instance, you can set up Tailscale to access your coding workstation from external networks, and it’s one of the easiest ways to share your notebooks with other coders. If you’re worried about losing access to your Jupyter Notebook projects due to a botched home lab experiment, I recommend using Kopia to sync your notebooks and coding documents with a dedicated backup device.
5 cool Proxmox projects you should check out if you're into coding
Proxmox may be well-known for its home lab-oriented tools, but it's also a great companion for coders and programmers
