Changing the default port for iPython notebook server / Jupyter

后端 未结 5 811
盖世英雄少女心
盖世英雄少女心 2021-02-02 07:26

I am trying to run an ipython notebook / jupyter server on a machine behind a firewall. The only port which is open is port 80. So was wondering how I can change the default por

5条回答
  •  执念已碎
    2021-02-02 07:53

    In Jupyter we can start the notebook on different port by two ways.

    1. Temporary port - By mentioning the port in args like below command we can run Jupyter on that port. But we have to mention the port in the command argument whenever we need to run Jupyter in a different port.
    jupyter notebook --port 9999
    
    1. Permanent port Configuration - By changing the configuration we can run Jupyter on different port on the machine permanently. Please follow the below steps for that.

      • Open the configuration file in nano

      nano ~/.jupyter/jupyter_notebook_config.py

      • Change the port by changing the value of the below configuration

      c.NotebookApp.port = 9999

      • start the notebook by

      jupyter notebook

    Bingo!!!

提交回复
热议问题