# Pluto on the web?

**URL:** <https://discourse.julialang.org/t/pluto-on-the-web/60022>\
**Category:** Pluto\
**Created:** [April 26, 2021, 8:37am UTC](https://discourse.julialang.org/t/pluto-on-the-web/60022 "2021-04-26T08:37:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![maajdl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maajdl/32/22838_2.png) [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Post date:** [April 26, 2021, 8:37am UTC](https://discourse.julialang.org/t/pluto-on-the-web/60022/1 "2021-04-26T08:37:33Z")

</div>

Hello

My aim is to share Pluto notebooks with other people without any hassle for them.  
I mean, without asking them to install Julia and Pluto on their computer.  
Also without long explanations about opening an account, setting up CPUs.

Jupyter notebooks can be used extremely easily on [nextjournal.com](http://nextjournal.com) .  
Unfortunately, Pluto notebooks are not yet available on nextjournal .

I had a look at JuliaHub, but I could not figure out how to do that “easily”.  
Frigthened by the “credits”.  
I don’t see that Pluto notebooks could be given a single url.  
I don’t see how to make it just like open a web page for the end user.

Any suggestion?

Thanks

Michel

---

<div class="post-metadata">

**Author:** ![stiven.roytman](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@stiven.roytman](https://discourse.julialang.org/u/stiven.roytman)\
**Post date:** [April 26, 2021, 8:01pm UTC](https://discourse.julialang.org/t/pluto-on-the-web/60022/2 "2021-04-26T20:01:22Z")

</div>

Hi there!

So, there are multiple solutions possible here, depending on what you need. I will include below the one that I think is most rational for a quick demo that you want to run on your machine and share with others, rather than something that is expected to be up all the time.

There is this command line utility called [ngrok](https://ngrok.com), which generates a URL pointing to a service running on a localhost port on your machine. You would have to start the notebook like this:

```julia
Pluto.run(;host="127.0.0.1",port=9999)

```

The port can be set to anything, I’m just using 9999 arbitrarily. Host has to be pointing to 127.0.0.1, because that’s localhost. Then you would run ngrok like this in your shell:

```bash
ngrok http 9999

```

That will generate a url that looks like a bunch of letters and numbers then [ngrok.io](http://ngrok.io). To the end of that ngrok url, you want to append a secret that appears at the end of the Pluto notebook link that shows up after you spin up a Pluto service, it looks something like this “/?secret=k9j9YWvT”.

As long as the Pluto notebook and ngrok are both running, you should be able to share that ngrok link with anyone, and they should be able to access your Pluto notebook. Definitely don’t share this link on any public forum, as those who have it will be able to execute any code on your machine. Only give it to those whom you trust.

Finally, this is just something that I tried out, and that worked for me. Depending on your network setup, operating system, etc etc, your mileage may vary. Goes without saying lol.

Good luck!

---

<div class="post-metadata">

**Author:** ![Dictino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dictino/32/217281_2.png) [@Dictino](https://discourse.julialang.org/u/Dictino)\
**Post date:** [April 26, 2021, 8:37pm UTC](https://discourse.julialang.org/t/pluto-on-the-web/60022/3 "2021-04-26T20:37:29Z")

</div>

Te easiest way is to use Binder, see [Hosting interactive pluto notebook on web/Github](https://discourse.julialang.org/t/hosting-interactive-pluto-notebook-on-web-github/47167)

---

<div class="post-metadata">

**Author:** ![maajdl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maajdl/32/22838_2.png) [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Post date:** [April 27, 2021, 5:56am UTC](https://discourse.julialang.org/t/pluto-on-the-web/60022/4 "2021-04-27T05:56:53Z")

</div>

Thanks Dictino!

---

<div class="post-metadata">

**Author:** ![maajdl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maajdl/32/22838_2.png) [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Post date:** [April 27, 2021, 5:57am UTC](https://discourse.julialang.org/t/pluto-on-the-web/60022/5 "2021-04-27T05:57:51Z")

</div>

stiven, thanks!  
Thats’ funny, maybe not what I need right now, but sure something I will try sometimes.  
Michel

---

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [April 27, 2021, 6:11am UTC](https://discourse.julialang.org/t/pluto-on-the-web/60022/6 "2021-04-27T06:11:03Z")

</div>

Looks like an intersting solution!  
But be aware that you can execute any arbitrary Julia code inside a notebook, therefore exposing a notebook running on your local machine is a security risk. Running Pluto in a Docker container (official image: [Docker Hub](https://hub.docker.com/r/plutojl/pluto) ) is more secure (but probably also not 100%). Thus, for public web sites I would rather go for a cloud hosting solution.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [April 27, 2021, 6:47am UTC](https://discourse.julialang.org/t/pluto-on-the-web/60022/7 "2021-04-27T06:47:54Z")

</div>

Damn stupid question from me. Can only one session at a time access a Pluto notebook? If this is hosted on the web I guess it is a positive thing that two or more can access a note book - maybe an instructor and a learner seeing what happens as things are changed. Let’s say the gravity on the earth then on the moon as a ball is bounced.

---

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [April 27, 2021, 12:12pm UTC](https://discourse.julialang.org/t/pluto-on-the-web/60022/8 "2021-04-27T12:12:34Z")

</div>

Per default, multiple sessions to the same Pluto notebook are supported, but are synchronized, i.e. every change of one viewer is propagated to all others. This may or may not be what you want - for a public web page probably not.  
There, the recommended way is to combine a static web page with a Pluto Slider Server, see [PlutoSliderServer.jl -- notebooks as interactive websites | Fons van der Plas | PlutoCon 2021 - YouTube](https://youtu.be/QZ3xlKm92tk)

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [April 28, 2021, 4:30am UTC](https://discourse.julialang.org/t/pluto-on-the-web/60022/9 "2021-04-28T04:30:09Z")

</div>

@lungben, thankyou. The synchronized updates are good for the use case I was thinking about - interactive science labs where an instructor could (say) change the angle of the roof for snow to fall off like Alan Edelmann’s example. The students then can try their own setups and see what happens.

---

<div class="post-metadata">

**Author:** ![maajdl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maajdl/32/22838_2.png) [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Post date:** [April 29, 2021, 8:50am UTC](https://discourse.julialang.org/t/pluto-on-the-web/60022/10 "2021-04-29T08:50:04Z")

</div>

Thanks Dictino  
The post by fonsp, where you told me, will probably be my best track!  
Michel

> [@Hosting interactive pluto notebook on web/Github](https://discourse.julialang.org/t/hosting-interactive-pluto-notebook-on-web-github/47167/4):
>
> The simplest way is to put your notebook online somewhere (github, github gist, your university web page), and then use [pluto-on-binder.glitch.me](http://pluto-on-binder.glitch.me) to generate a binder link for that notebook
