How to accept connections for ipython from other computers?

I am running ipython 0.12.1 on Ubuntu 12.04. You can run it in a browser using the laptop interface by doing:

ipython notebook --pylab 

Configuration files can be found in ~/.config/ipython/profile_default/ . It seems that the connection parameters for each core are placed in ~/.config/ipython/profile_default/security/kernel-4e424cf4-ba44-441a-824c-c6bce727e585.json . Here is the contents of this file (new files are created when new kernels are launched):

 { "stdin_port": 54204, "ip": "127.0.0.1", "hb_port": 58090, "key": "2a105dd9-26c5-40c6-901f-a72254d59876", "shell_port": 52155, "iopub_port": 42228 } 

This is pretty self-evident, but how can I install a server that will have a constant configuration, so I can use the laptop interface from other computers on the local network?

+44
configuration ipython
May 10 '12 at 16:58
source share
1 answer

Relevant IPython Documentation Section

Notebook Server is listening on the local host by default. If you want it to be visible to all computers on your local network, just ask it to listen to all the interfaces:

 ipython notebook --ip='*' 

Or a specific IP visible to other machines:

 ipython notebook --ip=192.168.0.123 

Depending on your environment, it is probably recommended that you enable HTTPS and password when listening to external interfaces.

If you plan to publicly publish a lot, it’s also nice to create an IPython profile (for example, ipython profile create nbserver ) and edit the configuration accordingly, so you just need to:

 ipython notebook --profile nbserver 

To load all your ip / port / ssl / password settings.

+97
May 10 '12 at 21:11
source share



All Articles