{"id":2079,"date":"2024-11-02T18:28:16","date_gmt":"2022-07-26T11:09:23","guid":{"rendered":""},"modified":"2025-02-02T00:46:18","modified_gmt":"2025-02-01T23:46:18","slug":"how-to-install-jupyterlab-on-rocky-linux-9","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-jupyterlab-on-rocky-linux-9\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 JupyterLab on Rocky Linux 9"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header>\n<h1>\u00a0<\/h1>\n<\/header>\n<article>\n<p><strong>JupyterLab<\/strong> is an open-source, web-based interactive development environment for notebooks, code, and data. It is widely used by data scientists and developers for interactive computing and data analysis. In this guide, we will walk you through the steps to install JupyterLab on <strong>Rocky Linux 9<\/strong>. Hosting JupyterLab on a  provides the performance and scalability needed to handle complex computations and data analysis tasks using a powerful <strong>VPS server<\/strong>.<\/p>\n<h2>Step 1: Update Your VPS Server<\/h2>\n<p>Before installing JupyterLab, ensure your <a href=\"https:\/\/ie.netcloud24.com\">VPS server<\/a> is up to date. Run the following commands to update your Rocky Linux 9 system:<\/p>\n<pre><code>sudo dnf update -y<\/code><\/pre>\n<p>Running JupyterLab on a <strong>Windows VPS<\/strong> ensures that you benefit from dedicated resources like CPU and memory, providing the best performance for data science workloads.<\/p>\n<h2>Step 2: Install Python and Pip<\/h2>\n<p>JupyterLab requires Python to run. Install Python 3 and <code>pip<\/code>, the package manager for Python:<\/p>\n<pre><code>sudo dnf install python3 python3-pip -y<\/code><\/pre>\n<p>After installation, verify the installation of Python and Pip:<\/p>\n<pre><code>\r\npython3 --version\r\npip3 --version\r\n<\/code><\/pre>\n<h2>Step 3: Install JupyterLab<\/h2>\n<p>Once Python and Pip are installed, you can install JupyterLab using <code>pip<\/code>. Run the following command:<\/p>\n<pre><code>pip3 install jupyterlab<\/code><\/pre>\n<p>This will install JupyterLab and its dependencies. Depending on your server\u2019s resources, the installation may take a few minutes.<\/p>\n<h2>Step 4: Configure JupyterLab<\/h2>\n<p>Once JupyterLab is installed, you can configure it to run on your VPS server. First, generate a default configuration file by running:<\/p>\n<pre><code>jupyter lab --generate-config<\/code><\/pre>\n<p>This will create a configuration file at <code>~\/.jupyter\/jupyter_lab_config.py<\/code>. Open this file to configure JupyterLab:<\/p>\n<pre><code>nano ~\/.jupyter\/jupyter_lab_config.py<\/code><\/pre>\n<p>To allow JupyterLab to be accessed from any IP address (useful for remote access), add or uncomment the following line:<\/p>\n<pre><code>c.ServerApp.ip = '0.0.0.0'<\/code><\/pre>\n<p>If you want to run JupyterLab without a token or password (not recommended for production), add the following line:<\/p>\n<pre><code>c.ServerApp.open_browser = False<\/code><\/pre>\n<p>To set a password for JupyterLab, you can generate a password hash using the following command:<\/p>\n<pre><code>python3 -c \"from notebook.auth import passwd; print(passwd())\"<\/code><\/pre>\n<p>Add the generated hash to the configuration file under the following line:<\/p>\n<pre><code>c.ServerApp.password = 'your_password_hash'<\/code><\/pre>\n<h2>Step 5: Start JupyterLab<\/h2>\n<p>Now that JupyterLab is configured, you can start it using the following command:<\/p>\n<pre><code>jupyter lab<\/code><\/pre>\n<p>JupyterLab will start and display a link to access it from a web browser. By default, JupyterLab runs on port <code>8888<\/code>. You can access JupyterLab by navigating to:<\/p>\n<pre><code>http:\/\/your-server-ip:8888<\/code><\/pre>\n<h2>Step 6: Configure Firewall for JupyterLab<\/h2>\n<p>If you have a firewall enabled on your VPS, you will need to allow traffic on port 8888 for JupyterLab to be accessible remotely. Run the following commands to open the necessary port:<\/p>\n<pre><code>\r\nsudo firewall-cmd --permanent --add-port=8888\/tcp\r\nsudo firewall-cmd --reload\r\n<\/code><\/pre>\n<h2>Step 7: Run JupyterLab as a Background Service<\/h2>\n<p>To keep JupyterLab running even after you log out of the VPS, you can run it as a background service using <code>tmux<\/code> or <code>screen<\/code>. Alternatively, you can create a systemd service. First, create a systemd service file:<\/p>\n<pre><code>sudo nano \/etc\/systemd\/system\/jupyterlab.service<\/code><\/pre>\n<p>Add the following content to the file:<\/p>\n<pre><code>\r\n[Unit]\r\nDescription=JupyterLab\r\n\r\n[Service]\r\nType=simple\r\nPIDFile=\/run\/jupyter.pid\r\nExecStart=\/usr\/local\/bin\/jupyter-lab --config=\/home\/your_user\/.jupyter\/jupyter_lab_config.py\r\nUser=your_user\r\nGroup=your_group\r\nWorkingDirectory=\/home\/your_user\r\nRestart=always\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n<\/code><\/pre>\n<p>Save the file, then reload systemd and start the service:<\/p>\n<pre><code>\r\nsudo systemctl daemon-reload\r\nsudo systemctl start jupyterlab\r\nsudo systemctl enable jupyterlab\r\n<\/code><\/pre>\n<h2>Step 8: Optimize Your VPS Server for JupyterLab<\/h2>\n<p>Running JupyterLab on a  ensures that your data science environment benefits from dedicated resources. A <strong>VPS server<\/strong> provides the necessary CPU, memory, and storage to handle data-intensive tasks like machine learning, data analysis, and scientific computing. With a VPS, you can scale resources as your projects grow, ensuring smooth and efficient performance.<\/p>\n<h2>Conclusion<\/h2>\n<p>JupyterLab is a powerful tool for data science and interactive computing, and by following this guide, you can easily install it on Rocky Linux 9. Hosting your JupyterLab environment on a  ensures that your projects have the performance, scalability, and reliability needed to handle complex data workloads.<\/p>\n<p>For more information about VPS hosting and optimizing your JupyterLab setup, visit  today.<\/p>\n<\/article>\n<footer>\n<p>\u00a9 2024 Windows VPS &#8211; All Rights Reserved<\/p>\n<\/footer>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 JupyterLab is an open-source, web-based interactive development environment for notebooks, code, and data. It is widely used by data scientists and developers for interactive computing and\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-2079","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=2079"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2079\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=2079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=2079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=2079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}